import{J as o,M as n,d as a,x as s,xb as p}from"./chunk-DUETASKE.js";var g=(()=>{let e=class e{constructor(t){this.datePipe=t,this.showPrompt=!1,this.promptHandled=new a,this.cautionPrompt=!1,this.isMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isSafari=/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent),this.isLegacySafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&parseInt((navigator.userAgent.match(/version\/(\d+)/i)||[])[1])<=17,this.isPWA=window.matchMedia("(display-mode: standalone)").matches}transformDate(t,r){return this.datePipe.transform(t,r)}getDateAsString(t,r=!0){return r?`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}T${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:t.toISOString().slice(0,16)}prompt(t,r,m,h=void 0,c=!1){return this.resetPrompt(),this.promptHeader=t,this.promptDescription=r,this.promptConfirmLabel=m,this.promptCancelLabel=h,this.showPrompt=!0,this.cautionPrompt=c,this.promptHandled.pipe(s(1))}resetPrompt(){this.promptHandled=new a}cancelPrompt(){this.promptHandled.next(!1),this.showPrompt=!1}confirmPrompt(){this.promptHandled.next(!0),this.showPrompt=!1}};e.\u0275fac=function(r){return new(r||e)(n(p))},e.\u0275prov=o({token:e,factory:e.\u0275fac});let i=e;return i})();export{g as a};
