@oneclick.dev/cms-core-modules 0.0.104 → 0.0.106
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/{Acquisition-CPlZzUBo.mjs → Acquisition-B2pM5vSp.mjs} +2 -2
- package/dist/{Acquisition-Br1Pfny3.js → Acquisition-Dt2rREU8.js} +1 -1
- package/dist/{Audience-BfkrmBuQ.js → Audience-Bs7b0TNm.js} +1 -1
- package/dist/{Audience-DTblSAiL.mjs → Audience-VLnUsQvW.mjs} +2 -2
- package/dist/{ContentEditor-B1nfKG_5.mjs → ContentEditor-BNLEv-qJ.mjs} +3119 -3098
- package/dist/{ContentEditor-DdFU8piH.js → ContentEditor-BUvvqfG1.js} +36 -36
- package/dist/{Create-qPeQxkdl.js → Create-89z41K73.js} +1 -1
- package/dist/{Create-BRBh0xjM.mjs → Create-Cn_Eufga.mjs} +5 -1
- package/dist/{Entries-C8UJkrVC.mjs → Entries-BdhUyJR5.mjs} +1 -1
- package/dist/{Entries-BaS6H6ak.js → Entries-CEXM_SkO.js} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Ceoje52V.js +1 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DMGcRmm-.mjs +1255 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-COrK1j0S.js +1 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-Vb3q8EVv.mjs +330 -0
- package/dist/{Overview-CpHhuiaV.js → Overview-Bn1Xx3_j.js} +1 -1
- package/dist/{Overview-BrCwozey.js → Overview-DC9io1bk.js} +1 -1
- package/dist/Overview-Di84CsR5.mjs +476 -0
- package/dist/Overview-UoZHUMUz.js +1 -0
- package/dist/{Overview-kaMhsIUq.mjs → Overview-ejh4vUMT.mjs} +3 -3
- package/dist/{Overview-D_T3K6aq.mjs → Overview-lWAyyenp.mjs} +1 -1
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CuwREvXD.js +349 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-GYNZ_yhD.mjs +3077 -0
- package/dist/{SeoHealth-BzcWd_w7.mjs → SeoHealth-DsbVdd2l.mjs} +3 -3
- package/dist/SeoHealth-az1YuNF2.js +1 -0
- package/dist/{TableView-DXmEF6pY.mjs → TableView-Bm6HaRHm.mjs} +1 -1
- package/dist/{TableView-CPAw3h8g.js → TableView-DQW0A1oG.js} +1 -1
- package/dist/agenda-IOqtALWf.js +1 -0
- package/dist/agenda-neyeLWv-.mjs +1165 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/{index-C4YUVWzJ.js → index-A2kp8Isi.js} +6 -6
- package/dist/{index-BuzLn4Km.js → index-B5aBwdxY.js} +2 -2
- package/dist/{index-p5Uqu8c2.mjs → index-BRdCrvcz.mjs} +52 -47
- package/dist/{index-D3L8WAJI.js → index-BiT55eU0.js} +2 -2
- package/dist/{index-CMk3uhUt.mjs → index-Bvxc5xv_.mjs} +153 -147
- package/dist/{index-DQYBP8Js.js → index-G7cIlnGN.js} +4 -4
- package/dist/{index-DjDCYQ_6.mjs → index-X6LV64jK.mjs} +102 -101
- package/dist/{index-_2lRVt_k.mjs → index-uOkqO74I.mjs} +105 -107
- package/dist/index-unsDfNYv.mjs +1187 -0
- package/dist/index-vHmvbEwa.js +35 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +14 -14
- package/dist/interpolation-CHn59tIC.js +1 -0
- package/dist/interpolation-w7IRDJwK.mjs +180 -0
- package/dist/orders-C65SlpJy.mjs +618 -0
- package/dist/orders-XVzWAgG1.js +1 -0
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +11 -2
- package/dist/src/appointments/components/edit/EventDialog/OrderDetailDialog.vue.d.ts +55 -0
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +6 -1
- package/dist/src/appointments/components/edit/NewReservationDialog/CustomerInformation.vue.d.ts +10 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +25 -1
- package/dist/src/appointments/components/edit/NewReservationDialog/QuickReservationAdder.vue.d.ts +26 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/ReservationLines.vue.d.ts +31 -0
- package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +3 -1
- package/dist/src/appointments/composables/useHorizontalScroll.d.ts +20 -0
- package/dist/src/lib/interpolation.d.ts +6 -0
- package/package.json +2 -2
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-9Q7TMm4u.mjs +0 -401
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DiNzGl-q.js +0 -1
- package/dist/Overview-BYMrsZjM.mjs +0 -332
- package/dist/Overview-t0pG5xjA.js +0 -1
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cz_22Oce.mjs +0 -2927
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DPPNc-Z5.js +0 -349
- package/dist/SeoHealth-09sEOu3G.js +0 -1
- package/dist/agenda-BNG05SAq.js +0 -1
- package/dist/agenda-D1RxMxBS.mjs +0 -1152
- package/dist/index-BtujSJeg.js +0 -35
- package/dist/index-dOdMm1pV.mjs +0 -1105
- package/dist/interpolation-DEDSLETn.mjs +0 -128
- package/dist/interpolation-DERg6Lwt.js +0 -1
- package/dist/orders-CzzcFQha.mjs +0 -559
- package/dist/orders-ETtbA4aQ.js +0 -1
- package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +0 -110
- package/dist/src/appointments/pages/edit/orders.vue.d.ts +0 -98
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),D=require("lucide-vue-next"),R=require("@oneclick.dev/cms-kit"),W=require("./index-ijdf0d9-.js");function z(n){return Array.isArray?Array.isArray(n):Ve(n)==="[object Array]"}function Le(n){if(typeof n=="string")return n;if(typeof n=="bigint")return n.toString();const t=n+"";return t=="0"&&1/n==-1/0?"-0":t}function oe(n){return n==null?"":Le(n)}function M(n){return typeof n=="string"}function Q(n){return typeof n=="number"}function Pe(n){return n===!0||n===!1||Ue(n)&&Ve(n)=="[object Boolean]"}function be(n){return typeof n=="object"}function Ue(n){return be(n)&&n!==null}function F(n){return n!=null}function Y(n){return!n.trim().length}function Ve(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const We="Incorrect 'index' type",He=n=>`Invalid value for key ${n}`,Ke=n=>`Pattern length exceeds max of ${n}.`,Ge=n=>`Missing ${n} property in key`,Ye=n=>`Property 'weight' in key '${n}' must be a positive integer`,xe=Object.prototype.hasOwnProperty;class Qe{constructor(t){this._keys=[],this._keyMap={};let o=0;t.forEach(s=>{const a=we(s);this._keys.push(a),this._keyMap[a.id]=a,o+=a.weight}),this._keys.forEach(s=>{s.weight/=o})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function we(n){let t=null,o=null,s=null,a=1,c=null;if(M(n)||z(n))s=n,t=Ce(n),o=ne(n);else{if(!xe.call(n,"name"))throw new Error(Ge("name"));const l=n.name;if(s=l,xe.call(n,"weight")&&(a=n.weight,a<=0))throw new Error(Ye(l));t=Ce(l),o=ne(l),c=n.getFn}return{path:t,id:o,weight:a,src:s,getFn:c}}function Ce(n){return z(n)?n:n.split(".")}function ne(n){return z(n)?n.join("."):n}function Je(n,t){const o=[];let s=!1;const a=(c,l,d,u)=>{if(F(c))if(!l[d])o.push(u!==void 0?{v:c,i:u}:c);else{const f=l[d],r=c[f];if(!F(r))return;if(d===l.length-1&&(M(r)||Q(r)||Pe(r)||typeof r=="bigint"))o.push(u!==void 0?{v:oe(r),i:u}:oe(r));else if(z(r)){s=!0;for(let i=0,h=r.length;i<h;i+=1)a(r[i],l,d+1,i)}else l.length&&a(r,l,d+1,u)}};return a(n,M(t)?t.split("."):t,0),s?o:o[0]}const Xe={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Ze={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,t)=>n.score===t.score?n.idx<t.idx?-1:1:n.score<t.score?-1:1},qe={location:0,threshold:.6,distance:100},et={useExtendedSearch:!1,useTokenSearch:!1,getFn:Je,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},x=Object.freeze({...Ze,...Xe,...qe,...et}),tt=/[^ ]+/g;function ot(n=1,t=3){const o=new Map,s=Math.pow(10,t);return{get(a){const c=a.match(tt).length;if(o.has(c))return o.get(c);const l=1/Math.pow(c,.5*n),d=parseFloat(Math.round(l*s)/s);return o.set(c,d),d},clear(){o.clear()}}}class de{constructor({getFn:t=x.getFn,fieldNormWeight:o=x.fieldNormWeight}={}){this.norm=ot(o,3),this.getFn=t,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((o,s)=>{this._keysMap[o.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,M(this.docs[0])?this.docs.forEach((t,o)=>{this._addString(t,o)}):this.docs.forEach((t,o)=>{this._addObject(t,o)}),this.norm.clear())}add(t){const o=this.size();M(t)?this._addString(t,o):this._addObject(t,o)}removeAt(t){this.records.splice(t,1);for(let o=t,s=this.size();o<s;o+=1)this.records[o].i-=1}removeAll(t){for(let o=t.length-1;o>=0;o-=1)this.records.splice(t[o],1);for(let o=0,s=this.records.length;o<s;o+=1)this.records[o].i=o}getValueForItemAtKeyId(t,o){return t[this._keysMap[o]]}size(){return this.records.length}_addString(t,o){if(!F(t)||Y(t))return;const s={v:t,i:o,n:this.norm.get(t)};this.records.push(s)}_addObject(t,o){const s={i:o,$:{}};this.keys.forEach((a,c)=>{const l=a.getFn?a.getFn(t):this.getFn(t,a.path);if(F(l)){if(z(l)){const d=[];for(let u=0,f=l.length;u<f;u+=1){const r=l[u];if(F(r)){if(M(r)){if(!Y(r)){const i={v:r,i:u,n:this.norm.get(r)};d.push(i)}}else if(F(r.v)){const i=M(r.v)?r.v:oe(r.v);if(!Y(i)){const h={v:i,i:r.i,n:this.norm.get(i)};d.push(h)}}}}s.$[c]=d}else if(M(l)&&!Y(l)){const d={v:l,n:this.norm.get(l)};s.$[c]=d}}}),this.records.push(s)}toJSON(){return{keys:this.keys.map(({getFn:t,...o})=>o),records:this.records}}}function Ee(n,t,{getFn:o=x.getFn,fieldNormWeight:s=x.fieldNormWeight}={}){const a=new de({getFn:o,fieldNormWeight:s});return a.setKeys(n.map(we)),a.setSources(t),a.create(),a}function nt(n,{getFn:t=x.getFn,fieldNormWeight:o=x.fieldNormWeight}={}){const{keys:s,records:a}=n,c=new de({getFn:t,fieldNormWeight:o});return c.setKeys(s),c.setIndexRecords(a),c}function st(n=[],t=x.minMatchCharLength){const o=[];let s=-1,a=-1,c=0;for(let l=n.length;c<l;c+=1){const d=n[c];d&&s===-1?s=c:!d&&s!==-1&&(a=c-1,a-s+1>=t&&o.push([s,a]),s=-1)}return n[c-1]&&c-s>=t&&o.push([s,c-1]),o}const U=32;function rt(n,t,o,{location:s=x.location,distance:a=x.distance,threshold:c=x.threshold,findAllMatches:l=x.findAllMatches,minMatchCharLength:d=x.minMatchCharLength,includeMatches:u=x.includeMatches,ignoreLocation:f=x.ignoreLocation}={}){if(t.length>U)throw new Error(Ke(U));const r=t.length,i=n.length,h=Math.max(0,Math.min(s,i));let m=c,p=h;const v=(N,E)=>{const C=N/r;if(f)return C;const A=Math.abs(h-E);return a?C+A/a:A?1:C},_=d>1||u,w=_?Array(i):[];let S;for(;(S=n.indexOf(t,p))>-1;){const N=v(0,S);if(m=Math.min(N,m),p=S+r,_){let E=0;for(;E<r;)w[S+E]=1,E+=1}}p=-1;let k=[],b=1,V=r+i;const T=1<<r-1;for(let N=0;N<r;N+=1){let E=0,C=V;for(;E<C;)v(N,h+C)<=m?E=C:V=C,C=Math.floor((V-E)/2+E);V=C;let A=Math.max(1,h-C+1);const H=l?i:Math.min(h+C,i)+r,j=Array(H+2);j[H+1]=(1<<N)-1;for(let $=H;$>=A;$-=1){const y=$-1,g=o[n[y]];if(_&&(w[y]=+!!g),j[$]=(j[$+1]<<1|1)&g,N&&(j[$]|=(k[$+1]|k[$])<<1|1|k[$+1]),j[$]&T&&(b=v(N,y),b<=m)){if(m=b,p=y,p<=h)break;A=Math.max(1,2*h-p)}}if(v(N+1,h)>m)break;k=j}const I={isMatch:p>=0,score:Math.max(.001,b)};if(_){const N=st(w,d);N.length?u&&(I.indices=N):I.isMatch=!1}return I}function at(n){const t={};for(let o=0,s=n.length;o<s;o+=1){const a=n.charAt(o);t[a]=(t[a]||0)|1<<s-o-1}return t}function me(n){if(n.length<=1)return n;n.sort((o,s)=>o[0]-s[0]||o[1]-s[1]);const t=[n[0]];for(let o=1,s=n.length;o<s;o+=1){const a=t[t.length-1],c=n[o];c[0]<=a[1]+1?a[1]=Math.max(a[1],c[1]):t.push(c)}return t}const Ae={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},it=new RegExp("["+Object.keys(Ae).join("")+"]","g"),K=String.prototype.normalize?n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(it,t=>Ae[t]):n=>n;class pe{constructor(t,{location:o=x.location,threshold:s=x.threshold,distance:a=x.distance,includeMatches:c=x.includeMatches,findAllMatches:l=x.findAllMatches,minMatchCharLength:d=x.minMatchCharLength,isCaseSensitive:u=x.isCaseSensitive,ignoreDiacritics:f=x.ignoreDiacritics,ignoreLocation:r=x.ignoreLocation}={}){if(this.options={location:o,threshold:s,distance:a,includeMatches:c,findAllMatches:l,minMatchCharLength:d,isCaseSensitive:u,ignoreDiacritics:f,ignoreLocation:r},t=u?t:t.toLowerCase(),t=f?K(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const i=(m,p)=>{this.chunks.push({pattern:m,alphabet:at(m),startIndex:p})},h=this.pattern.length;if(h>U){let m=0;const p=h%U,v=h-p;for(;m<v;)i(this.pattern.substr(m,U),m),m+=U;if(p){const _=h-U;i(this.pattern.substr(_),_)}}else i(this.pattern,0)}searchIn(t){const{isCaseSensitive:o,ignoreDiacritics:s,includeMatches:a}=this.options;if(t=o?t:t.toLowerCase(),t=s?K(t):t,this.pattern===t){const v={isMatch:!0,score:0};return a&&(v.indices=[[0,t.length-1]]),v}const{location:c,distance:l,threshold:d,findAllMatches:u,minMatchCharLength:f,ignoreLocation:r}=this.options,i=[];let h=0,m=!1;this.chunks.forEach(({pattern:v,alphabet:_,startIndex:w})=>{const{isMatch:S,score:k,indices:b}=rt(t,v,_,{location:c+w,distance:l,threshold:d,findAllMatches:u,minMatchCharLength:f,includeMatches:a,ignoreLocation:r});S&&(m=!0),h+=k,S&&b&&i.push(...b)});const p={isMatch:m,score:m?h/this.chunks.length:1};return m&&a&&(p.indices=me(i)),p}}class O{constructor(t){this.pattern=t}static isMultiMatch(t){return ye(t,this.multiRegex)}static isSingleMatch(t){return ye(t,this.singleRegex)}search(t){return{isMatch:!1,score:1}}}function ye(n,t){const o=n.match(t);return o?o[1]:null}class lt extends O{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const o=t===this.pattern;return{isMatch:o,score:o?0:1,indices:[0,this.pattern.length-1]}}}class ct extends O{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class ut extends O{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const o=t.startsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,this.pattern.length-1]}}}class dt extends O{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const o=!t.startsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class mt extends O{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const o=t.endsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class pt extends O{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const o=!t.endsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class Be extends O{constructor(t,{location:o=x.location,threshold:s=x.threshold,distance:a=x.distance,includeMatches:c=x.includeMatches,findAllMatches:l=x.findAllMatches,minMatchCharLength:d=x.minMatchCharLength,isCaseSensitive:u=x.isCaseSensitive,ignoreDiacritics:f=x.ignoreDiacritics,ignoreLocation:r=x.ignoreLocation}={}){super(t),this._bitapSearch=new pe(t,{location:o,threshold:s,distance:a,includeMatches:c,findAllMatches:l,minMatchCharLength:d,isCaseSensitive:u,ignoreDiacritics:f,ignoreLocation:r})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Se extends O{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let o=0,s;const a=[],c=this.pattern.length;for(;(s=t.indexOf(this.pattern,o))>-1;)o=s+c,a.push([s,o-1]);const l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}const se=[lt,Se,ut,dt,pt,mt,ct,Be],_e=se.length,ft="\0",ht="|";function gt(n){const t=[],o=n.length;let s=0;for(;s<o;){for(;s<o&&n[s]===" ";)s++;if(s>=o)break;let a=s;for(;a<o&&n[a]!==" "&&n[a]!=='"';)a++;if(a<o&&n[a]==='"'){for(a++;a<o;){if(n[a]==='"'){const c=a+1;if(c>=o||n[c]===" "){a++;break}if(n[c]==="$"&&(c+1>=o||n[c+1]===" ")){a+=2;break}}a++}t.push(n.substring(s,a)),s=a}else{for(;a<o&&n[a]!==" ";)a++;t.push(n.substring(s,a)),s=a}}return t}function vt(n,t={}){return n.replace(/\\\|/g,ft).split(ht).map(s=>{const a=s.replace(/\u0000/g,"|"),c=gt(a.trim()).filter(d=>d&&!!d.trim()),l=[];for(let d=0,u=c.length;d<u;d+=1){const f=c[d];let r=!1,i=-1;for(;!r&&++i<_e;){const h=se[i],m=h.isMultiMatch(f);m&&(l.push(new h(m,t)),r=!0)}if(!r)for(i=-1;++i<_e;){const h=se[i],m=h.isSingleMatch(f);if(m){l.push(new h(m,t));break}}}return l})}const xt=new Set([Be.type,Se.type]);class Ct{constructor(t,{isCaseSensitive:o=x.isCaseSensitive,ignoreDiacritics:s=x.ignoreDiacritics,includeMatches:a=x.includeMatches,minMatchCharLength:c=x.minMatchCharLength,ignoreLocation:l=x.ignoreLocation,findAllMatches:d=x.findAllMatches,location:u=x.location,threshold:f=x.threshold,distance:r=x.distance}={}){this.query=null,this.options={isCaseSensitive:o,ignoreDiacritics:s,includeMatches:a,minMatchCharLength:c,findAllMatches:d,ignoreLocation:l,location:u,threshold:f,distance:r},t=o?t:t.toLowerCase(),t=s?K(t):t,this.pattern=t,this.query=vt(this.pattern,this.options)}static condition(t,o){return o.useExtendedSearch}searchIn(t){const o=this.query;if(!o)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:a,ignoreDiacritics:c}=this.options;t=a?t:t.toLowerCase(),t=c?K(t):t;let l=0;const d=[];let u=0,f=!1;for(let r=0,i=o.length;r<i;r+=1){const h=o[r];d.length=0,l=0,f=!1;for(let m=0,p=h.length;m<p;m+=1){const v=h[m],{isMatch:_,indices:w,score:S}=v.search(t);if(_){l+=1,u+=S;const k=v.constructor.type;k.startsWith("inverse")&&(f=!0),s&&(xt.has(k)?d.push(...w):d.push(w))}else{u=0,l=0,d.length=0,f=!1;break}}if(l){const m={isMatch:!0,score:u/l};return f&&(m.hasInverse=!0),s&&(m.indices=me(d)),m}}return{isMatch:!1,score:1}}}const re=[];function fe(...n){re.push(...n)}function J(n,t){for(let o=0,s=re.length;o<s;o+=1){const a=re[o];if(a.condition(n,t))return new a(n,t)}return new pe(n,t)}const X={AND:"$and",OR:"$or"},ae={PATH:"$path",PATTERN:"$val"},ie=n=>!!(n[X.AND]||n[X.OR]),yt=n=>!!n[ae.PATH],_t=n=>!z(n)&&be(n)&&!ie(n),ke=n=>({[X.AND]:Object.keys(n).map(t=>({[t]:n[t]}))});function Me(n,t,{auto:o=!0}={}){const s=a=>{if(M(a)){const u={keyId:null,pattern:a};return o&&(u.searcher=J(a,t)),u}const c=Object.keys(a),l=yt(a);if(!l&&c.length>1&&!ie(a))return s(ke(a));if(_t(a)){const u=l?a[ae.PATH]:c[0],f=l?a[ae.PATTERN]:a[u];if(!M(f))throw new Error(He(u));const r={keyId:ne(u),pattern:f};return o&&(r.searcher=J(f,t)),r}const d={children:[],operator:c[0]};return c.forEach(u=>{const f=a[u];z(f)&&f.forEach(r=>{d.children.push(s(r))})}),d};return ie(n)||(n=ke(n)),s(n)}function le(n,{ignoreFieldNorm:t=x.ignoreFieldNorm}){let o=1;return n.forEach(({key:s,norm:a,score:c})=>{const l=s?s.weight:null;o*=Math.pow(c===0&&l?Number.EPSILON:c,(l||1)*(t?1:a))}),o}function kt(n,{ignoreFieldNorm:t=x.ignoreFieldNorm}){n.forEach(o=>{o.score=le(o.matches,{ignoreFieldNorm:t})})}class Dt{constructor(t){this.limit=t,this.heap=[]}get size(){return this.heap.length}shouldInsert(t){return this.size<this.limit||t<this.heap[0].score}insert(t){this.size<this.limit?(this.heap.push(t),this._bubbleUp(this.size-1)):t.score<this.heap[0].score&&(this.heap[0]=t,this._sinkDown(0))}extractSorted(t){return this.heap.sort(t)}_bubbleUp(t){const o=this.heap;for(;t>0;){const s=t-1>>1;if(o[t].score<=o[s].score)break;const a=o[t];o[t]=o[s],o[s]=a,t=s}}_sinkDown(t){const o=this.heap,s=o.length;let a=t;do{t=a;const c=2*t+1,l=2*t+2;if(c<s&&o[c].score>o[a].score&&(a=c),l<s&&o[l].score>o[a].score&&(a=l),a!==t){const d=o[t];o[t]=o[a],o[a]=d}}while(a!==t)}}function Nt(n,t){const o=n.matches;t.matches=[],F(o)&&o.forEach(s=>{if(!F(s.indices)||!s.indices.length)return;const{indices:a,value:c}=s,l={indices:a,value:c};s.key&&(l.key=s.key.src),s.idx>-1&&(l.refIndex=s.idx),t.matches.push(l)})}function bt(n,t){t.score=n.score}function Vt(n,t,{includeMatches:o=x.includeMatches,includeScore:s=x.includeScore}={}){const a=[];return o&&a.push(Nt),s&&a.push(bt),n.map(c=>{const{idx:l}=c,d={item:t[l],refIndex:l};return a.length&&a.forEach(u=>{u(c,d)}),d})}const wt=/\b\w+\b/g;function ce({isCaseSensitive:n=!1,ignoreDiacritics:t=!1}={}){return{tokenize(o){return n||(o=o.toLowerCase()),t&&(o=K(o)),o.match(wt)||[]}}}function Et(n,t,o){const s=new Map,a=new Map;let c=0;function l(d,u,f,r){const i=o.tokenize(d);if(!i.length)return;c++;const h=new Map;for(const m of i)h.set(m,(h.get(m)||0)+1);for(const[m,p]of h){const v={docIdx:u,keyIdx:f,subIdx:r,tf:p};let _=s.get(m);_||(_=[],s.set(m,_)),_.push(v),a.set(m,(a.get(m)||0)+1)}}for(const d of n){const{i:u,v:f,$:r}=d;if(f!==void 0){l(f,u,-1,-1);continue}if(r)for(let i=0;i<t;i++){const h=r[i];if(h)if(Array.isArray(h))for(const m of h)l(m.v,u,i,m.i??-1);else l(h.v,u,i,-1)}}return{terms:s,fieldCount:c,df:a}}function At(n,t,o,s){const{i:a,v:c,$:l}=t;function d(u,f,r){const i=s.tokenize(u);if(!i.length)return;n.fieldCount++;const h=new Map;for(const m of i)h.set(m,(h.get(m)||0)+1);for(const[m,p]of h){const v={docIdx:a,keyIdx:f,subIdx:r,tf:p};let _=n.terms.get(m);_||(_=[],n.terms.set(m,_)),_.push(v),n.df.set(m,(n.df.get(m)||0)+1)}}if(c!==void 0){d(c,-1,-1);return}if(l)for(let u=0;u<o;u++){const f=l[u];if(f)if(Array.isArray(f))for(const r of f)d(r.v,u,r.i??-1);else d(f.v,u,-1)}}function De(n,t){for(const[o,s]of n.terms){const a=s.filter(l=>l.docIdx!==t),c=s.length-a.length;c>0&&(n.fieldCount-=c,n.df.set(o,(n.df.get(o)||0)-c),a.length===0?(n.terms.delete(o),n.df.delete(o)):n.terms.set(o,a))}}class L{constructor(t,o,s){this.options={...x,...o},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Qe(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,s),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const o=this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options,s=J(t,o);return this._lastQuery=t,this._lastSearcher=s,s}setCollection(t,o){if(this._docs=t,o&&!(o instanceof de))throw new Error(We);if(this._myIndex=o||Ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const s=ce({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=Et(this._myIndex.records,this._myIndex.keys.length,s)}}add(t){if(F(t)&&(this._docs.push(t),this._myIndex.add(t),this._invertedIndex)){const o=this._myIndex.records[this._myIndex.records.length-1],s=ce({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});At(this._invertedIndex,o,this._myIndex.keys.length,s)}}remove(t=()=>!1){const o=[],s=[];for(let a=0,c=this._docs.length;a<c;a+=1)t(this._docs[a],a)&&(o.push(this._docs[a]),s.push(a));if(s.length){if(this._invertedIndex)for(const a of s)De(this._invertedIndex,a);for(let a=s.length-1;a>=0;a-=1)this._docs.splice(s[a],1);this._myIndex.removeAll(s)}return o}removeAt(t){this._invertedIndex&&De(this._invertedIndex,t);const o=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),o}getIndex(){return this._myIndex}search(t,o){const{limit:s=-1}=o||{},{includeMatches:a,includeScore:c,shouldSort:l,sortFn:d,ignoreFieldNorm:u}=this.options;if(M(t)&&!t.trim()){let i=this._docs.map((h,m)=>({item:h,refIndex:m}));return Q(s)&&s>-1&&(i=i.slice(0,s)),i}const f=Q(s)&&s>0&&M(t);let r;if(f){const i=new Dt(s);M(this._docs[0])?this._searchStringList(t,{heap:i,ignoreFieldNorm:u}):this._searchObjectList(t,{heap:i,ignoreFieldNorm:u}),r=i.extractSorted(d)}else r=M(t)?M(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),kt(r,{ignoreFieldNorm:u}),l&&r.sort(d),Q(s)&&s>-1&&(r=r.slice(0,s));return Vt(r,this._docs,{includeMatches:a,includeScore:c})}_searchStringList(t,{heap:o,ignoreFieldNorm:s}={}){const a=this._getSearcher(t),{records:c}=this._myIndex,l=o?null:[];return c.forEach(({v:d,i:u,n:f})=>{if(!F(d))return;const{isMatch:r,score:i,indices:h}=a.searchIn(d);if(r){const m={item:d,idx:u,matches:[{score:i,value:d,norm:f,indices:h}]};o?(m.score=le(m.matches,{ignoreFieldNorm:s}),o.shouldInsert(m.score)&&o.insert(m)):l.push(m)}}),l}_searchLogical(t){const o=Me(t,this.options),s=(d,u,f)=>{if(!("children"in d)){const{keyId:m,searcher:p}=d;let v;return m===null?(v=[],this._myIndex.keys.forEach((_,w)=>{v.push(...this._findMatches({key:_,value:u[w],searcher:p}))})):v=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(u,m),searcher:p}),v&&v.length?[{idx:f,item:u,matches:v}]:[]}const{children:r,operator:i}=d,h=[];for(let m=0,p=r.length;m<p;m+=1){const v=r[m],_=s(v,u,f);if(_.length)h.push(..._);else if(i===X.AND)return[]}return h},a=this._myIndex.records,c=new Map,l=[];return a.forEach(({$:d,i:u})=>{if(F(d)){const f=s(o,d,u);f.length&&(c.has(u)||(c.set(u,{idx:u,item:d,matches:[]}),l.push(c.get(u))),f.forEach(({matches:r})=>{c.get(u).matches.push(...r)}))}}),l}_searchObjectList(t,{heap:o,ignoreFieldNorm:s}={}){const a=this._getSearcher(t),{keys:c,records:l}=this._myIndex,d=o?null:[];return l.forEach(({$:u,i:f})=>{if(!F(u))return;const r=[];let i=!1,h=!1;if(c.forEach((m,p)=>{const v=this._findMatches({key:m,value:u[p],searcher:a});v.length?(r.push(...v),v[0].hasInverse&&(h=!0)):i=!0}),!(h&&i)&&r.length){const m={idx:f,item:u,matches:r};o?(m.score=le(m.matches,{ignoreFieldNorm:s}),o.shouldInsert(m.score)&&o.insert(m)):d.push(m)}}),d}_findMatches({key:t,value:o,searcher:s}){if(!F(o))return[];const a=[];if(z(o))o.forEach(({v:c,i:l,n:d})=>{if(!F(c))return;const{isMatch:u,score:f,indices:r,hasInverse:i}=s.searchIn(c);u&&a.push({score:f,key:t,value:c,idx:l,norm:d,indices:r,hasInverse:i})});else{const{v:c,n:l}=o,{isMatch:d,score:u,indices:f,hasInverse:r}=s.searchIn(c);d&&a.push({score:u,key:t,value:c,norm:l,indices:f,hasInverse:r})}return a}}class Bt{static condition(t,o){return o.useTokenSearch}constructor(t,o){this.options=o,this.analyzer=ce({isCaseSensitive:o.isCaseSensitive,ignoreDiacritics:o.ignoreDiacritics});const s=this.analyzer.tokenize(t),a=o._invertedIndex,{df:c,fieldCount:l}=a;this.termSearchers=[],this.idfWeights=[];for(const d of s){this.termSearchers.push(new pe(d,{location:o.location,threshold:o.threshold,distance:o.distance,includeMatches:o.includeMatches,findAllMatches:o.findAllMatches,minMatchCharLength:o.minMatchCharLength,isCaseSensitive:o.isCaseSensitive,ignoreDiacritics:o.ignoreDiacritics,ignoreLocation:!0}));const u=c.get(d)||0,f=Math.log(1+(l-u+.5)/(u+.5));this.idfWeights.push(f)}}searchIn(t){if(!this.termSearchers.length)return{isMatch:!1,score:1};const o=[];let s=0,a=0,c=0;for(let u=0;u<this.termSearchers.length;u++){const f=this.termSearchers[u].searchIn(t),r=this.idfWeights[u];a+=r,f.isMatch&&(c++,s+=r*(1-f.score),f.indices&&o.push(...f.indices))}if(c===0)return{isMatch:!1,score:1};const l=a>0?1-s/a:0,d={isMatch:!0,score:Math.max(.001,l)};return this.options.includeMatches&&o.length&&(d.indices=me(o)),d}}L.version="7.3.0";L.createIndex=Ee;L.parseIndex=nt;L.config=x;L.match=function(n,t,o){return J(n,{...x,...o}).searchIn(t)};L.parseQuery=Me;fe(Ct);fe(Bt);L.use=function(...n){n.forEach(t=>fe(t))};const P=n=>n==null?"—":`€${n.toFixed(2)}`,St=n=>{if(!n)return"—";if(n<60)return`${n} min`;const t=Math.floor(n/60),o=n%60;return o>0?`${t}h ${o}min`:`${t}h`},Mt=n=>{switch(n){case"confirmed":return"Confirmed";case"pending":return"Pending";case"cancelled":return"Cancelled";default:return n||"Unknown"}},Ne=n=>{switch(n){case"confirmed":return"#16a34a";case"pending":return"#ca8a04";case"cancelled":return"#dc2626";default:return"#6b7280"}},Ft=(n,t={})=>{const o=`${n.customerInfo?.firstName||""} ${n.customerInfo?.lastName||""}`.trim()||"Unknown Customer",s=n.id?.slice(0,8)||"—",a=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),c=`
|
|
2
|
-
<!DOCTYPE html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>Reservation ${s}</title>
|
|
8
|
-
<style>
|
|
9
|
-
* {
|
|
10
|
-
margin: 0;
|
|
11
|
-
padding: 0;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
body {
|
|
16
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
17
|
-
line-height: 1.6;
|
|
18
|
-
color: #1f2937;
|
|
19
|
-
background: #fff;
|
|
20
|
-
padding: 40px;
|
|
21
|
-
max-width: 800px;
|
|
22
|
-
margin: 0 auto;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.header {
|
|
26
|
-
display: flex;
|
|
27
|
-
justify-content: space-between;
|
|
28
|
-
align-items: flex-start;
|
|
29
|
-
margin-bottom: 40px;
|
|
30
|
-
padding-bottom: 20px;
|
|
31
|
-
border-bottom: 2px solid #e5e7eb;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.company-info {
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
gap: 16px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.company-logo {
|
|
41
|
-
max-height: 50px;
|
|
42
|
-
max-width: 150px;
|
|
43
|
-
object-fit: contain;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.company-name {
|
|
47
|
-
font-size: 24px;
|
|
48
|
-
font-weight: 700;
|
|
49
|
-
color: #111827;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.document-info {
|
|
53
|
-
text-align: right;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.document-title {
|
|
57
|
-
font-size: 28px;
|
|
58
|
-
font-weight: 700;
|
|
59
|
-
color: #111827;
|
|
60
|
-
margin-bottom: 8px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.booking-id {
|
|
64
|
-
font-size: 14px;
|
|
65
|
-
color: #6b7280;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.status-badge {
|
|
69
|
-
display: inline-block;
|
|
70
|
-
padding: 4px 12px;
|
|
71
|
-
border-radius: 9999px;
|
|
72
|
-
font-size: 12px;
|
|
73
|
-
font-weight: 600;
|
|
74
|
-
text-transform: uppercase;
|
|
75
|
-
margin-top: 8px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.section {
|
|
79
|
-
margin-bottom: 32px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.section-title {
|
|
83
|
-
font-size: 12px;
|
|
84
|
-
font-weight: 600;
|
|
85
|
-
text-transform: uppercase;
|
|
86
|
-
letter-spacing: 0.05em;
|
|
87
|
-
color: #6b7280;
|
|
88
|
-
margin-bottom: 12px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.section-content {
|
|
92
|
-
background: #f9fafb;
|
|
93
|
-
border-radius: 8px;
|
|
94
|
-
padding: 20px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.customer-name {
|
|
98
|
-
font-size: 18px;
|
|
99
|
-
font-weight: 600;
|
|
100
|
-
margin-bottom: 8px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.contact-info {
|
|
104
|
-
font-size: 14px;
|
|
105
|
-
color: #4b5563;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.contact-info a {
|
|
109
|
-
color: #4b5563;
|
|
110
|
-
text-decoration: none;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.grid {
|
|
114
|
-
display: grid;
|
|
115
|
-
grid-template-columns: 1fr 1fr;
|
|
116
|
-
gap: 16px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.info-card {
|
|
120
|
-
background: #f9fafb;
|
|
121
|
-
border-radius: 8px;
|
|
122
|
-
padding: 16px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.info-label {
|
|
126
|
-
font-size: 12px;
|
|
127
|
-
color: #6b7280;
|
|
128
|
-
margin-bottom: 4px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.info-value {
|
|
132
|
-
font-size: 16px;
|
|
133
|
-
font-weight: 600;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.package-row {
|
|
137
|
-
display: flex;
|
|
138
|
-
justify-content: space-between;
|
|
139
|
-
align-items: flex-start;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.package-name {
|
|
143
|
-
font-size: 16px;
|
|
144
|
-
font-weight: 600;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.package-duration {
|
|
148
|
-
font-size: 14px;
|
|
149
|
-
color: #6b7280;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.package-price {
|
|
153
|
-
font-size: 16px;
|
|
154
|
-
font-weight: 600;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.payment-row {
|
|
158
|
-
display: flex;
|
|
159
|
-
justify-content: space-between;
|
|
160
|
-
padding: 8px 0;
|
|
161
|
-
font-size: 14px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.payment-label {
|
|
165
|
-
color: #6b7280;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.payment-value {
|
|
169
|
-
font-weight: 500;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.payment-value.green {
|
|
173
|
-
color: #16a34a;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.payment-value.orange {
|
|
177
|
-
color: #ea580c;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.payment-divider {
|
|
181
|
-
border-top: 1px solid #e5e7eb;
|
|
182
|
-
margin: 12px 0;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.payment-total {
|
|
186
|
-
font-size: 16px;
|
|
187
|
-
font-weight: 600;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.footer {
|
|
191
|
-
margin-top: 60px;
|
|
192
|
-
padding-top: 20px;
|
|
193
|
-
border-top: 1px solid #e5e7eb;
|
|
194
|
-
text-align: center;
|
|
195
|
-
font-size: 12px;
|
|
196
|
-
color: #9ca3af;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
@media print {
|
|
200
|
-
body {
|
|
201
|
-
padding: 20px;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.no-print {
|
|
205
|
-
display: none;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
</style>
|
|
209
|
-
</head>
|
|
210
|
-
<body>
|
|
211
|
-
<div class="header">
|
|
212
|
-
<div class="company-info">
|
|
213
|
-
${t.companyLogo?`<img src="${t.companyLogo}" alt="Logo" class="company-logo" />`:""}
|
|
214
|
-
${t.companyName?`<span class="company-name">${t.companyName}</span>`:""}
|
|
215
|
-
</div>
|
|
216
|
-
<div class="document-info">
|
|
217
|
-
<div class="document-title">Reservation</div>
|
|
218
|
-
<div class="booking-id">Booking #${s}</div>
|
|
219
|
-
<div
|
|
220
|
-
class="status-badge"
|
|
221
|
-
style="background-color: ${Ne(n.status)}20; color: ${Ne(n.status)};"
|
|
222
|
-
>
|
|
223
|
-
${Mt(n.status)}
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
|
|
228
|
-
<div class="section">
|
|
229
|
-
<div class="section-title">Customer</div>
|
|
230
|
-
<div class="section-content">
|
|
231
|
-
<div class="customer-name">${o}</div>
|
|
232
|
-
<div class="contact-info">
|
|
233
|
-
${n.customerInfo?.email?`<div>Email: <a href="mailto:${n.customerInfo.email}">${n.customerInfo.email}</a></div>`:""}
|
|
234
|
-
${n.customerInfo?.phone?`<div>Phone: <a href="tel:${n.customerInfo.phone}">${n.customerInfo.phone}</a></div>`:""}
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
|
|
239
|
-
<div class="section">
|
|
240
|
-
<div class="section-title">Reservation Details</div>
|
|
241
|
-
<div class="grid">
|
|
242
|
-
<div class="info-card">
|
|
243
|
-
<div class="info-label">Date</div>
|
|
244
|
-
<div class="info-value">${t.date||"—"}</div>
|
|
245
|
-
</div>
|
|
246
|
-
<div class="info-card">
|
|
247
|
-
<div class="info-label">Time</div>
|
|
248
|
-
<div class="info-value">${n.startTime} - ${n.endTime}</div>
|
|
249
|
-
</div>
|
|
250
|
-
<div class="info-card">
|
|
251
|
-
<div class="info-label">Spots</div>
|
|
252
|
-
<div class="info-value">${n.spots||1} ${(n.spots||1)===1?"person":"people"}</div>
|
|
253
|
-
</div>
|
|
254
|
-
${t.resourceName?`
|
|
255
|
-
<div class="info-card">
|
|
256
|
-
<div class="info-label">Resource</div>
|
|
257
|
-
<div class="info-value">${t.resourceName}</div>
|
|
258
|
-
</div>
|
|
259
|
-
`:""}
|
|
260
|
-
${t.agendaName?`
|
|
261
|
-
<div class="info-card">
|
|
262
|
-
<div class="info-label">Service</div>
|
|
263
|
-
<div class="info-value">${t.agendaName}</div>
|
|
264
|
-
</div>
|
|
265
|
-
`:""}
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
${n.pricingOption?`
|
|
270
|
-
<div class="section">
|
|
271
|
-
<div class="section-title">Package</div>
|
|
272
|
-
<div class="section-content">
|
|
273
|
-
<div class="package-row">
|
|
274
|
-
<div>
|
|
275
|
-
<div class="package-name">${n.pricingOption.name}</div>
|
|
276
|
-
<div class="package-duration">${St(n.pricingOption.duration)}</div>
|
|
277
|
-
</div>
|
|
278
|
-
<div class="package-price">${P(n.pricingOption.price)}</div>
|
|
279
|
-
</div>
|
|
280
|
-
</div>
|
|
281
|
-
</div>
|
|
282
|
-
`:""}
|
|
283
|
-
|
|
284
|
-
<div class="section">
|
|
285
|
-
<div class="section-title">Payment Summary</div>
|
|
286
|
-
<div class="section-content">
|
|
287
|
-
<div class="payment-row">
|
|
288
|
-
<span class="payment-label">Base price</span>
|
|
289
|
-
<span class="payment-value">${P(n.reservationBasePrice)}</span>
|
|
290
|
-
</div>
|
|
291
|
-
${n.reservationAddOnsPrice?`
|
|
292
|
-
<div class="payment-row">
|
|
293
|
-
<span class="payment-label">Add-ons</span>
|
|
294
|
-
<span class="payment-value">${P(n.reservationAddOnsPrice)}</span>
|
|
295
|
-
</div>
|
|
296
|
-
`:""}
|
|
297
|
-
${n.discount?`
|
|
298
|
-
<div class="payment-row">
|
|
299
|
-
<span class="payment-label">Discount</span>
|
|
300
|
-
<span class="payment-value green">-${P(n.discount)}</span>
|
|
301
|
-
</div>
|
|
302
|
-
`:""}
|
|
303
|
-
|
|
304
|
-
<div class="payment-divider"></div>
|
|
305
|
-
|
|
306
|
-
<div class="payment-row payment-total">
|
|
307
|
-
<span>Reservation Total</span>
|
|
308
|
-
<span>${P(n.reservationPrice)}</span>
|
|
309
|
-
</div>
|
|
310
|
-
|
|
311
|
-
${n.amountPaid!==void 0||n.amountDue!==void 0?`
|
|
312
|
-
<div class="payment-divider"></div>
|
|
313
|
-
|
|
314
|
-
${n.amountPaid!==void 0?`
|
|
315
|
-
<div class="payment-row">
|
|
316
|
-
<span class="payment-label">Amount paid</span>
|
|
317
|
-
<span class="payment-value green">${P(n.amountPaid)}</span>
|
|
318
|
-
</div>
|
|
319
|
-
`:""}
|
|
320
|
-
|
|
321
|
-
${n.amountDue!==void 0&&n.amountDue>0?`
|
|
322
|
-
<div class="payment-row">
|
|
323
|
-
<span class="payment-label">Amount due</span>
|
|
324
|
-
<span class="payment-value orange">${P(n.amountDue)}</span>
|
|
325
|
-
</div>
|
|
326
|
-
`:""}
|
|
327
|
-
`:""}
|
|
328
|
-
</div>
|
|
329
|
-
</div>
|
|
330
|
-
|
|
331
|
-
<div class="footer">
|
|
332
|
-
<p>Generated on ${a}</p>
|
|
333
|
-
${t.companyName?`<p>${t.companyName}</p>`:""}
|
|
334
|
-
</div>
|
|
335
|
-
</body>
|
|
336
|
-
</html>
|
|
337
|
-
`,l=window.open("","_blank");l&&(l.document.write(c),l.document.close(),l.onload=()=>{l.print()})},$t={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},It={class:"grid gap-2"},Tt={class:"grid gap-2"},Rt={class:"grid gap-2"},jt=e.defineComponent({__name:"CancelReservationDialog",emits:["confirm"],setup(n,{expose:t,emit:o}){const{config:s}=R.useModule(),{sendMail:a}=R.useMailer(s.mailAccount),c=o,l=e.ref(!1),d=e.ref(!1),u=e.ref(""),f=e.ref(""),r=e.ref(""),i=m=>{d.value=!s.mailAccount,l.value=!0,m&&(u.value=m.customerInfo?.email,f.value="Cancellation of your reservation - "+new Date(m.date)?.toDateString(),r.value=`Dear ${m.customerInfo?.firstName??""} ${m.customerInfo?.lastName??""},
|
|
338
|
-
|
|
339
|
-
We are writing to inform you that your reservation scheduled for ${new Date(m.date)?.toDateString()} at ${m.startTime} has been cancelled.
|
|
340
|
-
|
|
341
|
-
Please accept our sincere apologies for any inconvenience this may cause. We would be happy to help you find an alternative time that works for you.`)},h=()=>{if(!d.value){if(!u.value||!f.value||!r.value)return alert("Please fill in all the fields.");a({to:u.value,subject:f.value,body:r.value})}l.value=!1;const{$confetti:m}=useNuxtApp();m(),c("confirm")};return t({openDialog:i}),(m,p)=>{const v=e.resolveComponent("DialogTitle"),_=e.resolveComponent("DialogDescription"),w=e.resolveComponent("DialogHeader"),S=e.resolveComponent("Checkbox"),k=e.resolveComponent("Label"),b=e.resolveComponent("Input"),V=e.resolveComponent("Textarea"),T=e.resolveComponent("Button"),I=e.resolveComponent("DialogFooter"),N=e.resolveComponent("DialogScrollContent"),E=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(E,{open:l.value,"onUpdate:open":p[5]||(p[5]=C=>l.value=C)},{default:e.withCtx(()=>[e.createVNode(N,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[...p[6]||(p[6]=[e.createTextVNode(" Cancel Reservation ",-1)])]),_:1}),e.createVNode(_)]),_:1}),e.createElementVNode("div",$t,[e.createVNode(S,{modelValue:d.value,"onUpdate:modelValue":p[0]||(p[0]=C=>d.value=C),id:"cancel-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(s).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(k,{for:"cancel-dialog-skip-mail",class:"py-4 pl-2 pr-4"},{default:e.withCtx(()=>[...p[7]||(p[7]=[e.createTextVNode("Do not send email to customer",-1)])]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["grid gap-4 py-4",{"opacity-50":d.value}])},[e.createElementVNode("div",It,[e.createVNode(k,{for:"cancel-dialog-email"},{default:e.withCtx(()=>[...p[8]||(p[8]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(b,{modelValue:u.value,"onUpdate:modelValue":p[1]||(p[1]=C=>u.value=C),disabled:d.value,id:"cancel-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Tt,[e.createVNode(k,{for:"cancel-dialog-subject"},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(b,{modelValue:f.value,"onUpdate:modelValue":p[2]||(p[2]=C=>f.value=C),disabled:d.value,id:"cancel-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Rt,[e.createVNode(k,{for:"cancel-dialog-body"},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode(V,{modelValue:r.value,"onUpdate:modelValue":p[3]||(p[3]=C=>r.value=C),disabled:d.value,id:"cancel-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode(I,null,{default:e.withCtx(()=>[e.createVNode(T,{variant:"outline",onClick:p[4]||(p[4]=C=>l.value=!1)},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(T,{variant:"destructive",onClick:h},{default:e.withCtx(()=>[...p[12]||(p[12]=[e.createTextVNode("Cancel reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),zt=e.defineComponent({__name:"TransferReservationDialog",setup(n,{expose:t}){const{config:o}=R.useModule(),s=e.ref(!1);return t({openDialog:()=>{s.value=!0}}),(c,l)=>{const d=e.resolveComponent("DialogTitle"),u=e.resolveComponent("DialogDescription"),f=e.resolveComponent("DialogHeader"),r=e.resolveComponent("Button"),i=e.resolveComponent("DialogFooter"),h=e.resolveComponent("DialogScrollContent"),m=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(m,{open:s.value,"onUpdate:open":l[2]||(l[2]=p=>s.value=p)},{default:e.withCtx(()=>[e.createVNode(h,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode(" Transfer Reservation ",-1)])]),_:1}),e.createVNode(u)]),_:1}),l[6]||(l[6]=e.createElementVNode("div",{class:"py-4"},null,-1)),e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(r,{variant:"outline",onClick:l[0]||(l[0]=p=>s.value=!1)},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(r,{onClick:l[1]||(l[1]=p=>s.value=!1)},{default:e.withCtx(()=>[...l[5]||(l[5]=[e.createTextVNode("Transfer reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),Ot={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},Lt={class:"grid gap-2"},Pt={class:"grid gap-2"},Ut={class:"grid gap-2"},Wt=e.defineComponent({__name:"ApproveReservationDialog",emits:["confirm"],setup(n,{expose:t,emit:o}){const{config:s}=R.useModule(),{sendMail:a}=R.useMailer(s.mailAccount),c=o,l=e.ref(!1),d=e.ref("approve"),u=e.ref(!1),f=e.ref(""),r=e.ref(""),i=e.ref(""),h=(p,v)=>{u.value=!s.mailAccount,l.value=!0,p&&(v||(v="approve"),d.value=v,f.value=p.customerInfo?.email,r.value="Confirmation: Your reservation for "+new Date(p.date)?.toDateString(),i.value=`Dear ${p.customerInfo?.firstName??""} ${p.customerInfo?.lastName??""},
|
|
342
|
-
|
|
343
|
-
This email confirms your reservation for ${new Date(p.date)?.toDateString()} at ${p.startTime}.
|
|
344
|
-
|
|
345
|
-
We've got everything ready for you and look forward to your visit! If you need to make any changes or have special requests, please let us know.`)},m=()=>{if(!u.value){if(!f.value||!r.value||!i.value)return alert("Please fill in all the fields.");a({to:f.value,subject:r.value,body:i.value})}l.value=!1;const{$confetti:p}=useNuxtApp();p(),c("confirm")};return t({openDialog:h}),(p,v)=>{const _=e.resolveComponent("DialogTitle"),w=e.resolveComponent("DialogDescription"),S=e.resolveComponent("DialogHeader"),k=e.resolveComponent("Checkbox"),b=e.resolveComponent("Label"),V=e.resolveComponent("Input"),T=e.resolveComponent("Textarea"),I=e.resolveComponent("Button"),N=e.resolveComponent("DialogFooter"),E=e.resolveComponent("DialogScrollContent"),C=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(C,{open:l.value,"onUpdate:open":v[5]||(v[5]=A=>l.value=A)},{default:e.withCtx(()=>[e.createVNode(E,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value==="approve"?"Approve Reservation":"Resend Confirmation Email"),1)]),_:1}),e.createVNode(w)]),_:1}),e.createElementVNode("div",Ot,[e.createVNode(k,{modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=A=>u.value=A),id:"reject-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(s).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(b,{for:"reject-dialog-skip-mail",class:"py-4 pl-2 pr-4"},{default:e.withCtx(()=>[...v[6]||(v[6]=[e.createTextVNode("Do not send email to customer",-1)])]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["grid gap-4 py-4",{"opacity-50":u.value}])},[e.createElementVNode("div",Lt,[e.createVNode(b,{for:"approve-dialog-email"},{default:e.withCtx(()=>[...v[7]||(v[7]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(V,{modelValue:f.value,"onUpdate:modelValue":v[1]||(v[1]=A=>f.value=A),disabled:u.value,id:"approve-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Pt,[e.createVNode(b,{for:"approve-dialog-subject"},{default:e.withCtx(()=>[...v[8]||(v[8]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(V,{modelValue:r.value,"onUpdate:modelValue":v[2]||(v[2]=A=>r.value=A),disabled:u.value,id:"approve-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Ut,[e.createVNode(b,{for:"approve-dialog-body"},{default:e.withCtx(()=>[...v[9]||(v[9]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":v[3]||(v[3]=A=>i.value=A),disabled:u.value,id:"approve-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(I,{variant:"outline",onClick:v[4]||(v[4]=A=>l.value=!1)},{default:e.withCtx(()=>[...v[10]||(v[10]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(I,{onClick:m},{default:e.withCtx(()=>[...v[11]||(v[11]=[e.createTextVNode("Approve reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),Ht={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},Kt={class:"grid gap-2"},Gt={class:"grid gap-2"},Yt={class:"grid gap-2"},Qt=e.defineComponent({__name:"RejectReservationDialog",emits:["confirm"],setup(n,{expose:t,emit:o}){const{config:s}=R.useModule(),{sendMail:a}=R.useMailer(s.mailAccount),c=o,l=e.ref(!1),d=e.ref(!1),u=e.ref(""),f=e.ref(""),r=e.ref(""),i=m=>{d.value=!s.mailAccount,l.value=!0,m&&(u.value=m.customerInfo?.email,f.value="Regarding your reservation request for "+new Date(m.date)?.toDateString(),r.value=`Dear ${m.customerInfo?.firstName??""} ${m.customerInfo?.lastName??""},
|
|
346
|
-
|
|
347
|
-
Thank you for your interest in booking with us. Unfortunately, we are unable to confirm your request for ${new Date(m.date)?.toDateString()} at ${m.startTime}.
|
|
348
|
-
|
|
349
|
-
We would love to see you another time!`)},h=()=>{if(!d.value){if(!u.value||!f.value||!r.value)return alert("Please fill in all the fields.");a({to:u.value,subject:f.value,body:r.value})}l.value=!1;const{$confetti:m}=useNuxtApp();m(),c("confirm")};return t({openDialog:i}),(m,p)=>{const v=e.resolveComponent("DialogTitle"),_=e.resolveComponent("DialogDescription"),w=e.resolveComponent("DialogHeader"),S=e.resolveComponent("Checkbox"),k=e.resolveComponent("Label"),b=e.resolveComponent("Input"),V=e.resolveComponent("Textarea"),T=e.resolveComponent("Button"),I=e.resolveComponent("DialogFooter"),N=e.resolveComponent("DialogScrollContent"),E=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(E,{open:l.value,"onUpdate:open":p[5]||(p[5]=C=>l.value=C)},{default:e.withCtx(()=>[e.createVNode(N,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[...p[6]||(p[6]=[e.createTextVNode(" Reject Reservation Request ",-1)])]),_:1}),e.createVNode(_)]),_:1}),e.createElementVNode("div",Ht,[e.createVNode(S,{modelValue:d.value,"onUpdate:modelValue":p[0]||(p[0]=C=>d.value=C),id:"reject-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(s).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(k,{for:"reject-dialog-skip-mail",class:"py-4 pl-2 pr-4"},{default:e.withCtx(()=>[...p[7]||(p[7]=[e.createTextVNode("Do not send email to customer",-1)])]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["grid gap-4 py-4",{"opacity-50":d.value}])},[e.createElementVNode("div",Kt,[e.createVNode(k,{for:"reject-dialog-email"},{default:e.withCtx(()=>[...p[8]||(p[8]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(b,{modelValue:u.value,"onUpdate:modelValue":p[1]||(p[1]=C=>u.value=C),disabled:d.value,id:"reject-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Gt,[e.createVNode(k,{for:"reject-dialog-subject"},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(b,{modelValue:f.value,"onUpdate:modelValue":p[2]||(p[2]=C=>f.value=C),disabled:d.value,id:"reject-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Yt,[e.createVNode(k,{for:"reject-dialog-body"},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode(V,{modelValue:r.value,"onUpdate:modelValue":p[3]||(p[3]=C=>r.value=C),disabled:d.value,id:"reject-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode(I,null,{default:e.withCtx(()=>[e.createVNode(T,{variant:"outline",onClick:p[4]||(p[4]=C=>l.value=!1)},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(T,{variant:"destructive",onClick:h},{default:e.withCtx(()=>[...p[12]||(p[12]=[e.createTextVNode("Reject reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),Jt={key:0},Xt={key:0,class:"flex items-center gap-1.5 flex-wrap"},Zt={key:0,class:"space-y-2 mb-4"},qt={class:"text-xs font-medium text-muted-foreground uppercase tracking-wide"},eo={key:0,class:"text-2xl font-bold tracking-wider"},to={key:1,class:"flex flex-wrap gap-2 mb-4"},oo={key:1,class:"text-xs text-muted-foreground mr-0.5"},no={key:2,class:"space-y-3"},so={class:"bg-muted/30 rounded-lg p-4 space-y-2"},ro={class:"text-muted-foreground flex items-center gap-1.5"},ao={class:"font-medium"},ue=e.defineComponent({__name:"OrderMetadataDisplay",props:{metadata:{default:()=>({})},schema:{default:()=>[]},displayFilter:{default:void 0},scope:{default:void 0},compact:{type:Boolean,default:!1}},setup(n,{expose:t}){const o=n,s=e.computed(()=>{if(!o.metadata)return[];const u=new Set(o.schema?.map(i=>i.key)||[]),f=(o.schema||[]).filter(i=>!(o.scope&&i.scope!==o.scope||o.displayFilter&&!o.displayFilter.includes(i.display)||o.metadata[i.key]===void 0||o.metadata[i.key]===null||i.display==="hidden"||o.metadata[i.key]===!1)).sort((i,h)=>(i.order||0)-(h.order||0)).map(i=>({...i,value:o.metadata[i.key]}));if(o.displayFilter&&!o.displayFilter.includes("field"))return f;const r=Object.entries(o.metadata).filter(([i,h])=>!u.has(i)&&h!==void 0&&h!==null&&h!==!1).map(([i,h])=>({id:`_fallback_${i}`,key:i,label:i.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/^\w/,m=>m.toUpperCase()).trim(),display:"field",scope:"order",value:typeof h=="object"?JSON.stringify(h):String(h)}));return[...f,...r]}),a=e.computed(()=>s.value.filter(u=>u.display==="highlight")),c=e.computed(()=>s.value.filter(u=>u.display==="badge")),l=e.computed(()=>s.value.filter(u=>u.display==="field")),d=e.computed(()=>s.value.length>0);return t({hasContent:d}),(u,f)=>d.value?(e.openBlock(),e.createElementBlock("div",Jt,[n.compact?(e.openBlock(),e.createElementBlock("div",Xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,r=>(e.openBlock(),e.createElementBlock("span",{key:r.id,class:e.normalizeClass(["inline-flex items-center gap-1 px-2 py-0.5 text-xs font-bold rounded-md",r.color?"":"bg-primary/10 text-primary"]),style:e.normalizeStyle(r.color?{backgroundColor:r.color+"20",color:r.color}:{})},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(D.icons)[r.icon]),{size:12})),e.createTextVNode(" "+e.toDisplayString(r.value===!0?r.label:r.value),1)],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,r=>(e.openBlock(),e.createElementBlock("span",{key:r.id,class:e.normalizeClass(["inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full",r.color?"":"bg-muted text-muted-foreground"]),style:e.normalizeStyle(r.color?{backgroundColor:r.color+"20",color:r.color}:{})},[r.icon&&e.unref(D.icons)[r.icon]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(D.icons)[r.icon]),{key:0,size:10})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.value===!0?r.label:r.value),1)],6))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.value.length?(e.openBlock(),e.createElementBlock("div",Zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:e.normalizeClass(["rounded-lg border-2 p-4 flex items-center gap-4",r.color?"":"border-primary/20 bg-primary/5"]),style:e.normalizeStyle(r.color?{borderColor:r.color+"40",backgroundColor:r.color+"08"}:{})},[e.createElementVNode("div",{class:e.normalizeClass(["h-12 w-12 rounded-xl flex items-center justify-center shrink-0",r.color?"":"bg-primary/10"]),style:e.normalizeStyle(r.color?{backgroundColor:r.color+"20"}:{})},[r.icon&&e.unref(D.icons)[r.icon]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(D.icons)[r.icon]),{key:0,size:24,style:e.normalizeStyle(r.color?{color:r.color}:{}),class:e.normalizeClass(r.color?"":"text-primary")},null,8,["style","class"])):e.createCommentVNode("",!0)],6),e.createElementVNode("div",null,[e.createElementVNode("p",qt,e.toDisplayString(r.label),1),r.value!==!0?(e.openBlock(),e.createElementBlock("p",eo,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)])],6))),128))])):e.createCommentVNode("",!0),c.value.length?(e.openBlock(),e.createElementBlock("div",to,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,r=>(e.openBlock(),e.createElementBlock("span",{key:r.id,class:e.normalizeClass(["inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-full",r.color?"":"bg-muted text-muted-foreground"]),style:e.normalizeStyle(r.color?{backgroundColor:r.color+"20",color:r.color}:{})},[r.icon&&e.unref(D.icons)[r.icon]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(D.icons)[r.icon]),{key:0,size:14})):e.createCommentVNode("",!0),r.label?(e.openBlock(),e.createElementBlock("span",oo,[e.createTextVNode(e.toDisplayString(r.label),1),r.value!==!0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(":")],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),r.value!==!0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(r.value),1)],64)):e.createCommentVNode("",!0)],6))),128))])):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",no,[f[0]||(f[0]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Additional Info",-1)),e.createElementVNode("div",so,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:"flex justify-between text-sm"},[e.createElementVNode("span",ro,[r.icon&&e.unref(D.icons)[r.icon]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(D.icons)[r.icon]),{key:0,size:14})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label),1)]),e.createElementVNode("span",ao,e.toDisplayString(r.value===!0?"✓":r.value),1)]))),128))])])):e.createCommentVNode("",!0)],64))])):e.createCommentVNode("",!0)}}),io={key:0,class:"space-y-6 py-4"},lo={class:"space-y-3"},co={class:"bg-muted/30 rounded-lg p-4 space-y-3"},uo={class:"flex items-center gap-3"},mo={class:"h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center"},po={class:"font-medium"},fo={class:"grid gap-2 text-sm"},ho={key:0,class:"flex items-center gap-2 text-muted-foreground"},go=["href"],vo={key:1,class:"flex items-center gap-2 text-muted-foreground"},xo=["href"],Co={class:"space-y-3"},yo={class:"grid grid-cols-2 gap-3"},_o={class:"bg-muted/30 rounded-lg p-3"},ko={class:"flex items-center gap-2 text-muted-foreground mb-1"},Do={class:"text-xs"},No={class:"font-medium"},bo={class:"bg-muted/30 rounded-lg p-3"},Vo={class:"flex items-center gap-2 text-muted-foreground mb-1"},wo={class:"font-medium"},Eo={key:0,class:"space-y-3"},Ao={class:"bg-muted/30 rounded-lg p-4"},Bo={class:"flex items-start justify-between"},So={class:"flex items-start gap-3"},Mo={class:"h-9 w-9 rounded-lg bg-primary/10 flex items-center justify-center mt-0.5"},Fo={class:"font-medium"},$o={class:"text-sm text-muted-foreground"},Io={class:"font-semibold"},To={class:"space-y-3"},Ro={class:"bg-muted/30 rounded-lg p-4 space-y-3"},jo={class:"space-y-2 text-sm"},zo={class:"flex justify-between"},Oo={key:0,class:"flex justify-between"},Lo={key:1,class:"flex justify-between text-green-600 dark:text-green-400"},Po={class:"flex justify-between font-semibold"},Uo={key:1,class:"space-y-2 text-sm"},Wo={key:0,class:"flex justify-between"},Ho={class:"text-muted-foreground flex items-center gap-1.5"},Ko={class:"text-green-600 dark:text-green-400"},Go={key:1,class:"flex justify-between"},Yo={class:"text-muted-foreground flex items-center gap-1.5"},Qo={class:"text-orange-600 dark:text-orange-400 font-medium"},Jo=e.defineComponent({__name:"ReservationDetailDialog",props:{agendaData:{}},emits:["cancelled","confirmed","rejected"],setup(n,{expose:t,emit:o}){const s=n,{hasPermission:a}=R.useModulePermissions(),{config:c}=R.useModule(),l=R.useFirebaseIntegration(c.project),d=e.inject("event",e.ref(null)),u=e.computed(()=>s.agendaData?.metadataSchema||[]),f=o,r=e.ref(!1),i=e.ref(null),h=e.ref(!1),m=e.useTemplateRef("cancelReservationDialog"),p=e.useTemplateRef("approveReservationDialog"),v=e.useTemplateRef("rejectReservationDialog"),_=e.useTemplateRef("transferReservationDialog"),w=y=>{i.value=y,r.value=!0},S=e.computed(()=>i.value?.customerInfo&&`${i.value.customerInfo.firstName} ${i.value.customerInfo.lastName}`.trim()||"Unknown Customer"),k=e.computed(()=>{let y=i.value?.status;const g=i.value?.reservationStatus;switch(y==="confirmed"&&["needs_approval","rejected","approved","cancelled"].includes(g)&&(y=g),y){case"pending":return{label:"Pending",class:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"};case"cancelled":return{label:"Cancelled",class:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"};case"needs_approval":return{label:"Needs Approval",class:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"};case"rejected":return{label:"Rejected",class:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"};case"approved":return{label:"Approved",class:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"};case"confirmed":return{label:"Confirmed",class:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"};default:return{label:y||"Unknown",class:"bg-muted text-muted-foreground"}}}),b=e.computed(()=>i.value?.status==="cancelled"),V=y=>y==null||typeof y!="number"?"—":`€${y?.toFixed(2)}`,T=y=>{if(!y)return"—";if(y<60)return`${y} min`;const g=Math.floor(y/60),B=y%60;return B>0?`${g}h ${B}min`:`${g}h`},I=()=>{if(!i.value)return;let y="";const g=d?.value?.date;if(g)try{y=new Date(g).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}catch{y=g}const B={date:y,resourceName:d?.value?.resource?.name};Ft(i.value,B)},N=()=>{p.value?.openDialog(i.value)},E=()=>{v.value?.openDialog(i.value)},C=()=>{p.value?.openDialog(i.value)},A=()=>{m.value?.openDialog(i.value)},H=async()=>{try{if(h.value||!i.value?.id)throw new Error("Invalid state");h.value=!0;let g=(await l.get(c.reservationsCollection,i.value.id))?.reservations||[];if(!g.find(B=>B.id===i.value.res_id))throw new Error("Reservation not found");g.find(B=>B.id===i.value.res_id).status="cancelled",await l.update(c.reservationsCollection,i.value.id,{reservations:g}),i.value.status="cancelled",W.toast.success("Reservation cancelled successfully"),f("cancelled"),r.value=!1}catch(y){console.error("Error cancelling reservation:",y),W.toast.error("Failed to cancel reservation")}finally{h.value=!1}},j=async()=>{try{if(h.value||!i.value?.id)throw new Error("Invalid state");h.value=!0;let g=(await l.get(c.reservationsCollection,i.value.id))?.reservations||[];if(!g.find(B=>B.id===i.value.res_id))throw new Error("Reservation not found");g.find(B=>B.id===i.value.res_id).status="approved",await l.update(c.reservationsCollection,i.value.id,{reservations:g}),i.value.status="approved",W.toast.success("Reservation approved successfully"),f("confirmed"),r.value=!1}catch(y){console.error("Error approving reservation:",y),W.toast.error("Failed to approve reservation")}finally{h.value=!1}},he=async()=>{try{if(h.value||!i.value?.id)throw new Error("Invalid state");h.value=!0;let g=(await l.get(c.reservationsCollection,i.value.id))?.reservations||[];if(!g.find(B=>B.id===i.value.res_id))throw new Error("Reservation not found");g.find(B=>B.id===i.value.res_id).status="rejected",await l.update(c.reservationsCollection,i.value.id,{reservations:g}),i.value.status="rejected",W.toast.success("Reservation rejected successfully"),f("rejected"),r.value=!1}catch(y){console.error("Error rejecting reservation:",y),W.toast.error("Failed to reject reservation")}finally{h.value=!1}},$=()=>{};return t({openDialog:w}),(y,g)=>{const B=e.resolveComponent("DialogTitle"),Z=e.resolveComponent("DialogDescription"),Fe=e.resolveComponent("DialogHeader"),ge=e.resolveComponent("Separator"),q=e.resolveComponent("Button"),$e=e.resolveComponent("DropdownMenuTrigger"),ee=e.resolveComponent("DropdownMenuLabel"),G=e.resolveComponent("DropdownMenuItem"),te=e.resolveComponent("DropdownMenuGroup"),ve=e.resolveComponent("DropdownMenuSeparator"),Ie=e.resolveComponent("DropdownMenuContent"),Te=e.resolveComponent("DropdownMenu"),Re=e.resolveComponent("DialogFooter"),je=e.resolveComponent("DialogScrollContent"),ze=e.resolveComponent("Dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(ze,{open:r.value,"onUpdate:open":g[0]||(g[0]=Oe=>r.value=Oe)},{default:e.withCtx(()=>[e.createVNode(je,{class:"sm:max-w-xl"},{default:e.withCtx(()=>[e.createVNode(Fe,null,{default:e.withCtx(()=>[e.createVNode(B,{class:"flex items-center gap-3"},{default:e.withCtx(()=>[g[1]||(g[1]=e.createElementVNode("span",null,"Reservation Details",-1)),e.createElementVNode("span",{class:e.normalizeClass(["px-2.5 py-1 text-xs font-medium rounded-full",k.value.class])},e.toDisplayString(k.value.label),3)]),_:1}),e.createVNode(Z,null,{default:e.withCtx(()=>[e.createTextVNode(" Booking #"+e.toDisplayString(i.value?.id?.slice(0,8)||"—"),1)]),_:1})]),_:1}),i.value?(e.openBlock(),e.createElementBlock("div",io,[e.createVNode(ue,{metadata:i.value.metadata,schema:u.value,scope:"order"},null,8,["metadata","schema"]),e.createVNode(ue,{metadata:i.value.reservationMetadata,schema:u.value,scope:"reservation"},null,8,["metadata","schema"]),e.createElementVNode("div",lo,[g[2]||(g[2]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Customer",-1)),e.createElementVNode("div",co,[e.createElementVNode("div",uo,[e.createElementVNode("div",mo,[e.createVNode(e.unref(D.User),{size:20,class:"text-primary"})]),e.createElementVNode("div",null,[e.createElementVNode("p",po,e.toDisplayString(S.value),1)])]),e.createElementVNode("div",fo,[i.value.customerInfo?.email?(e.openBlock(),e.createElementBlock("div",ho,[e.createVNode(e.unref(D.Mail),{size:14}),e.createElementVNode("a",{href:`mailto:${i.value.customerInfo.email}`,class:"hover:text-foreground transition-colors"},e.toDisplayString(i.value.customerInfo.email),9,go)])):e.createCommentVNode("",!0),i.value.customerInfo?.phone?(e.openBlock(),e.createElementBlock("div",vo,[e.createVNode(e.unref(D.Phone),{size:14}),e.createElementVNode("a",{href:`tel:${i.value.customerInfo.phone}`,class:"hover:text-foreground transition-colors"},e.toDisplayString(i.value.customerInfo.phone),9,xo)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Co,[g[4]||(g[4]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Reservation",-1)),e.createElementVNode("div",yo,[e.createElementVNode("div",_o,[e.createElementVNode("div",ko,[e.createVNode(e.unref(D.Clock),{size:14}),e.createElementVNode("span",Do,e.toDisplayString(i.value.startTime)+" - "+e.toDisplayString(i.value.endTime),1)]),e.createElementVNode("p",No,e.toDisplayString(new Date(i.value.date).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})),1)]),e.createElementVNode("div",bo,[e.createElementVNode("div",Vo,[e.createVNode(e.unref(D.Users),{size:14}),g[3]||(g[3]=e.createElementVNode("span",{class:"text-xs"},"Spots",-1))]),e.createElementVNode("p",wo,e.toDisplayString(i.value.spots||1)+" "+e.toDisplayString(i.value.spots===1?"person":"people"),1)])])]),i.value.pricingOption?(e.openBlock(),e.createElementBlock("div",Eo,[g[5]||(g[5]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Package",-1)),e.createElementVNode("div",Ao,[e.createElementVNode("div",Bo,[e.createElementVNode("div",So,[e.createElementVNode("div",Mo,[e.createVNode(e.unref(D.Tag),{size:18,class:"text-primary"})]),e.createElementVNode("div",null,[e.createElementVNode("p",Fo,e.toDisplayString(i.value.pricingOption.name),1),e.createElementVNode("p",$o,e.toDisplayString(T(i.value.pricingOption.duration)),1)])]),e.createElementVNode("p",Io,e.toDisplayString(V(i.value.pricingOption.price)),1)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",To,[g[12]||(g[12]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Payment",-1)),e.createElementVNode("div",Ro,[e.createElementVNode("div",jo,[e.createElementVNode("div",zo,[g[6]||(g[6]=e.createElementVNode("span",{class:"text-muted-foreground"},"Base price",-1)),e.createElementVNode("span",null,e.toDisplayString(V(i.value.reservationBasePrice)),1)]),i.value.reservationAddOnsPrice?(e.openBlock(),e.createElementBlock("div",Oo,[g[7]||(g[7]=e.createElementVNode("span",{class:"text-muted-foreground"},"Add-ons",-1)),e.createElementVNode("span",null,e.toDisplayString(V(i.value.reservationAddOnsPrice)),1)])):e.createCommentVNode("",!0),i.value.discount?(e.openBlock(),e.createElementBlock("div",Lo,[g[8]||(g[8]=e.createElementVNode("span",null,"Discount",-1)),e.createElementVNode("span",null,"-"+e.toDisplayString(V(i.value.discount)),1)])):e.createCommentVNode("",!0)]),e.createVNode(ge),e.createElementVNode("div",Po,[g[9]||(g[9]=e.createElementVNode("span",null,"Reservation Total",-1)),e.createElementVNode("span",null,e.toDisplayString(V(i.value.reservationPrice)),1)]),i.value.amountPaid!==void 0||i.value.amountDue!==void 0?(e.openBlock(),e.createBlock(ge,{key:0})):e.createCommentVNode("",!0),i.value.amountPaid!==void 0||i.value.amountDue!==void 0?(e.openBlock(),e.createElementBlock("div",Uo,[i.value.amountPaid!==void 0?(e.openBlock(),e.createElementBlock("div",Wo,[e.createElementVNode("span",Ho,[e.createVNode(e.unref(D.CreditCard),{size:14}),g[10]||(g[10]=e.createTextVNode(" Amount paid ",-1))]),e.createElementVNode("span",Ko,e.toDisplayString(V(i.value.amountPaid)),1)])):e.createCommentVNode("",!0),i.value.amountDue!==void 0&&i.value.amountDue>0?(e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("span",Yo,[e.createVNode(e.unref(D.Receipt),{size:14}),g[11]||(g[11]=e.createTextVNode(" Amount due ",-1))]),e.createElementVNode("span",Qo,e.toDisplayString(V(i.value.amountDue)),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createVNode(Re,{class:"gap-2 sm:justify-between"},{default:e.withCtx(()=>[i.value.status==="confirmed"&&i.value.reservationStatus==="needs_approval"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(q,{variant:"destructive",onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(D.Ban),{size:16}),g[13]||(g[13]=e.createTextVNode(" Reject Reservation ",-1))]),_:1}),e.createVNode(q,{onClick:N},{default:e.withCtx(()=>[e.createVNode(e.unref(D.ClockCheck),{size:16}),g[14]||(g[14]=e.createTextVNode(" Approve Reservation ",-1))]),_:1})],64)):i.value.status==="confirmed"&&i.value.reservationStatus==="approved"?(e.openBlock(),e.createBlock(Te,{key:1},{default:e.withCtx(()=>[e.createVNode($e,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(q,{variant:"outline",class:"gap-2"},{default:e.withCtx(()=>[e.createVNode(e.unref(D.MoreHorizontal),{size:16}),g[15]||(g[15]=e.createTextVNode(" Actions ",-1))]),_:1})]),_:1}),e.createVNode(Ie,{class:"w-60",align:"start"},{default:e.withCtx(()=>[e.createVNode(ee,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...g[16]||(g[16]=[e.createTextVNode(" Reservation Actions ",-1)])]),_:1}),e.createVNode(te,null,{default:e.withCtx(()=>[e.createVNode(G,{onClick:I,class:"gap-2 cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(D.Download),{size:16,class:"text-muted-foreground"}),g[17]||(g[17]=e.createElementVNode("span",null,"Download PDF",-1))]),_:1})]),_:1}),e.createVNode(ve),e.createVNode(te,null,{default:e.withCtx(()=>[e.createVNode(ee,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...g[18]||(g[18]=[e.createTextVNode(" Communication ",-1)])]),_:1}),e.createVNode(G,{onClick:C,class:"gap-2 cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(D.MailCheck),{size:16,class:"text-muted-foreground"}),g[19]||(g[19]=e.createElementVNode("span",null,"(Re)send Confirmation Mail",-1))]),_:1})]),_:1}),e.unref(a)("manage-reservations")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(ve),e.createVNode(te,null,{default:e.withCtx(()=>[e.createVNode(ee,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...g[20]||(g[20]=[e.createTextVNode(" Cancellation ",-1)])]),_:1}),e.createVNode(G,{onClick:A,class:"gap-2 cursor-pointer",variant:"destructive",disabled:b.value},{default:e.withCtx(()=>[e.createVNode(e.unref(D.XCircle),{size:16}),g[21]||(g[21]=e.createElementVNode("span",null,"Cancel Reservation",-1))]),_:1},8,["disabled"]),i.value?.reservationPrice&&i.value.reservationPrice>0?(e.openBlock(),e.createBlock(G,{key:0,onClick:$,class:"gap-2 cursor-pointer text-orange-600 dark:text-orange-400 focus:text-orange-600 dark:focus:text-orange-400",disabled:b.value},{default:e.withCtx(()=>[e.createVNode(e.unref(D.Gift),{class:"text-inherit",size:16}),g[22]||(g[22]=e.createElementVNode("span",null,"Cancel & Send Coupon",-1))]),_:1},8,["disabled"])):e.createCommentVNode("",!0)]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1},8,["open"]),e.createVNode(jt,{ref_key:"cancelReservationDialog",ref:m,onConfirm:H},null,512),e.createVNode(Wt,{ref_key:"approveReservationDialog",ref:p,onConfirm:j},null,512),e.createVNode(Qt,{ref_key:"rejectReservationDialog",ref:v,onConfirm:he},null,512),e.createVNode(zt,{ref_key:"transferReservationDialog",ref:_},null,512)],64)}}});exports.Fuse=L;exports._sfc_main=ue;exports._sfc_main$1=Jo;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("@oneclick.dev/cms-kit"),m=require("lucide-vue-next");require("./index-BuzLn4Km.js");const _=require("@oneclick.dev/cms-kit/charts"),u=require("./index-DQYBP8Js.js"),E=require("./index-C4YUVWzJ.js");function g(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:Math.round(t).toString()}function C(t){return`${(t*100).toFixed(1)}%`}function b(t){return t.toFixed(1)}function z(t){return t<=3?"text-emerald-600 dark:text-emerald-400":t<=10?"text-blue-600 dark:text-blue-400":t<=20?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}function $(t){return t<=3?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":t<=10?"bg-blue-500/10 text-blue-600 dark:text-blue-400":t<=20?"bg-amber-500/10 text-amber-600 dark:text-amber-400":"bg-red-500/10 text-red-600 dark:text-red-400"}function S(t){try{return new URL(t).pathname}catch{return t}}const P={class:"grid grid-cols-2 @3xl:grid-cols-4 gap-4"},M={class:"flex items-center flex-wrap gap-2 text-xs text-muted-foreground"},F={class:"text-2xl font-bold tabular-nums"},L={class:"flex items-center flex-wrap gap-2 text-xs text-muted-foreground"},R={class:"text-2xl font-bold tabular-nums"},q={class:"flex items-center flex-wrap gap-2 text-xs text-muted-foreground"},A={class:"text-2xl font-bold tabular-nums"},U={class:"flex items-center flex-wrap gap-2 text-xs text-muted-foreground"},K=e.defineComponent({__name:"SeoKpiCards",props:{totals:{}},setup(t){return(c,a)=>{const n=e.resolveComponent("Card");return e.openBlock(),e.createElementBlock("div",P,[e.createVNode(n,{class:"p-4 space-y-1"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[e.createVNode(e.unref(m.MousePointerClick),{class:"size-3.5 shrink-0"}),a[0]||(a[0]=e.createTextVNode(" Total Clicks ",-1))]),e.createElementVNode("p",F,e.toDisplayString(e.unref(g)(t.totals.clicks)),1)]),_:1}),e.createVNode(n,{class:"p-4 space-y-1"},{default:e.withCtx(()=>[e.createElementVNode("div",L,[e.createVNode(e.unref(m.Eye),{class:"size-3.5 shrink-0"}),a[1]||(a[1]=e.createTextVNode(" Total Impressions ",-1))]),e.createElementVNode("p",R,e.toDisplayString(e.unref(g)(t.totals.impressions)),1)]),_:1}),e.createVNode(n,{class:"p-4 space-y-1"},{default:e.withCtx(()=>[e.createElementVNode("div",q,[e.createVNode(e.unref(m.TrendingUp),{class:"size-3.5 shrink-0"}),a[2]||(a[2]=e.createTextVNode(" Average CTR ",-1))]),e.createElementVNode("p",A,e.toDisplayString(e.unref(C)(t.totals.ctr)),1)]),_:1}),e.createVNode(n,{class:"p-4 space-y-1"},{default:e.withCtx(()=>[e.createElementVNode("div",U,[e.createVNode(e.unref(m.Hash),{class:"size-3.5 shrink-0"}),a[3]||(a[3]=e.createTextVNode(" Avg Position ",-1))]),e.createElementVNode("p",{class:e.normalizeClass(["text-2xl font-bold tabular-nums",e.unref(z)(t.totals.avgPosition)])},e.toDisplayString(e.unref(b)(t.totals.avgPosition)),3)]),_:1})])}}}),O={class:"flex items-center gap-4"},I={class:"flex items-center gap-2"},H={class:"text-xs"},X={class:"flex items-center gap-2"},j={class:"text-xs"},G={class:"flex items-center gap-2"},J={class:"text-xs"},Q={class:"flex items-center gap-2"},W={class:"text-xs"},Y={key:0,class:"flex h-3 rounded-full overflow-hidden mt-3"},Z=e.defineComponent({__name:"SeoRankingDistribution",props:{keywords:{}},setup(t){const c=t,a=e.computed(()=>c.keywords.filter(s=>s.position<=3).length),n=e.computed(()=>c.keywords.filter(s=>s.position<=10).length),d=e.computed(()=>c.keywords.filter(s=>s.position<=20).length);return(s,o)=>{const l=e.resolveComponent("Card");return e.openBlock(),e.createBlock(l,{class:"p-4"},{default:e.withCtx(()=>[o[8]||(o[8]=e.createElementVNode("h3",{class:"text-sm font-medium mb-3"},"Keyword Ranking Distribution",-1)),e.createElementVNode("div",O,[e.createElementVNode("div",I,[o[1]||(o[1]=e.createElementVNode("span",{class:"inline-block w-3 h-3 rounded-full bg-emerald-500"},null,-1)),e.createElementVNode("span",H,[o[0]||(o[0]=e.createTextVNode("Top 3: ",-1)),e.createElementVNode("strong",null,e.toDisplayString(a.value),1)])]),e.createElementVNode("div",X,[o[3]||(o[3]=e.createElementVNode("span",{class:"inline-block w-3 h-3 rounded-full bg-blue-500"},null,-1)),e.createElementVNode("span",j,[o[2]||(o[2]=e.createTextVNode("Top 10: ",-1)),e.createElementVNode("strong",null,e.toDisplayString(n.value),1)])]),e.createElementVNode("div",G,[o[5]||(o[5]=e.createElementVNode("span",{class:"inline-block w-3 h-3 rounded-full bg-amber-500"},null,-1)),e.createElementVNode("span",J,[o[4]||(o[4]=e.createTextVNode("Top 20: ",-1)),e.createElementVNode("strong",null,e.toDisplayString(d.value),1)])]),e.createElementVNode("div",Q,[o[7]||(o[7]=e.createElementVNode("span",{class:"inline-block w-3 h-3 rounded-full bg-red-500"},null,-1)),e.createElementVNode("span",W,[o[6]||(o[6]=e.createTextVNode("20+: ",-1)),e.createElementVNode("strong",null,e.toDisplayString(t.keywords.length-d.value),1)])])]),t.keywords.length>0?(e.openBlock(),e.createElementBlock("div",Y,[e.createElementVNode("div",{class:"bg-emerald-500 transition-all",style:e.normalizeStyle({width:`${a.value/t.keywords.length*100}%`})},null,4),e.createElementVNode("div",{class:"bg-blue-500 transition-all",style:e.normalizeStyle({width:`${(n.value-a.value)/t.keywords.length*100}%`})},null,4),e.createElementVNode("div",{class:"bg-amber-500 transition-all",style:e.normalizeStyle({width:`${(d.value-n.value)/t.keywords.length*100}%`})},null,4),e.createElementVNode("div",{class:"bg-red-500 transition-all",style:e.normalizeStyle({width:`${(t.keywords.length-d.value)/t.keywords.length*100}%`})},null,4)])):e.createCommentVNode("",!0)]),_:1})}}}),ee={key:0,class:"h-48"},te={key:1,class:"text-xs text-muted-foreground text-center py-10"},oe=e.defineComponent({__name:"SeoClicksChart",props:{trends:{}},setup(t){const c=t,a=(o,l)=>l,n=o=>o.clicks||0,d=o=>{const l=c.trends[Math.round(o)];if(!l)return"";const i=new Date(l.date);return`${i.getDate()}/${i.getMonth()+1}`},s=o=>{const l=c.trends[Math.round(Number(o))];return l?new Date(l.date).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"}):""};return(o,l)=>{const i=e.resolveComponent("Card");return e.openBlock(),e.createBlock(i,{class:"p-4"},{default:e.withCtx(()=>[l[0]||(l[0]=e.createElementVNode("h3",{class:"text-sm font-medium mb-3"},"Clicks Over Time",-1)),t.trends.length>1?(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(e.unref(u.S),{data:t.trends,height:180},{default:e.withCtx(()=>[e.createVNode(e.unref(E.C),{x:a,y:n,color:"#3b82f6",opacity:.1,curveType:"monotoneX"}),e.createVNode(e.unref(E.C$1),{x:a,y:n,color:"#3b82f6",curveType:"monotoneX"}),e.createVNode(e.unref(u.C),{type:"x",tickFormat:d,numTicks:5,gridLine:!1}),e.createVNode(e.unref(u.C),{type:"y",gridLine:!0,numTicks:4}),e.createVNode(e.unref(u.A),{template:y=>e.unref(_.componentToString)(e.unref(_.ChartTooltipContent),{namePayload:[{name:"Clicks",value:y.clicks,color:"#3b82f6"}],labelFormatter:s})},null,8,["template"]),e.createVNode(e.unref(u.z))]),_:1},8,["data"])])):(e.openBlock(),e.createElementBlock("p",te,"Not enough data for chart"))]),_:1})}}}),ne={key:0,class:"h-48"},se={key:1,class:"text-xs text-muted-foreground text-center py-10"},re=e.defineComponent({__name:"SeoImpressionsChart",props:{trends:{}},setup(t){const c=t,a=(o,l)=>l,n=o=>o.impressions||0,d=o=>{const l=c.trends[Math.round(o)];if(!l)return"";const i=new Date(l.date);return`${i.getDate()}/${i.getMonth()+1}`},s=o=>{const l=c.trends[Math.round(Number(o))];return l?new Date(l.date).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"}):""};return(o,l)=>{const i=e.resolveComponent("Card");return e.openBlock(),e.createBlock(i,{class:"p-4"},{default:e.withCtx(()=>[l[0]||(l[0]=e.createElementVNode("h3",{class:"text-sm font-medium mb-3"},"Impressions Over Time",-1)),t.trends.length>1?(e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(e.unref(u.S),{data:t.trends,height:180},{default:e.withCtx(()=>[e.createVNode(e.unref(E.C),{x:a,y:n,color:"#8b5cf6",opacity:.1,curveType:"monotoneX"}),e.createVNode(e.unref(E.C$1),{x:a,y:n,color:"#8b5cf6",curveType:"monotoneX"}),e.createVNode(e.unref(u.C),{type:"x",tickFormat:d,numTicks:5,gridLine:!1}),e.createVNode(e.unref(u.C),{type:"y",gridLine:!0,numTicks:4}),e.createVNode(e.unref(u.A),{template:y=>e.unref(_.componentToString)(e.unref(_.ChartTooltipContent),{namePayload:[{name:"Impressions",value:y.impressions,color:"#8b5cf6"}],labelFormatter:s})},null,8,["template"]),e.createVNode(e.unref(u.z))]),_:1},8,["data"])])):(e.openBlock(),e.createElementBlock("p",se,"Not enough data for chart"))]),_:1})}}}),le={class:"divide-y"},ae={key:0,class:"p-8 text-center text-sm text-muted-foreground"},ce={class:"flex items-start @sm:items-center gap-3"},de={class:"text-xs font-medium text-muted-foreground w-6 text-right shrink-0 mt-0.5 @sm:mt-0"},ie={class:"flex-1 min-w-0"},me={class:"flex flex-col @sm:flex-row @sm:items-center gap-2 @sm:gap-3"},ue={class:"flex-1 min-w-0"},pe={class:"text-sm font-medium truncate"},fe={class:"h-1.5 rounded-full bg-muted overflow-hidden mt-1.5 max-w-xs"},xe={class:"flex items-center gap-3 @sm:gap-4 text-xs text-muted-foreground @sm:shrink-0 flex-wrap"},ge={class:"flex items-center gap-1"},ye={class:"flex items-center gap-1"},ke=e.defineComponent({__name:"SeoKeywordsTab",props:{keywords:{}},setup(t){const c=t,a=e.computed(()=>Math.max(...c.keywords.map(n=>n.clicks),1));return(n,d)=>(e.openBlock(),e.createElementBlock("div",le,[t.keywords.length===0?(e.openBlock(),e.createElementBlock("div",ae," No keyword data found for this period. ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.keywords,(s,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"px-4 py-3 hover:bg-muted/30 transition-colors"},[e.createElementVNode("div",ce,[e.createElementVNode("span",de,e.toDisplayString(o+1)+".",1),e.createElementVNode("div",ie,[e.createElementVNode("div",me,[e.createElementVNode("div",ue,[e.createElementVNode("p",pe,e.toDisplayString(s.query),1),e.createElementVNode("div",fe,[e.createElementVNode("div",{class:"h-full rounded-full bg-blue-500/70",style:e.normalizeStyle({width:`${s.clicks/a.value*100}%`})},null,4)])]),e.createElementVNode("div",xe,[e.createElementVNode("span",ge,[e.createVNode(e.unref(m.MousePointerClick),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(e.unref(g)(s.clicks)),1)]),e.createElementVNode("span",ye,[e.createVNode(e.unref(m.Eye),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(e.unref(g)(s.impressions)),1)]),e.createElementVNode("span",null,e.toDisplayString(e.unref(C)(s.ctr)),1),e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium",e.unref($)(s.position)])}," #"+e.toDisplayString(e.unref(b)(s.position)),3)])])])])]))),128))]))}}),ve={class:"divide-y"},Ne={key:0,class:"p-8 text-center text-sm text-muted-foreground"},Ve={class:"flex items-start @sm:items-center gap-3"},he={class:"text-xs font-medium text-muted-foreground w-6 text-right shrink-0 mt-0.5 @sm:mt-0"},_e={class:"flex-1 min-w-0"},Ee={class:"flex flex-col @sm:flex-row @sm:items-center gap-2 @sm:gap-3"},be={class:"flex-1 min-w-0"},we=["title"],Ce={class:"h-1.5 rounded-full bg-muted overflow-hidden mt-1.5 max-w-xs"},$e={class:"flex items-center gap-3 @sm:gap-4 text-xs text-muted-foreground @sm:shrink-0 flex-wrap"},Be={class:"flex items-center gap-1"},Se={class:"flex items-center gap-1"},Te=e.defineComponent({__name:"SeoPagesTab",props:{pages:{}},setup(t){const c=t,a=e.computed(()=>Math.max(...c.pages.map(n=>n.clicks),1));return(n,d)=>(e.openBlock(),e.createElementBlock("div",ve,[t.pages.length===0?(e.openBlock(),e.createElementBlock("div",Ne," No page data found for this period. ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pages,(s,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"px-4 py-3 hover:bg-muted/30 transition-colors"},[e.createElementVNode("div",Ve,[e.createElementVNode("span",he,e.toDisplayString(o+1)+".",1),e.createElementVNode("div",_e,[e.createElementVNode("div",Ee,[e.createElementVNode("div",be,[e.createElementVNode("p",{class:"text-sm font-medium truncate",title:s.page},e.toDisplayString(e.unref(S)(s.page)),9,we),e.createElementVNode("div",Ce,[e.createElementVNode("div",{class:"h-full rounded-full bg-violet-500/70",style:e.normalizeStyle({width:`${s.clicks/a.value*100}%`})},null,4)])]),e.createElementVNode("div",$e,[e.createElementVNode("span",Be,[e.createVNode(e.unref(m.MousePointerClick),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(e.unref(g)(s.clicks)),1)]),e.createElementVNode("span",Se,[e.createVNode(e.unref(m.Eye),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(e.unref(g)(s.impressions)),1)]),e.createElementVNode("span",null,e.toDisplayString(e.unref(C)(s.ctr)),1),e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium",e.unref($)(s.position)])}," #"+e.toDisplayString(e.unref(b)(s.position)),3)])])])])]))),128))]))}}),De={class:"divide-y"},ze={key:0,class:"p-8 text-center text-sm text-muted-foreground"},Pe={class:"flex items-start gap-3"},Me={class:"text-xs font-medium text-muted-foreground w-6 text-right shrink-0 mt-0.5"},Fe={class:"flex-1 min-w-0"},Le={class:"flex flex-col @sm:flex-row @sm:items-center gap-2 @sm:gap-3"},Re={class:"flex-1 min-w-0 space-y-0.5"},qe={class:"text-sm font-medium"},Ae=["title"],Ue={class:"flex items-center gap-3 @sm:gap-4 text-xs text-muted-foreground @sm:shrink-0 flex-wrap"},Ke={class:"flex items-center gap-1"},Oe=e.defineComponent({__name:"SeoMappingTab",props:{queryPages:{}},setup(t){return(c,a)=>(e.openBlock(),e.createElementBlock("div",De,[t.queryPages.length===0?(e.openBlock(),e.createElementBlock("div",ze," No query-page data found for this period. ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.queryPages,(n,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"px-4 py-3 hover:bg-muted/30 transition-colors"},[e.createElementVNode("div",Pe,[e.createElementVNode("span",Me,e.toDisplayString(d+1)+".",1),e.createElementVNode("div",Fe,[e.createElementVNode("div",Le,[e.createElementVNode("div",Re,[e.createElementVNode("p",qe,e.toDisplayString(n.query),1),e.createElementVNode("p",{class:"text-xs text-muted-foreground truncate",title:n.page},"→ "+e.toDisplayString(e.unref(S)(n.page)),9,Ae)]),e.createElementVNode("div",Ue,[e.createElementVNode("span",Ke,[e.createVNode(e.unref(m.MousePointerClick),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(e.unref(g)(n.clicks)),1)]),e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium",e.unref($)(n.position)])}," #"+e.toDisplayString(e.unref(b)(n.position)),3)])])])])]))),128))]))}}),Ie={class:"flex flex-col gap-6 w-full max-w-7xl mx-auto py-8"},He={class:"flex justify-between gap-4 flex-col @lg:flex-row @lg:items-center"},Xe={key:0,class:"flex items-center gap-2"},je={class:"flex items-center border rounded-lg overflow-hidden"},Ge=["onClick"],Je={class:"text-sm text-destructive font-medium"},Qe={key:3,class:"flex items-center justify-center py-20"},We={class:"grid grid-cols-1 @3xl:grid-cols-2 gap-4"},Ye={class:"border-b"},Ze={class:"flex"},et=e.defineComponent({__name:"SeoHealth",setup(t){const{config:c}=w.useModule(),{moduleId:a}=w.useModuleRoute();w.useModuleBreadcrumbs(()=>[{label:"SEO Health"}]);const n=e.ref(!0),d=e.ref(null),s=e.ref("30"),o=e.ref([]),l=e.ref({clicks:0,impressions:0,ctr:0,avgPosition:0}),i=e.ref([]),y=e.ref([]),B=e.ref([]),v=e.computed(()=>!!(c.serviceAccount&&c.propertyId&&c.siteUrl)),T=e.computed(()=>!!c.siteUrl);function N(x){return`/api/v1/modules/${a}${x}`}const D=[{label:"7d",value:"7"},{label:"14d",value:"14"},{label:"30d",value:"30"},{label:"90d",value:"90"}];async function V(){if(!v.value)return;n.value=!0,d.value=null;const x=`${s.value}daysAgo`;try{const[r,h,k,f]=await Promise.all([$fetch(N(`/seo/trends?startDate=${x}&endDate=today`)),$fetch(N(`/seo/keywords?startDate=${x}&endDate=today&limit=50`)),$fetch(N(`/seo/pages?startDate=${x}&endDate=today&limit=30`)),$fetch(N(`/seo/query-pages?startDate=${x}&endDate=today`))]);o.value=r.rows||[],l.value=r.totals||{clicks:0,impressions:0,ctr:0,avgPosition:0},i.value=h.rows||[],y.value=k.rows||[],B.value=f.rows||[]}catch(r){d.value=r?.data?.statusMessage||r?.message||"Failed to load SEO data"}finally{n.value=!1}}e.watch(s,()=>V()),e.onMounted(()=>{v.value?V():n.value=!1});const p=e.ref("keywords");return(x,r)=>{const h=e.resolveComponent("Button"),k=e.resolveComponent("Card");return e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",He,[r[3]||(r[3]=e.createElementVNode("div",null,[e.createElementVNode("h1",{class:"text-2xl font-semibold"},"SEO Health"),e.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"},"Search Console performance & keyword rankings")],-1)),v.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createElementVNode("div",je,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(D,f=>e.createElementVNode("button",{key:f.value,class:e.normalizeClass(["px-3 py-1.5 text-xs font-medium transition-colors",s.value===f.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:tt=>s.value=f.value},e.toDisplayString(f.label),11,Ge)),64))]),e.createVNode(h,{variant:"outline",size:"icon",onClick:V,disabled:n.value},{default:e.withCtx(()=>[e.createVNode(e.unref(m.RefreshCw),{class:e.normalizeClass(["size-4",{"animate-spin":n.value}])},null,8,["class"])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0)]),T.value?v.value?d.value?(e.openBlock(),e.createBlock(k,{key:2,class:"p-6 border-destructive/50 bg-destructive/5"},{default:e.withCtx(()=>[e.createElementVNode("p",Je,e.toDisplayString(d.value),1),e.createVNode(h,{variant:"outline",size:"sm",class:"mt-3",onClick:V},{default:e.withCtx(()=>[...r[7]||(r[7]=[e.createTextVNode("Retry",-1)])]),_:1})]),_:1})):n.value?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(e.unref(m.Loader2),{class:"size-8 animate-spin text-muted-foreground"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(K,{totals:l.value},null,8,["totals"]),e.createVNode(Z,{keywords:i.value},null,8,["keywords"]),e.createElementVNode("div",We,[e.createVNode(oe,{trends:o.value},null,8,["trends"]),e.createVNode(re,{trends:o.value},null,8,["trends"])]),e.createVNode(k,{class:"overflow-hidden"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,[e.createElementVNode("button",{class:e.normalizeClass(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2",p.value==="keywords"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"]),onClick:r[0]||(r[0]=f=>p.value="keywords")},[e.createVNode(e.unref(m.Search),{class:"size-3.5 inline mr-1.5"}),r[8]||(r[8]=e.createTextVNode(" Keywords ",-1))],2),e.createElementVNode("button",{class:e.normalizeClass(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2",p.value==="pages"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"]),onClick:r[1]||(r[1]=f=>p.value="pages")},[e.createVNode(e.unref(m.FileText),{class:"size-3.5 inline mr-1.5"}),r[9]||(r[9]=e.createTextVNode(" Pages ",-1))],2),e.createElementVNode("button",{class:e.normalizeClass(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2",p.value==="mapping"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"]),onClick:r[2]||(r[2]=f=>p.value="mapping")},[e.createVNode(e.unref(m.ArrowUpRight),{class:"size-3.5 inline mr-1.5"}),r[10]||(r[10]=e.createTextVNode(" Keyword → Page ",-1))],2)])]),p.value==="keywords"?(e.openBlock(),e.createBlock(ke,{key:0,keywords:i.value},null,8,["keywords"])):e.createCommentVNode("",!0),p.value==="pages"?(e.openBlock(),e.createBlock(Te,{key:1,pages:y.value},null,8,["pages"])):e.createCommentVNode("",!0),p.value==="mapping"?(e.openBlock(),e.createBlock(Oe,{key:2,queryPages:B.value},null,8,["queryPages"])):e.createCommentVNode("",!0)]),_:1})],64)):(e.openBlock(),e.createBlock(k,{key:1,class:"p-8 text-center"},{default:e.withCtx(()=>[...r[6]||(r[6]=[e.createElementVNode("p",{class:"text-lg font-medium"},"Setup required",-1),e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-1"},"Configure your service account, property ID, and site URL in module settings.",-1)])]),_:1})):(e.openBlock(),e.createBlock(k,{key:0,class:"p-8 text-center space-y-3"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.AlertTriangle),{class:"size-10 text-amber-500 mx-auto"}),r[4]||(r[4]=e.createElementVNode("p",{class:"text-lg font-medium"},"Search Console not configured",-1)),r[5]||(r[5]=e.createElementVNode("p",{class:"text-sm text-muted-foreground max-w-md mx-auto"},[e.createTextVNode(" Add your "),e.createElementVNode("strong",null,"Search Console Site URL"),e.createTextVNode(" in the module settings to enable SEO data. Use the exact format from Google Search Console (e.g. "),e.createElementVNode("code",null,"https://example.com"),e.createTextVNode(" or "),e.createElementVNode("code",null,"sc-domain:example.com"),e.createTextVNode("). ")],-1))]),_:1}))])}}});exports.default=et;
|