PageSourceSearch

https://flycard.vivereilgrappa.it/chunk-I25EBPLM.js

js vivereilgrappa.it collected 2026-09-25 01:05:11 UTC 16,855 bytes, 1 lines download raw bytes

1import{a as xe,b as Te,c as Me}from"./chunk-7NLW3BUZ.js";import{b as Se}from"./chunk-BHOVAY4U.js";import{a as pe}from"./chunk-7NOEDY2K.js";import{a as ye,c as de}from"./chunk-6LUYM4LD.js";import{B as re,C as ae,D as le,E as se,Ga as he,Ha as Ce,J as ce,N as ge,Q as _e,b as H,ba as ue,da as ve,h as J,ha as fe,i as N,j as Q,k as $,l as X,m as K,n as Y,o as Z,p as ee,q as te,r as ie,s as ne,z as oe}from"./chunk-OHT42PP4.js";import"./chunk-GBNPKQED.js";import{$ as g,H as D,J as r,Ja as q,K as b,P as L,Pa as j,Q as u,S as d,V as v,W,X as V,Y as U,Z as a,_ as l,_a as F,ab as B,ba as T,bb as R,ca as f,da as m,e as k,la as p,ma as M,na as P,o as E,oa as S,r as h,s as C,ua as z,va as I,wa as A,wb as G,zb as me}from"./chunk-CZEJRBOL.js";import"./chunk-QU6MIH6Q.js";import"./chunk-G3CV3VGG.js";import"./chunk-7KGURMOZ.js";import"./chunk-CJRXBKWP.js";import"./chunk-5UJX2WYF.js";import"./chunk-SE4DU5X4.js";import"./chunk-ZQX3J3HM.js";import"./chunk-356JDZMM.js";import"./chunk-4U6PRYVA.js";import"./chunk-T6PA5SCO.js";import"./chunk-Z4V4M3ZT.js";import"./chunk-QPVVTFFW.js";import"./chunk-J6ICYO4L.js";import"./chunk-LF5XB4YN.js";import{f as O,h as x}from"./chunk-6RK4MNN4.js";var we=O(ye()),be=O(Me());var ke=n=>({invalid:n});function Ie(n,s){if(n&1){let e=T();a(0,"ion-col",7)(1,"a",8)(2,"ion-card",9),f("click",function(){let o=h(e).$implicit,c=m(2);return C(c.openServiceTicketModal(!0,o))}),a(3,"div",10),g(4,"qrcode",11),l(),g(5,"hr"),a(6,"ion-card-header")(7,"ion-card-title"),p(8),l()(),a(9,"ion-card-content")(10,"div"),p(11),l(),a(12,"div"),p(13),l(),a(14,"div",12),p(15),g(16,"ion-icon",13),l()()()()()}if(n&2){let e=s.$implicit,i=m(2);d("size",i.setCardSize()),r(2),d("ngClass",I(11,ke,!i.isValid(e.ServiceTypes==null?null:e.ServiceTypes.endDate))),r(2),d("qrdata",e.qrString)("width",200)("errorCorrectionLevel","H"),r(4),M(i.showServiceTicketTitle(e)),r(3),S("",i.translate.start_date,": ",i.serviceTicketDate(e.ServiceTypes==null?null:e.ServiceTypes.startDate),""),r(2),S("",i.translate.end_date,": ",i.serviceTicketDate(e.ServiceTypes==null?null:e.ServiceTypes.endDate),""),r(2),P("",i.translate.details," ")}}
1function Pe(n,s){if(n&1&&(a(0,"ion-col",5)(1,"ion-button",6),p(2),l()(),V(3,Ie,17,13,"ion-col",7,W)),n&2){let e=m();r(2),M(e.translateHeader.buy_services),r(),U(e.serviceTicketsList)}}function Oe(n,s){if(n&1){let e=T();a(0,"ion-avatar",26)(1,"ion-img",27),f("error",function(){h(e);let t=m(3);return C(t.avatarExist=!1)}),l()()}if(n&2){let e=m(3);r(),d("src",e.userImgBlob)}}function Ee(n,s){n&1&&g(0,"ion-icon",28)}function De(n,s){n&1&&g(0,"ion-spinner",29)}function Le(n,s){n&1&&(g(0,"img",30),p(1," Google Wallet "))}function We(n,s){n&1&&g(0,"ion-spinner",29)}function Ve(n,s){if(n&1){let e=T();a(0,"ion-button",23),f("click",function(){h(e);let t=m(3);return C(t.addToGoogleWallet())}),u(1,Le,2,0)(2,We,1,0),l()}if(n&2){let e=m(3);d("disabled",e.walletLoading),r(),v(1,e.walletLoading?2:1)}}function Ue(n,s){n&1&&(g(0,"img",31),p(1," Apple Wallet "))}function ze(n,s){n&1&&g(0,"ion-spinner",29)}function Ae(n,s){if(n&1){let e=T();a(0,"ion-button",23),f("click",function(){h(e);let t=m(3);return C(t.addToAppleWallet())}),u(1,Ue,2,0)(2,ze,1,0),l()}if(n&2){let e=m(3);d("disabled",e.walletLoading),r(),v(1,e.walletLoading?2:1)}}function qe(n,s){if(n&1){let e=T();a(0,"ion-header")(1,"ion-toolbar")(2,"ion-title"),p(3),l(),a(4,"ion-buttons",16)(5,"ion-button",17),f("click",function(){h(e);let t=m(2);return C(t.openServiceTicketModal(!1))}),g(6,"ion-icon",18),l()()()(),a(7,"ion-content",19)(8,"section",20)(9,"div",21),g(10,"qrcode",11),l(),a(11,"div",21),u(12,Oe,2,1,"ion-avatar",22),l(),a(13,"div"),p(14),l(),a(15,"div"),p(16),l(),a(17,"ion-button",23),f("click",function(){h(e);let t=m(2);return C(t.download())}),u(18,Ee,1,0,"ion-icon",24)(19,De,1,0),p(20),l(),u(21,Ve,3,2,"ion-button",25)(22,Ae,3,2,"ion-button",25),l()()}if(n&2){let e=m(2);r(3),M((e.serviceTicketSelected.Users==null?null:e.serviceTicketSelected.Users.name)+" "+(e.serviceTicketSelected.Users==null?null:e.serviceTicketSelected.Users.surname)),r(7),d("qrdata",e.serviceTicketSelected.qrString)("width",200)("errorCorrectionLevel","H"),r(2),v(12,e.avatarExist?12:-1),r(2),S("",e.translate.start_date,": ",e.serviceTicketDate(e.serviceTicketSelected.ServiceTypes==null?null:e.serviceTicketSelected.ServiceTypes.startDate),""),r(2),S("",e.translate.end_date,": ",e.serviceTicketDate(e.serviceTicketSelected.ServiceTypes==null?null:e.serviceTicketSelected.ServiceTypes.endDate),""),r(),d("disabled",e.downloadImg),r(),v(18,e.downloadImg?19:18),r(2),P(" ",e.translate.download,""),r(),v(21,e.showGoogleWalletButton?21:-1),r(),v(22,e.isIos?22:-1)}}
1function je(n,s){if(n&1&&(a(0,"ion-avatar",37),g(1,"img",38),l()),n&2){let e=m(3);r(),d("src",e.userImgBlob,D)}}function Fe(n,s){if(n&1&&(a(0,"div",32)(1,"div",33),g(2,"qrcode",34),a(3,"div",35),u(4,je,2,1,"ion-avatar",36),l(),a(5,"div"),p(6),l(),a(7,"div"),p(8),l(),a(9,"div"),p(10),l(),a(11,"div"),p(12),l()()()),n&2){let e=m(2);r(2),d("qrdata",e.serviceTicketSelected.qrString)("width",180)("errorCorrectionLevel","H"),r(2),v(4,e.userImgBlob?4:-1),r(2),M(e.showServiceTicketTitle(e.serviceTicketSelected)),r(2),S("",e.translate.user,": ",(e.serviceTicketSelected.Users==null?null:e.serviceTicketSelected.Users.name)+" "+(e.serviceTicketSelected.Users==null?null:e.serviceTicketSelected.Users.surname),""),r(2),S("",e.translate.start_date,": ",e.serviceTicketDate(e.serviceTicketSelected.ServiceTypes==null?null:e.serviceTicketSelected.ServiceTypes.startDate),""),r(2),S("",e.translate.end_date,": ",e.serviceTicketDate(e.serviceTicketSelected.ServiceTypes==null?null:e.serviceTicketSelected.ServiceTypes.endDate),"")}}function Be(n,s){if(n&1){let e=T();a(0,"ion-modal",14),f("willDismiss",function(){h(e);let t=m();return C(t.openServiceTicketModal(!1))}),u(1,qe,23,14,"ng-template"),l(),u(2,Fe,13,11,"div",15)}if(n&2){let e=m();d("isOpen",e.serviceTicketDetailsVisible),r(2),v(2,e.downloadImg?2:-1)}}var Re=(n,s)=>({desktop:n,mobile:s}),Ge=n=>({desktop:n}),He=n=>({"mobile-footer":n}),xt=(()=>{let s=class s extends he{constructor(i,t,o,c,_){super(),this.node=i,this.router=t,this.authService=o,this.shared=c,this.route=_,this.serviceTicketsList=[],this.serviceTypesList=[],this.loading=!0,this.serviceTicketDetailsVisible=!1,this.imgError=!1,this.firstTime=!0,this.downloadImg=!1,this.walletLoading=!1,this.walletErrorOpen=!1,this.walletErrorMessage="",this.isAndroid=!1,this.isIos=!1,this.key="031a35a662b3a7fb202f64facdcc966f939e7793fd258d07c1fd68220f7f4d7adb6613ea19a045becad830f6ce160b38d28d5bf91ed6727ded9d8db6fd33b11d1be630a67d8e0819f6522936fb31c0f1fddecf3b34f8bc3819b6ebce810ca58410f9dc727516a4fd7d85f68f9616a736e1f3f341015fc3f92f028f6f21fb439",this.avatarExist=!0,ge({arrowForwardOutline:_e,downloadOutline:fe,closeOutline:ve,chevronForwardOutline:ue})}ngOnInit(){var c;let i=typeof navigator<"u"&&(c=navigator.userAgent)!=null?c:"",t=(()=>{try{return Se.getPlatform()}catch{return"web"}})();this.isAndroid=t==="android"||/Android/i.test(i),this.isIos=t==="ios"||typeof navigator<"u"&&(/iPad|iPhone|iPod/i.test(i)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),this.shared.lang$.subscribe(_=>{this.translate=this.shared.translateData.app[this.shared.lang].flycard,this.translateHeader=this.shared.translateData.app[this.shared.lang].header});let o=this.authService.getUserId();this.setImageSrc(o)}get showGoogleWalletButton(){return this.isAndroid||!this.isIos&&this.isMobile}ionViewWillEnter(){this.baseUrl=this.node.baseUrl,this.firstTime=!1,this.getServiceTickets()}getServiceTickets(){return x(this,null,function*(){this.serviceTicketsList=[];try{let i=yield k(this.node.getServiceTickets(this.authService.getUserId()));console.log(i),this.serviceTicketsList=i.map(t=>{let o=JSON.stringify(t.id);return t.qrString=we.AES.encrypt(o,this.key).toString(),t})}catch(i){console.log(i)}this.loading=!1})}isValid(i){if(!i)return!1;i=new Date(i);let t=new Date;return t.setHours(0,0,0,0),i.getTime()>=t.getTime()}setCardSize(){return this.isMobile?12:this.serviceTicketsList.length%4===0?3:this.serviceTicketsList.length%3===0?4:3}openServiceTicketModal(i,t){var o,c;i||(this.serviceTicketSelected=null,this.serviceTicketDetailsVisible=!1),console.log(t,this.isValid((o=t==null?void 0:t.ServiceTypes)==null?void 0:o.endDate)),t&&this.isValid((c=t.ServiceTypes)==null?void 0:c.endDate)&&(this.serviceTicketSelected=t,this.serviceTicketDetailsVisible=!0)}download(){return x(this,null,function*(){this.downloadImg=!0,console.log(this.avatarExist);let i=null;console.log(1);let t=yield new Promise((o,c)=>{let _=setTimeout(()=>{i=document.getElementById("serviceTicket-img"),i&&(clearTimeout(_),o(!0))},500);setInterval(()=>{o(!0)},4e3)});i?(console.log(4),(0,be.default)(i).then(o=>{var y,w;let c=o.toDataURL("image/jpeg"),_=document.createElement("a");_.href=c,_.download="service_"+this.serviceTicketDate((w=(y=this.serviceTicketSelected)==null?void 0:y.ServiceTypes)==null?void 0:w.startDate)+".jpeg",document.body.appendChild(_),_.click(),document.body.removeChild(_),this.downloadImg=!1}
1)):(console.log(4.1),console.error("Element not found!"),this.downloadImg=!1)})}addToGoogleWallet(){return x(this,null,function*(){var i;if(!(!((i=this.serviceTicketSelected)!=null&&i.id)||this.walletLoading)){this.walletLoading=!0;try{let{url:t}=yield k(this.node.getGoogleWalletSaveUrlForServiceTicket(this.serviceTicketSelected.id,this.serviceTicketSelected.qrString,this.shared.lang));if(!t){console.error("Google Wallet: saveUrl missing"),this.presentWalletError("Impossibile avviare Google Wallet: link di salvataggio non disponibile.");return}window.location.href=t}catch(t){console.error("Google Wallet: failed to create pass",t),this.presentWalletError(this.buildWalletErrorMessage(t,"Errore durante la creazione del pass per Google Wallet."))}finally{this.walletLoading=!1}}})}addToAppleWallet(){return x(this,null,function*(){var i;if(!(!((i=this.serviceTicketSelected)!=null&&i.id)||this.walletLoading||typeof window>"u")){this.walletLoading=!0;try{let{url:t}=yield k(this.node.getAppleWalletLinkForServiceTicket(this.serviceTicketSelected.id,this.serviceTicketSelected.qrString,this.shared.lang));if(!t){this.presentWalletError("Apple Wallet: link non disponibile.");return}window.location.href=t}catch(t){console.error("Apple Wallet: failed to get link",t),this.presentWalletError(this.buildWalletErrorMessage(t,"Errore durante la generazione del link per Apple Wallet."))}finally{this.walletLoading=!1}}})}onWalletErrorToastDismiss(){this.walletErrorOpen=!1}presentWalletError(i){this.walletErrorMessage=i,this.walletErrorOpen=!0}buildWalletErrorMessage(i,t){var y;let o=i,c=typeof(o==null?void 0:o.status)=="number"?o.status:void 0,_=typeof((y=o==null?void 0:o.error)==null?void 0:y.message)=="string"?o.error.message:typeof(o==null?void 0:o.error)=="string"?o.error:typeof(o==null?void 0:o.message)=="string"?o.message:void 0;if(c===0)return"Connessione assente o server non raggiungibile. Riprova.";if(c===401||c===403)return"Sessione scaduta o non autorizzato. Effettua di nuovo il login.";if(c===404)return"Servizio Wallet non disponibile (404).";if(c===409)return"Questo Service risulta gi\xE0 presente nel Wallet.";if(typeof c=="number"&&c>=500)return"Errore server durante la generazione del pass. Riprova pi\xF9 tardi.";if(_){let w=_.replace(/\s+/g," ").trim();return w.length<=140?w:w.substring(0,140)+"\u2026"}return t}serviceTicketDate(i){if(!i)return"";let t=i.substring(0,4),o=i.substring(5,7);return i.substring(8,10)+"-"+o+"-"+t}showServiceTicketTitle(i){var t;return(t=i.ServiceTypes)!=null&&t.title?JSON.parse(i.ServiceTypes.title)[this.shared.lang]:""}setImageSrc(i){return x(this,null,function*(){try{let t=yield this.node.getUserPhotoUrl(i),o=yield this.getImageBlob(t);this.userImgBlob=o}catch(t){this.avatarExist=!1,console.error("Errore nel caricamento dell'immagine:",t)}})}getImageBlob(i){return x(this,null,function*(){try{let o=yield(yield fetch(i)).blob();return URL.createObjectURL(o)}catch(t){throw console.error("Errore durante il download dell'immagine:",t),t}})}};s.\u0275fac=function(t){return new(t||s)(b(de),b(B),b(pe),b(me),b(F))},s.\u0275cmp=E({type:s,selectors:[["app-my-services"]],standalone:!0,features:[L,z],decls:8,vars:15,consts:[[3,"fullscreen"],[1,"container","p-relative",3,"ngClass"],[3,"ngClass"],[1,"ion-justify-content-center"],["duration","6000","color","danger",3,"isOpen","message","didDismiss"],["size","12",1,"t-center","trill"],["size","default","routerLink","/services",1,"trill"],[3,"size"],["href","javascript:void(0)"],[3,"ngClass","click"],[1,"t-center","cla"],[3,"qrdata","width","errorCorrectionLevel"],[1,"card-link","mt-4"],["name","chevron-forward-outline"],[3,"isOpen","willDismiss"],["class","invisible"],["slot","end"],[3,"click"],["name","close-outline"],[1,"ion-padding","t-center"],[1,"modal-qr-container"],[1,"t-center"],["class","avatar"],[1,"mt-2",3,"disabled","click"],["class","pe-1","name","download-outline"],["class","mt-2",3,"disabled"],[1,"avatar"],[3,"src","error"],["name","download-outline",1,"pe-1"],["name","crescent",1,"pe-1",2,"height","16px"],["src","assets/img/google-wallet.png","alt","",1,"wallet-btn-icon"],["src","assets/img/Wallet_App_icon.png","alt","",1,"wallet-btn-icon"],[1,"invisible"],["id","serviceTicket-img"],[1,"w-100",3,"qrdata","width","errorCorrectionLevel"],[1,"t-center","mb-3"],["class","avatar mb-2"],[1,"avatar","mb-2"],[3,"src"]],template:function(t,o){t&1&&(a(0,"ion-content",0)(1,"main",1)(2,"ion-grid",2)(3,"ion-row",3),u(4,Pe,5,1),l()()(),g(5,"app-footer",2),l(),u(6,Be,3,2),a(7,"ion-toast",4),f("didDismiss",function(){return o.onWalletErrorToastDismiss()}),l()),t&2&&(d("fullscreen",!0),r(),d("ngClass",A(8,Re,!o.isMobile,o.isMobile)),r(),d("ngClass",I(11,Ge,!o.isMobile)),r(2),v(4,o.loading?-1:4),r(),d("ngClass",I(13,He,o.isMobile)),r(),v(6,o.serviceTicketSelected?6:-1),r(),d("isOpen",o.walletErrorOpen)("message",o.walletErrorMessage))},dependencies:[j,q,R,G,Ce,Te,xe,ie,se,ae,ee,ce,te,oe,$,K,Y,X,ne,N,J,Q,Z,H,le,re],styles:['main.container[_ngcontent-%COMP%]{min-height:calc(100vh - 161px);display:flex;align-items:center;justify-content:center;max-width:1200px}main.container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:#01aeef;font-weight:bolder}main.container[_ngcontent-%COMP%]   h1.desktop[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 200px);left:50%;width:100vw;transform:translate(-50%,-50%)}main.container.mobile[_ngcontent-%COMP%]{min-height:auto;min-height:calc(100% - 233px);display:block}main.container.mobile[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{padding-top:40px}main.container[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%]{background-color:#000;margin:16px 16px 0}main.container[_ngcontent-%COMP%]   ion-card[_ngcontent-%COMP%]{padding:20px}main.container[_ngcontent-%COMP%]   ion-card[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;text-align:center;padding-top:20px}main.container[_ngcontent-%COMP%]   ion-card[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   ion-icon[_ngcontent-%COMP%]{color:#01aeef;font-size:4rem}main.container[_ngcontent-%COMP%]   ion-card[_ngcontent-%COMP%]   .card-link[_ngcontent-%COMP%]{color:#01aeef}main.container[_ngcontent-%COMP%]   ion-card[_ngcontent-%COMP%]   .card-link[_ngcontent-%COMP%]   ion-icon[_ngcontent-%COMP%]{vertical-align:middle}
1main.container[_ngcontent-%COMP%]   .invalid[_ngcontent-%COMP%]{opacity:.5}main.container[_ngcontent-%COMP%]   .invalid[_ngcontent-%COMP%]   qrcode[_ngcontent-%COMP%]{position:relative}main.container[_ngcontent-%COMP%]   .invalid[_ngcontent-%COMP%]   qrcode[_ngcontent-%COMP%]:before{content:"X";font-size:235px!important;position:absolute;top:101px;left:50%;transform:translate(-50%,-50%);font-size:2rem;color:red;z-index:5}ion-modal[_ngcontent-%COMP%]{font-size:1.5rem}ion-avatar[_ngcontent-%COMP%]{width:50px;height:50px;margin:0 auto 10px;--border-radius: 4px}#serviceTicket-img[_ngcontent-%COMP%]{width:400px;height:500px;padding-top:30px;text-align:center}#serviceTicket-img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-bottom:5px}.invisible[_ngcontent-%COMP%]{position:absolute;height:0px;width:0px;overflow:hidden}.trill[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_vibrating 1.5s ease-in-out infinite}@keyframes _ngcontent-%COMP%_vibrating{0%,7%{transform:rotate(0)}15%{transform:rotate(-2.5deg)}20%{transform:rotate(1.25deg)}25%{transform:rotate(-1.25deg)}30%{transform:rotate(.75deg)}35%{transform:rotate(-.5deg)}40%,to{transform:rotate(0)}}qrcode[_ngcontent-%COMP%]   canvas[_ngcontent-%COMP%]{width:300px!important;height:300px!important}.modal-qr-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;justify-content:center}.wallet-btn-icon[_ngcontent-%COMP%]{width:18px;height:18px;margin-right:8px;object-fit:contain;vertical-align:middle}']});let n=s;return n})();export{xt as MyServicesPage};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.