!function(){function e(e,o,i){return o=n(o),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,t()?Reflect.construct(o,i||[],n(e).constructor):o.apply(e,i))}function t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(t=function(){return!!e})()}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,s=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",l=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function d(e,t,n,o){var r=t&&t.prototype instanceof g?t:g,a=Object.create(r.prototype),s=new D(o||[]);return i(a,"_invoke",{value:U(e,n,s)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",v="executing",m="completed",f={};function g(){}function y(){}function b(){}var k={};c(k,s,function(){return this});var w=Object.getPrototypeOf,A=w&&w(w(_([])));A&&A!==n&&o.call(A,s)&&(k=A);var S=b.prototype=g.prototype=Object.create(k);function C(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(i,r,a,s){var l=p(e[i],e,r);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?t.resolve(c.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(c).then(function(e){u.value=e,a(u)},function(e){return n("throw",e,a,s)})}s(l.arg)}var r;i(this,"_invoke",{value:function(e,o){function i(){return new t(function(t,i){n(e,o,t,i)})}return r=r?r.then(i,i):i()}})}function U(t,n,o){var i=h;return function(r,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===r)throw a;return{value:e,done:!0}}for(o.method=r,o.arg=a;;){var s=o.delegate;if(s){var l=I(s,o);if(l){if(l===f)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(i===h)throw i=m,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);i=v;var u=p(t,n,o);if("normal"===u.type){if(i=o.done?m:"suspendedYield",u.arg===f)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(i=m,o.method="throw",o.arg=u.arg)}}}function I(t,n){var o=n.method,i=t.iterator[o];if(i===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),f;var r=p(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;var a=r.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,f):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return r.next=r}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(T.prototype),c(T.prototype,l,function(){return this}),t.AsyncIterator=T,t.async=function(e,n,o,i,r){void 0===r&&(r=Promise);var a=new T(d(e,n,o,i),r);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(S),c(S,u,"Generator"),c(S,s,function(){return this}),c(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=_,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(o,i){return s.type="throw",s.arg=t,n.next=o,i&&(n.method="next",n.arg=e),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:_(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),f}},t}function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(self.webpackChunkfielddClient=self.webpackChunkfielddClient||[]).push([[179],{98255:function(e){function t(e){return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}t.keys=function(){return[]},t.resolve=t,t.id=98255,e.exports=t},45642:function(e,t,n){"use strict";n.d(t,{K:function(){return c}});var o,i=n(54364),r=n(53448),a=n(58916),s=n(96289),l=n(30247),u=n(2316),c=((o=d(function e(){h(this,e)})).\u0275fac=function(e){return new(e||o)},o.\u0275mod=u.oAB({type:o}),o.\u0275inj=u.cJS({imports:[[i.ez,r.u5,a.Pc,s.m,l.yI]]}),o)},96146:function(e,t,n){"use strict";n.d(t,{a:function(){return v}});var o,i=n(92340),r=n(96636),a=n(27566),s=n(34138),l=n(2316),u=n(58916),c=((o=function(){return d(function e(t,n,o){var i=this;h(this,e),this.network=t,this.platform=n,this.filedAlertService=o,this.isOnline=!1;try{this.network.onConnect().subscribe(function(){return i.isOnline=!0}),this.network.onDisconnect().subscribe(function(){return i.isOnline=!1})}catch(r){}},[{key:"isUserOnline",value:function(){var e;return(e=(this.platform.is("android")||this.platform.is("ios"))&&(null==i.N?void 0:i.N.companyID)?this.isOnline:window.navigator.onLine)||this.filedAlertService.showMessage("Oops","Please check your internet connection"),e}}])}()).\u0275fac=function(e){return new(e||o)(l.LFG(a.Z),l.LFG(u.t4),l.LFG(s.H))},o.\u0275prov=l.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o),p=n(32316),v=function(){var e=function(){return d(function e(t,n,o){h(this,e),this.router=t,this.networkService=n,this.authService=o},[{key:"canActivate",value:function(e,t){return!(i.N.production&&!this.networkService.isUserOnline())&&(!!this.authService.isUserLoggedIn()||this.router.navigate(["/"]))}}])}();return e.\u0275fac=function(t){return new(t||e)(l.LFG(p.F0),l.LFG(c),l.LFG(r._))},e.\u0275prov=l.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},22655:function(e,t,n){"use strict";n.d(t,{s:function(){return c}});var o,i=n(39754),r=n(84608),a=n(53399),s=n(96636),l=n(2316),u=n(32316),c=((o=function(){return d(function e(t,n){h(this,e),this.router=t,this.authService=n},[{key:"canActivate",value:function(e,t){var n=this;return this.authService.companyChanged$.asObservable().pipe((0,i.h)(function(e){return!!e}),(0,r.q)(1),(0,a.U)(function(){return!!n.authService.hasOnlinePortalAccess()||(n.router.navigate(["404"],{state:{noAccess:!0}}),!1)}))}}])}()).\u0275fac=function(e){return new(e||o)(l.LFG(u.F0),l.LFG(s._))},o.\u0275prov=l.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o)},15433:function(e,t,n){"use strict";n.d(t,{LD:function(){return i},ih:function(){return r},gn:function(){return a},gg:function(){return s},kA:function(){return l},lm:function(){return u},I6:function(){return c},g1:function(){return d},r3:function(){return p},J:function(){return h},Ho:function(){return v}});var o,i=((o=i||(i={})).List="list",o.Text="text",o.File="file",o.Dropdown="dropdown",i),r=function(){return(e=r||(r={})).TEXT="text",e.PARAGRAPH="paragraph",e.PHOTOS="photos",e.ADDRESS="address",e.LICENSE_PLATE="vehicle",r;var e}(),a=function(){return(e=a||(a={}))[e.Requested=0]="Requested",e[e.QuoteReq=.2]="QuoteReq",e[e.Quoted=.5]="Quoted",e[e.Accepted=1]="Accepted",e[e.EnRoute=2]="EnRoute",e[e.Arrived=3]="Arrived",e[e.ArrivalPhotos=3.5]="ArrivalPhotos",e[e.ArrivalChecklist=3.6]="ArrivalChecklist",e[e.ArrivalForm=3.7]="ArrivalForm",e[e.CARFAX=4.8]="CARFAX",e[e.InProgress=4]="InProgress",e[e.PhotoAdded=4.5]="PhotoAdded",e[e.CompletionChecklist=4.6]="CompletionChecklist",e[e.CompletionForm=4.7]="CompletionForm",e[e.Signature=4.8]="Signature",e[e.Done=5]="Done",e[e.Cancelled=6]="Cancelled",e[e.PayByCash=8]="PayByCash",e[e.Invoiced=12]="Invoiced",e[e.PendingInvBank=12.5]="PendingInvBank",e[e.PdInvCard=13]="PdInvCard",e[e.PdInvBank=14]="PdInvBank",e[e.InvVoid=15]="InvVoid",e[e.CardRec=16]="CardRec",e[e.QuoteSent=17]="QuoteSent",e[e.QuoteDenied=17.2]="QuoteDenied",e[e.QuoteApproved=17.5]="QuoteApproved",e[e.QuoteWon=18]="QuoteWon",e[e.NoCharge=19]="NoCharge",a;var e}(),s=function(){return(e=s||(s={})).SQUARE="square",e.STRIPE="stripe",e.PAY_FABRIC="payFabric",e.PIN="pin",e.QUALPAY="qualpay",e.QUAL_FIELDD="qualFielddPay",e.PIN_FIELDD="pinFielddPay",e.ADYEN_FIELDD="adyenFielddPay",e.FINIX_FIELDD="finixFielddPay",s;var e}(),l=function(){return(e=l||(l={})).booking_confirmation="BOOKING_CONFIRMATION",e.ondemand_confirmation="ONDEMAND_CONFIRMATION",e.new_message="NEW_MESSAGE",e.order_status_changed="ORDER_STATUS_CHANGED",e.partner_enroute="PARTNER_ENROUTE",e.open_notification="OPEN_NOTIFICATION",e.help_line_msg="HELP_LINE_MSG",l;var e}(),u=function(){return(e=u||(u={})).anytime="anytime",e.until="until",e.never="never",u;var e}(),c=function(){return(e=c||(c={})).isPortalPreview="isPortalPreview",e.onDataLoaded="onDataLoaded",e.changeLogo="changeLogo",e.changeColor="changeColor",e.changeService="changeService",e.changeCompany="changeCompany",e.changeAddress="changeAddress",c;var e}(),d=function(){return(e=d||(d={})).GRANTED="granted",e.DENIED="denied",e.NOT_ASKED="notAsked",d;var e}(),p=function(){return(e=p||(p={})).NOTIFICATION="notification",e.LOCATION="location",e.CAMERA="camera",e.FILE="file",p;var e}(),h=function(){return(e=h||(h={})).ONLINE="ONLINE",e.CLIENT_APP="CLIENTAPP",e.ADMIN="admin",e.STAFF_APP="STAFF_APP",e.FIELDD_POS="FielddPOS",e.ADMIN_INVOICE="adminInvoice",h;var e}(),v=function(){return(e=v||(v={})).BOOKING="booking_online",e.LOGIN="login_customer",e.EMAIL="email_customer",v;var e}()},34138:function(e,t,n){"use strict";n.d(t,{H:function(){return p},N:function(){return v}});var o,i=n(65232),r=n(55160),a=n(4200),l=n(2316),u=n(58916),c=n(32316),p=(o=function(){return d(function e(t,n,o,i,r,a){h(this,e),this.commonHelper=t,this.alertController=n,this.toastController=o,this.router=i,this.buildInfo=r,this.market=a},[{key:"showMessage",value:function(e,t,n){var o=this;if(!this.appUpdateAlertDisplayed)return this.alertController.create({header:(null==e?void 0:e.replace(/\s/g," "))||"",message:"",buttons:["Ok"]}).then(function(e){document.querySelectorAll(".alert-message")[0].innerHTML=(null==t?void 0:t.replace(/\s/g," "))||"",o.alert=e,o.alert.onDidDismiss().then(function(e){n&&n(e)}),o.alert.present()})}},{key:"hideMessage",value:function(){var e;return null===(e=this.alert)||void 0===e?void 0:e.dismiss()}},{key:"showToastMessage",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2400;if(!this.appUpdateAlertDisplayed)return this.toastController.create({message:((null==e?void 0:e.replace(/\s/g," "))||"").trim(),duration:o,color:this.getColorByAlertType(t),position:"bottom"}).then(function(e){n.toast=e,n.toast.present()})}},{key:"getColorByAlertType",value:function(e){return e===v.Error?"danger":"success"}},{key:"showAlert",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!this.appUpdateAlertDisplayed)return this.alertController.create({header:(null==e?void 0:e.replace(/\s/g," "))||"",cssClass:o,message:(null==t?void 0:t.replace(/\s/g," "))||"",backdropDismiss:!1,buttons:["Ok"]}).then(function(e){return n.alert=e,n.alert.present()})}},{key:"getAppId",value:function(){try{return this.buildInfo.packageName}catch(e){return!1}}},{key:"showAppUpdateError",value:function(e,t){var n=this;if(!this.appUpdateAlertDisplayed)return this.appUpdateAlertDisplayed=!0,this.alertController.create({header:e,message:t,backdropDismiss:!1,buttons:[{text:"Ok",handler:function(){var e=n.getAppId();e&&n.market.open(e)}}]}).then(function(e){n.appUpdateAlert=e,n.appUpdateAlert.onDidDismiss().then(function(){n.appUpdateAlertDisplayed=!1}),n.appUpdateAlert.present()})}},{key:"confirmMessage",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Yes",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"No";return new Promise(function(r){n.alertController.create({header:(null==e?void 0:e.replace(/\s/g," "))||"",message:(null==t?void 0:t.replace(/\s/g," "))||"",backdropDismiss:!1,buttons:[{text:i,handler:function(){r(!1)}},{text:o,handler:function(){r(!0)}}]}).then(function(e){n.alert=e,n.alert.present()})})}},{key:"presentPrompt",value:function(e,t,n,o){var i=this,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Cancel",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"Update";return new Promise(function(s){i.alertController.create({header:(null==e?void 0:e.replace(/\s/g," "))||"",message:(null==t?void 0:t.replace(/\s/g," "))||"",inputs:[{name:"input1",placeholder:n,value:o}],buttons:[{text:r,role:"cancel",handler:function(){s(!1)}},{text:a,handler:function(e){return!!e.input1&&s(e.input1)}}]}).then(function(e){i.alert=e,i.alert.present()})})}},{key:"promptPhoneNumber",value:function(e){var t=this;return new Promise(function(n){var o;t.alertController.create({cssClass:"phone-number",header:"",message:"Please Enter A Phone Number To Receive SMS Notifications",inputs:[{name:"input1",type:"number"}],buttons:[{text:"Add Phone Number",handler:function(){return(null==o?void 0:o.isValidNumber())?n(o.getNumber()):o&&"function"==typeof o.isValidNumber?(t.showToastMessage("Please Enter A Valid Phone Number",v.Error),!1):void 0}},{text:"Skip",role:"cancel",handler:function(){n(!1)}}],backdropDismiss:!1}).then(function(n){t.alert=n,t.alert.present().then(function(){t.commonHelper.initIntlInput(e,".phone-number input[type=number]").then(function(e){o=e})})})})}},{key:"compulsoryPhoneNumber",value:function(e){var t=this;return new Promise(function(n,o){var i,r="Please Enter A Valid Phone Number To Proceed With Your Booking",a=!0;t.alertController.create({cssClass:"phone-number",header:"",message:r,inputs:[{name:"input1",type:"number"}],buttons:[{text:"Add Phone Number",handler:function(){return(null==i?void 0:i.isValidNumber())?(a=!1,n(i.getNumber())):i&&"function"==typeof i.isValidNumber?(a=!0,t.showToastMessage(r,v.Error),!1):void 0}}]}).then(function(n){t.alert=n,t.alert.onDidDismiss().then(function(){if(a)return o(r)}),t.alert.present().then(function(){t.commonHelper.initIntlInput(e,".phone-number input[type=number]").then(function(e){i=e})})})})}},{key:"showActionBox",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Yes",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"No";return new Promise(function(r){n.alertController.create({header:e,message:t,buttons:[{text:o,handler:function(){r(!0)}},{text:i,role:"cancel",handler:function(){r(!1)}}],cssClass:"alert-popup full-popup"}).then(function(e){e.present()})})}},{key:"presentAlertRadio",value:function(e,t,n){var o=this,i=this.getTextWidth(t.reduce(function(e,t){return e.length>t.length?e:t}));document.documentElement.style.setProperty("--custom-radio-width",i);var r=t.map(function(e,t){return{type:"radio",value:e,label:e,name:"radio"+t,checked:0===t}});return new Promise(function(t){o.alertController.create({header:(null==e?void 0:e.replace(/\s/g," "))||"",cssClass:[].concat(s(n),["custom-radio-alert"]),inputs:r,buttons:[{text:"Back",role:"cancel",handler:function(){t(!1)}},{text:"Cancel",handler:function(e){if(e)return t(e);t(!1)}}]}).then(function(e){o.alert=e,o.alert.present()})})}},{key:"getTextWidth",value:function(e){var t=document.createElement("canvas").getContext("2d");t.font="16px Exo";var n=t.measureText(e).width;return Math.ceil(n+20)+"px"}}])}(),o.\u0275fac=function(e){return new(e||o)(l.LFG(a.$),l.LFG(u.Br),l.LFG(u.yF),l.LFG(c.F0),l.LFG(i.S),l.LFG(r.I))},o.\u0275prov=l.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o),v=function(){return(e=v||(v={}))[e.Info=0]="Info",e[e.Error=1]="Error",v;var e}()},67410:function(e,t,n){"use strict";n.d(t,{R:function(){return l}});var o,i=n(86035),r=n(39754),a=n(41839),s=n(2316),l=(o=function(){return d(function e(t){var n,o=this;h(this,e),this.localStorageService=t,this.company=null===(n=this.localStorageService.retrieve("currentUser"))||void 0===n?void 0:n.company,this.onCompanyChange(),this.localStorage$=this.localStorageService.localStorage$.pipe((0,r.h)(function(e){return!e||"currentUser"===e})).subscribe({next:function(e){var t;o.company=e?null===(t=o.localStorageService.retrieve("currentUser"))||void 0===t?void 0:t.company:null,o.onCompanyChange()}})},[{key:"onCompanyChange",value:function(){var e;if(null===(e=this.company)||void 0===e?void 0:e.locale){var t=this.company.locale.split("-")[0];this.locale!==t&&(this.locale=t,n(77961)("./".concat(t,".js")).then(function(){i.locale(t)}).catch(function(){}))}}},{key:"calculateDayDifferences",value:function(e,t){var n=(t.valueOf()-e.valueOf())/1e3;return Math.floor(n/86400)+1}},{key:"generateTimeString",value:function(e){var t,n=24===(null===(t=this.company)||void 0===t?void 0:t.timePreferences)?"H:mm":"h:mma";return i(e).format(n)}},{key:"generateDateTimeString",value:function(e){return"".concat(this.generateTimeString(e)," ").concat(i(e).format("ddd MMM Do"))}},{key:"generateFullDateString",value:function(e){var t,n="dmy"===(null===(t=this.company)||void 0===t?void 0:t.datePreferences)?"D/M/YY":"M/D/YY";return i(e).format(n)}},{key:"generateDateMonthString",value:function(e){var t,n="dmy"===(null===(t=this.company)||void 0===t?void 0:t.datePreferences)?"D MMM":"MMM D";return i(e).format(n)}},{key:"generateDayString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?i(e).format("ddd"):i(e).format("dddd")}},{key:"formatDateDivider",value:function(e){var t=new Date(i().startOf("day").valueOf()),n=new Date(parseInt(e)),o=this.calculateDayDifferences(n,t);return 0===o?"Today, "+this.generateTimeString(n):1===o?"Yesterday, "+this.generateTimeString(n):o>1&&o<=7?this.generateDayString(n)+", "+this.generateTimeString(n):o>7&&o<=365?this.generateDayString(n,!0)+", "+this.generateDateMonthString(n)+", "+this.generateTimeString(n):this.generateDateMonthString(n)+", "+n.getFullYear()+", "+this.generateTimeString(n)}},{key:"getMessageDisplayTime",value:function(e){var t,n=i().valueOf()-i(e).valueOf();if(n<0||n<12e4)return"now";if(n<36e5)return(n/6e4).toFixed(0)+" mins ago";var o=24===(null===(t=this.company)||void 0===t?void 0:t.timePreferences)?"H:mm":"h:mma";return i(e).format(o)}},{key:"getTimezoneFromUtcOffset",value:function(e,t){var n=i.tz().utcOffset(e).format("Z"),o=i.tz.zonesForCountry(t);if(null==o?void 0:o.length){if(1===o.length)return o[0];var r=o.filter(function(e){return i.tz(e).format("Z")===n});if(null==r?void 0:r.length)return r[0]}return i.tz.guess()}},{key:"dowString",value:function(e){var t,n="dmy"===(null===(t=this.company)||void 0===t?void 0:t.datePreferences)?"ddd Do MMM YY":"ddd MMM Do YY";return i(e).format(n)}},{key:"autoFormat",value:function(e,t){var n,o,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.tz.guess();if(!this.company)return i(e).tz(a).format(t);if("dmy"===(null===(n=this.company)||void 0===n?void 0:n.datePreferences)){var s=["MMM","MM","M"],l=["Do","DD","D"],u=[];for(var c in s)if(t.includes(s[c])){u.push(s[c]);break}for(var d in l)if(t.includes(l[d])){u.push(l[d]);break}2==u.length&&(t=t.replace(new RegExp(u[0]+"|"+u[1],"g"),function(e){return e===u[1]?u[0]:u[1]}))}return(null===(o=this.company)||void 0===o?void 0:o.timePreferences)&&24==(null===(r=this.company)||void 0===r?void 0:r.timePreferences)&&(t=t.replace(/h/g,"H").replace(/a/g,"")),i(e).tz(a).format(t)}},{key:"getCalendarDays",value:function(e,t,n){var o,r,a=1;isNaN(null===(o=this.company)||void 0===o?void 0:o.sowPreferences)||(a=-1===(null===(r=this.company)||void 0===r?void 0:r.sowPreferences)?0:1);var s=i().tz(t).clone().startOf("day"),l=i(e).tz(t),u=l.clone().startOf("month"),c=l.clone().endOf("month"),d=l.clone().startOf("month").startOf("week").add(a,"d"),p=u.diff(d,"day");p<0&&(d=d.add(-7,"d"),p=u.diff(d,"day"));for(var h=u.daysInMonth(),v=7-(p+h)%7,m=[],f=0;f<=p-1;f++)m.push({enabled:!1,date:d.format("YYYY-MM-DD"),display:!1}),d.add(1,"day");for(var g=0;g<h;g++){var y=u.clone();m.push({enabled:!!(y.startOf("day").diff(s,"days")>=0&&y.isSameOrBefore(n)),date:u.format("YYYY-MM-DD"),display:!0}),u.add(1,"day")}if(v<7)for(var b=0;b<v;b++)c.add(1,"day"),m.push({enabled:!1,date:c.format("YYYY-MM-DD"),display:!1});return m}},{key:"ngOnDestroy",value:function(){var e;null===(e=this.localStorage$)||void 0===e||e.unsubscribe()}}])}(),o.\u0275fac=function(e){return new(e||o)(s.LFG(a.Z))},o.\u0275prov=s.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o)},25344:function(e,t,n){"use strict";n.d(t,{A:function(){return P}});var o,i,r,s,l,u,c,p=n(42321),v=n(87554),m=n(25742),f=n(53399),g=n(53792),y=n(19159),b=n(74672),k=n(88355),w=n(45027),A=n(54366),S=n(5332),C=n(75249),T=n(94850),U=n(2316),I=n(58916),P=function(){return d(function e(t){var n=this;h(this,e),this.loadingController=t,o.add(this),i.set(this,!1),r.set(this,null),s.set(this,new v.X(0)),l.set(this,(0,p.Q_)(this,s,"f").asObservable().pipe((0,m.T)(1),(0,f.U)(function(e){return e>0}),(0,g.x)(),(0,y.b)(function(e){return e?(0,p.Q_)(n,o,"m",u).call(n):(0,p.Q_)(n,o,"m",c).call(n)})).subscribe(function(){}))},[{key:"showLoader",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(0,p.YH)(this,i,e,"f");var t=(0,p.Q_)(this,s,"f").value;(0,p.Q_)(this,s,"f").next(t+1)}},{key:"hideLoader",value:function(){var e=(0,p.Q_)(this,s,"f").value;(0,p.Q_)(this,s,"f").next(Math.max(e-1,0))}},{key:"httpWrapperLoader",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,b.z)(this.observableWrapperLoader((0,k.D)(e),t))}},{key:"observableWrapperLoader",value:function(e){var t,n=this,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.showLoader(o),e.pipe((0,f.U)(function(e){return t=e}),(0,w.x)(),(0,A.w)(function(e){return e?(n.hideLoader(),S.E):(0,C.of)(t)}),(0,T.x)(function(){n.hideLoader()}))}},{key:"ngOnDestroy",value:function(){(0,p.Q_)(this,l,"f").unsubscribe()}}])}();i=new WeakMap,r=new WeakMap,s=new WeakMap,l=new WeakMap,o=new WeakSet,u=function(){return(0,p.mG)(this,void 0,void 0,a().mark(function e(){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=(0,p.Q_)(this,r,"f"),e.t0){e.next=11;break}return e.t1=p.YH,e.t2=this,e.t3=r,e.next=7,this.loadingController.create({showBackdrop:!1,spinner:(0,p.Q_)(this,i,"f")?"crescent":null});case 7:return e.t4=e.sent,(0,e.t1)(e.t2,e.t3,e.t4,"f"),e.next=11,(0,p.Q_)(this,r,"f").present();case 11:case"end":return e.stop()}},e,this)}))},c=function(){return(0,p.mG)(this,void 0,void 0,a().mark(function e(){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=!(0,p.Q_)(this,r,"f"),e.t0){e.next=5;break}return e.next=4,(0,p.Q_)(this,r,"f").dismiss();case 4:(0,p.YH)(this,r,null,"f");case 5:case"end":return e.stop()}},e,this)}))},P.\u0275fac=function(e){return new(e||P)(U.LFG(I.HT))},P.\u0275prov=U.Yz7({token:P,factory:P.\u0275fac,providedIn:"root"})},96636:function(e,t,n){"use strict";n.d(t,{_:function(){return $}});var o,s=n(42321),l=n(32975),u=n(53882),c=n(44128),p=n(94354),v=n(87554),m=n(31682),f=n(20710),g=n(75249),y=n(7964),b=n(92340),k=n(39754),w=n(53399),A=n(53792),S=n(98067),C=n(7048),T=n(82426),U=n(49260),I=n(15433),P=n(89131),x=n(21298),D=n(34138),_=n(41839),M=n(6469),L=n(4084),O=n(20766),Z=n(25344),E=n(4200),N=n(32609),R=n(20099),q=n(15435),j={newBookingBtn:"New",bookingsBtn:"Bookings",profileBtn:"Profile",paymentsBtn:"Payments",referralBtn:"Referral",helpBtn:"Help",notificationsBtn:"Notifications",guestTitle:"Guest",loginOrSignUp:"Login or sign up",loginTitle:"Welcome",emailPlaceholder:"Email",passwordPlaceholder:"Password",forgotBtn:"Forgot",loginBtn:"Login",orLoginWith:"Or login with",noAccount:"Don't have an account?",login:"Login",signup:"Sign up",phonePlaceholder:"Phone Number",companyNamePlaceholder:"Company Name",cPasswordPlaceholder:"Confirm Password",createAccount:"Create Account",orSignupWith:"Or Sign up with",profile:"Profile",delete:"Delete",logout:"Logout",save:"Save",viewOptions:"View Options",additionalNotes:"Additional Notes",required:"Required",validEmail:"Enter a valid email",numberValidator:"Invalid Phone Number",minPassword:"Password must be at least 5 characters long.",passwordMismatch:"Password mismatch",or:"or",add:"Add",update:"Update",remove:"Remove",earliest:"Earliest",hour:"hour",shortHour:"h",min:"min",continueAsGuest:"Continue As Guest",loginSignUpBtn:"Login / Sign up",summaryTitle:"Confirmation",location:"Location",dateTime:"Date & Time",yourDetails:"Your Details",summary:"Summary",subTotal:"Sub Total",tax:"Tax",inclusive:"Inclusive",total:"Total",decline:"Decline",accept:"Accept",bookingsTitle:"Bookings",all:"All",upcoming:"Upcoming",repeat:"Repeat",past:"Past",cancelled:"Cancelled",noJobsFound:"No Jobs Found",bookNow:"Book Now",paymentMethods:"Payment Methods",cards:"Cards",cash:"Cash",invoice:"Invoice",thanks:"Thanks",view:"View",viewOurWebsite:"View Our Website",requestedASAP:"Requested ASAP",accepted:"Accepted",onTheWay:"On the way",arrived:"Arrived",inProgress:"In-progress",signatureAdded:"Signature Added",jobCompleted:"Job Completed",quoteRequested:"Quote Requested",quoteSent:"Quote Sent",noCharge:"No Charge",owing:"Owing",paid:"Paid",cancel:"Cancel",reschedule:"Reschedule",showMore:"Show More",showLess:"Show Less",createABooking:"Create a booking",enterYourAddressAbove:"Enter your address above!",selectedServices:"Selected Services",crewMessage:"*Please note a crew of #%#dynamic_replace#%# will arrive for each time selected.",multiSlotSelection:"*Please select #%#dynamic_replace#%# times below:",noTimesAvailable:"No times available.",tryAnotherDay:"Please try another day or service.",contactUsForReschedule:"Please contact us to reschedule this job.",promoCode:"Promo Code",bookingStatus:b.N.bookingStatus},F=n(40108),B=n(18459),G=n(21788),z=n(2316),Y=((o=function(){return d(function e(){h(this,e),this.defaultCurrency="USD",this.listOfCurrencies=[{country:"AF",symbol:"AFN"},{country:"AL",symbol:"ALL"},{country:"DZ",symbol:"DZD"},{country:"AS",symbol:"USD"},{country:"AD",symbol:"EUR"},{country:"AO",symbol:"AOA"},{country:"AI",symbol:"USD"},{country:"AQ",symbol:"USD"},{country:"AG",symbol:"XCD"},{country:"AR",symbol:"ARS"},{country:"AM",symbol:"AMD"},{country:"AW",symbol:"AWG"},{country:"AC",symbol:"USD"},{country:"AU",symbol:"AUD"},{country:"AT",symbol:"EUR"},{country:"AZ",symbol:"AZN"},{country:"BS",symbol:"BSD"},{country:"BH",symbol:"BHD"},{country:"BD",symbol:"BDT"},{country:"BB",symbol:"BBD"},{country:"BY",symbol:"BYN"},{country:"BE",symbol:"EUR"},{country:"BZ",symbol:"BZD"},{country:"BJ",symbol:"XOF"},{country:"BM",symbol:"USD"},{country:"BT",symbol:"BTN"},{country:"BO",symbol:"BOB"},{country:"BA",symbol:"USD"},{country:"BW",symbol:"BWP"},{country:"BV",symbol:"USD"},{country:"BR",symbol:"BRL"},{country:"IO",symbol:"USD"},{country:"BN",symbol:"BND"},{country:"BG",symbol:"BGN"},{country:"BF",symbol:"USD"},{country:"BI",symbol:"USD"},{country:"KH",symbol:"USD"},{country:"CM",symbol:"XAF"},{country:"CA",symbol:"CAD"},{country:"CV",symbol:"USD"},{country:"KY",symbol:"USD"},{country:"CF",symbol:"USD"},{country:"TD",symbol:"USD"},{country:"CL",symbol:"CLP"},{country:"CN",symbol:"CNY"},{country:"CX",symbol:"USD"},{country:"CC",symbol:"USD"},{country:"CO",symbol:"COP"},{country:"KM",symbol:"USD"},{country:"CG",symbol:"USD"},{country:"CD",symbol:"USD"},{country:"CK",symbol:"NZD"},{country:"CR",symbol:"CRC"},{country:"CI",symbol:"XOF"},{country:"HR",symbol:"EUR"},{country:"CU",symbol:"USD"},{country:"CY",symbol:"EUR"},{country:"CZ",symbol:"CZK"},{country:"DK",symbol:"DKK"},{country:"DJ",symbol:"USD"},{country:"DM",symbol:"XCD"},{country:"DO",symbol:"DOP"},{country:"TP",symbol:"USD"},{country:"EC",symbol:"USD"},{country:"EG",symbol:"EGP"},{country:"SV",symbol:"USD"},{country:"GQ",symbol:"USD"},{country:"ER",symbol:"ERN"},{country:"EE",symbol:"EUR"},{country:"ET",symbol:"ETB"},{country:"FK",symbol:"FKP"},{country:"FO",symbol:"DKK"},{country:"FJ",symbol:"FJD"},{country:"FI",symbol:"EUR"},{country:"FR",symbol:"EUR"},{country:"GF",symbol:"EUR"},{country:"PF",symbol:"USD"},{country:"TF",symbol:"EUR"},{country:"GA",symbol:"USD"},{country:"GM",symbol:"GMD"},{country:"GE",symbol:"USD"},{country:"DE",symbol:"EUR"},{country:"GH",symbol:"USD"},{country:"GI",symbol:"GBP"},{country:"GR",symbol:"EUR"},{country:"GL",symbol:"DKK"},{country:"GD",symbol:"XCD"},{country:"GP",symbol:"USD"},{country:"GU",symbol:"USD"},{country:"GT",symbol:"GTQ"},{country:"GG",symbol:"GBP"},{country:"GN",symbol:"USD"},{country:"GW",symbol:"USD"},{country:"GY",symbol:"GYD"},{country:"HT",symbol:"USD"},{country:"HM",symbol:"USD"},{country:"HN",symbol:"HNL"},{country:"HK",symbol:"HKD"},{country:"HU",symbol:"HUF"},{country:"IS",symbol:"ISK"},{country:"IN",symbol:"INR"},{country:"ID",symbol:"IDR"},{country:"IR",symbol:"IRR"},{country:"IQ",symbol:"IQD"},{country:"IE",symbol:"EUR"},{country:"IM",symbol:"GBP"},{country:"IL",symbol:"ILS"},{country:"IT",symbol:"EUR"},{country:"JM",symbol:"JMD"},{country:"JP",symbol:"JPY"},{country:"JE",symbol:"GBP"},{country:"JO",symbol:"JOD"},{country:"KZ",symbol:"USD"},{country:"KE",symbol:"KES"},{country:"KI",symbol:"USD"},{country:"KP",symbol:"KRW"},{country:"KR",symbol:"KRW"},{country:"KW",symbol:"KWD"},{country:"KG",symbol:"USD"},{country:"LA",symbol:"USD"},{country:"LV",symbol:"LVL"},{country:"LB",symbol:"LBP"},{country:"LS",symbol:"ZAR"},{country:"LR",symbol:"USD"},{country:"LY",symbol:"LYD"},{country:"LI",symbol:"CHF"},{country:"LT",symbol:"LTL"},{country:"LU",symbol:"EUR"},{country:"MO",symbol:"MOP"},{country:"MK",symbol:"MKD"},{country:"MG",symbol:"USD"},{country:"MW",symbol:"MWK"},{country:"MY",symbol:"MYR"},{country:"MV",symbol:"USD"},{country:"ML",symbol:"USD"},{country:"MT",symbol:"EUR"},{country:"MH",symbol:"USD"},{country:"MQ",symbol:"EUR"},{country:"MR",symbol:"USD"},{country:"MU",symbol:"MUR"},{country:"YT",symbol:"EUR"},{country:"MX",symbol:"MXN"},{country:"FM",symbol:"USD"},{country:"MD",symbol:"USD"},{country:"MC",symbol:"EUR"},{country:"MN",symbol:"USD"},{country:"MS",symbol:"XCD"},{country:"MA",symbol:"MAD"},{country:"MZ",symbol:"USD"},{country:"MM",symbol:"USD"},{country:"NA",symbol:"USD"},{country:"NR",symbol:"AUD"},{country:"NP",symbol:"NPR"},{country:"NL",symbol:"EUR"},{country:"AN",symbol:"ANG"},{country:"NC",symbol:"USD"},{country:"NZ",symbol:"NZD"},{country:"NI",symbol:"NIO"},{country:"NE",symbol:"USD"},{country:"NG",symbol:"NGN"},{country:"NU",symbol:"NZD"},{country:"NF",symbol:"AUD"},{country:"MP",symbol:"USD"},{country:"NO",symbol:"NOK"},{country:"OM",symbol:"OMR"},{country:"PK",symbol:"PKR"},{country:"PW",symbol:"USD"},{country:"PS",symbol:"USD"},{country:"PA",symbol:"PAB"},{country:"PG",symbol:"PGK"},{country:"PY",symbol:"PYG"},{country:"PE",symbol:"PEN"},{country:"PH",symbol:"PHP"},{country:"PN",symbol:"USD"},{country:"PL",symbol:"PLN"},{country:"PT",symbol:"EUR"},{country:"PR",symbol:"USD"},{country:"QA",symbol:"QAR"},{country:"RE",symbol:"USD"},{country:"RO",symbol:"RON"},{country:"RU",symbol:"RUB"},{country:"RW",symbol:"RWF"},{country:"KN",symbol:"XCD"},{country:"LC",symbol:"XCD"},{country:"VC",symbol:"XCD"},{country:"WS",symbol:"WST"},{country:"SM",symbol:"EUR"},{country:"ST",symbol:"USD"},{country:"SA",symbol:"SAR "},{country:"SN",symbol:"USD"},{country:"CS",symbol:"EUR"},{country:"RS",symbol:"RSD"},{country:"SC",symbol:"USD"},{country:"SL",symbol:"USD"},{country:"SG",symbol:"SGD"},{country:"SK",symbol:"EUR"},{country:"SI",symbol:"EUR"},{country:"SB",symbol:"SBD"},{country:"SO",symbol:"USD"},{country:"ZA",symbol:"R"},{country:"GS",symbol:"USD"},{country:"ES",symbol:"EUR"},{country:"LK",symbol:"LKR"},{country:"SH",symbol:"USD"},{country:"PM",symbol:"USD"},{country:"SD",symbol:"USD"},{country:"SR",symbol:"USD"},{country:"SJ",symbol:"USD"},{country:"SZ",symbol:"SZL"},{country:"SE",symbol:"SEK"},{country:"CH",symbol:"CHF"},{country:"SY",symbol:"SYP"},{country:"TW",symbol:"TWD"},{country:"TJ",symbol:"USD"},{country:"TZ",symbol:"TZS"},{country:"TH",symbol:"THB"},{country:"TG",symbol:"USD"},{country:"TK",symbol:"USD"},{country:"TO",symbol:"TOP"},{country:"TT",symbol:"TTD"},{country:"TN",symbol:"TND"},{country:"TR",symbol:"TRY"},{country:"TM",symbol:"USD"},{country:"TC",symbol:"USD"},{country:"TV",symbol:"USD"},{country:"UM",symbol:"USD"},{country:"UG",symbol:"UGX"},{country:"UA",symbol:"UAH"},{country:"AE",symbol:"AED"},{country:"UK",symbol:"\xa3"},{country:"GB",symbol:"GBP"},{country:"US",symbol:"USD"},{country:"UY",symbol:"USD"},{country:"UZ",symbol:"UZS"},{country:"VU",symbol:"VUV"},{country:"VA",symbol:"USD"},{country:"VE",symbol:"VEF"},{country:"VN",symbol:"VND"},{country:"VG",symbol:"USD"},{country:"VI",symbol:"USD"},{country:"WF",symbol:"USD"},{country:"EH",symbol:"USD"},{country:"YE",symbol:"YER"},{country:"ZM",symbol:"USD"},{country:"ZW",symbol:"ZWL"}]},[{key:"getCurrentCurrencySymbol",value:function(e){var t=this.listOfCurrencies.find(function(t){return t.country===e});return t?t.symbol:this.defaultCurrency}}])}()).\u0275fac=function(e){return new(e||o)},o.\u0275prov=z.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o),V=n(32316),H=n(58916),Q=n(71570),J=n(5511),W=n(28733),K=.000621371192,$=function(){var e=function(){return d(function e(t,n,o,i,a,s,l,u,d,f,g,y,C,T,U,I,P,x,D,_){var M=this;h(this,e),this.http=t,this.localStorageService=n,this.fieldLocaleService=o,this.router=i,this.platform=a,this.appVersion=s,this.geolocation=l,this.alertService=u,this.titleService=d,this.metaService=f,this.angularFireAuth=g,this.fieldAlertService=y,this.imageResizePipe=C,this.firebaseX=T,this.signInWithApple=U,this.googlePlus=I,this.commonHelper=P,this.loadingService=x,this.fingerprintAIO=D,this.modalService=_,this.fielddAuthUrl=b.N.baseUrl+"/user/login",this.fieldRegistrationUrl=b.N.baseUrl+"/v2/user/register",this.fieldForgotPasswordUrl=b.N.baseUrl+"/v2/user/forgotPassword",this.fieldResetPasswordUrl=b.N.baseUrl+"/v2/user/resetPassword",this.fieldCheckFirstTimeLoginUrl=b.N.baseUrl+"/v2/user/checkFirstTimeLogin",this.setFirstTimeBiometricLoginUrl=b.N.baseUrl+"/v2/user/biometric",this.getUserUrl=b.N.baseUrl+"/user/portal/getuser",this.fieldGetCompanyUrl=b.N.baseUrl+"/v2/user/company",this.refreshUserDataUrl=b.N.baseUrl+"/v2/user",this.getCompanyForDemoUrl=b.N.baseUrl+"/v2/user/getCompanyForDemo",this.getDefaultCompaniesUrl=b.N.baseUrl+"/company/defaultCompanies",this.checkForPendingRatingUrl=b.N.baseUrl+"/v2/user/fetchUnratedOrder",this.registerTokenUrl=b.N.baseUrl+"/v2/user/registerToken",this.portalVisitUrl=b.N.baseUrl+"/user/portal/analytic/visit",this.hasRequestedJobUrl=b.N.baseUrl+"/v2/user/hasResquestedOrder",this.getAppRedirectionUrl=b.N.baseUrl+"/user/portal/redirectApp",this.updateMarketingClickUrl=b.N.baseUrl+"/v2/user/marketing/clicked",this.refreshCustomerAssetsUrl=b.N.baseUrl+"/v2/user/assets",this.addCustomerAssetUrl=b.N.baseUrl+"/v2/user/asset",this.updateCustomerAssetUrl=b.N.baseUrl+"/v2/user/asset/",this.deleteCustomerAssetUrl=b.N.baseUrl+"/v2/user/asset/",this.updateUserPermissionUrl=b.N.baseUrl+"/v2/user/permission",this.logoutUrl=b.N.baseUrl+"/logout",this.previousAddressesUrl=b.N.baseUrl+"/customer/addresses",this.externalLoginUrl=b.N.baseUrl+"/external/login",this._isOnCRM=!1,this.crmEvents$=new p.x,this.userChanged$=new v.X(!1),this.companyChanged$=new v.X(!1),this.mapReady$=new v.X(!1),this.assetsChanged$=new v.X(!1),this.assets$=this.assetsChanged$.pipe((0,k.h)(function(e){return!!e}),(0,w.U)(function(){return M.getCustomerAssets()}),(0,A.x)(c),(0,S.d)(1),(0,w.U)(B.Xh)),this.user$=this.userChanged$.pipe((0,w.U)(function(){return M.isUserLoggedIn()?M.getCurrentUserInfo():null}),(0,A.x)(c),(0,S.d)(1),(0,w.U)(B.Xh)),this.company$=this.companyChanged$.pipe((0,k.h)(function(e){return!!e}),(0,w.U)(function(){return M.getCurrentUserCompanyInfo()}),(0,A.x)(c),(0,S.d)(1),(0,w.U)(B.Xh)),this.mappedAssets$=(0,m.a)([this.assets$,this.company$]).pipe((0,w.U)(function(e){var t=r(e,2),n=t[0],o=t[1];return M.commonHelper.mapAssetList(n,o)}),(0,A.x)(c),(0,S.d)(1),(0,w.U)(B.Xh)),this.dynamicText$=this.companyChanged$.pipe((0,w.U)(function(){return M.getDynamicText()}),(0,A.x)(c),(0,S.d)(1),(0,w.U)(B.Xh)),this.hasRedirectedFromFirebase=!1,this.appVersion$=new v.X(""),this.platform.ready().then(function(){M.isBrowser()||M.appVersion.getVersionNumber().then(function(e){M.appVersion$.next(e)})}),this.checkForRedirectAuth(),window.addEventListener("message",function(e){("http://localhost:8080"===e.origin||"https://admin.fieldd.co"===e.origin||"https://admin.fieldd-staging.com"===e.origin)&&M.onCRMEvents(e.data)})},[{key:"isOnCRM",get:function(){return this._isOnCRM},set:function(e){this._isOnCRM=e}},{key:"isWhiteLabel",get:function(){var e=this.getCurrentUserCompanyInfo();return!!b.N.companyID||(null==e?void 0:e.isWhiteLabel)}},{key:"onCRMEvents",value:function(e){var t=e.eventType,n=e.data;switch(t){case I.I6.isPortalPreview:this.isOnCRM=!0;break;case I.I6.changeLogo:(null==n?void 0:n.clientAppImage)&&this.updateClientAppSetting({clientAppImage:n.clientAppImage});break;case I.I6.changeColor:var o={},i=n.clientAppFeatureColourHex,r=n.clientAppMainColourHex;if(i){o.clientAppFeatureColourHex=i;var a=this.commonHelper.hexToRgb(i);o.clientAppFeatureColourRgb=a?Object.values(a):""}if(r){o.clientAppMainColourHex=r;var s=this.commonHelper.hexToRgb(r);o.clientAppMainColourRgb=s?Object.values(s):""}this.updateClientAppSetting(o)}this.crmEvents$.next(e)}},{key:"setUserInLogRocket",value:function(){try{if(window.logrocketInitialized){var e=this.getCurrentUserInfo(),t=this.getCurrentUserCompanyInfo();e&&t&&q.identify(t.name+" - "+e._id,{emailId:e.emailID,companyName:t.name,companyEmail:t.emailID,companyId:t._id})}}catch(e){}}},{key:"setCompanyInLogRocket",value:function(){try{if(window.logrocketInitialized){var e=this.getCurrentUserCompanyInfo();e&&q.identify(e.name+" - "+e._id,{companyName:e.name,companyEmail:e.emailID,companyId:e._id})}}catch(e){}}},{key:"updateUserPermission",value:function(e,t){return(0,f.n)(this.http.post(this.updateUserPermissionUrl,{permissionType:e,permissionValue:t}))}},{key:"addCustomerAsset",value:function(e){return(0,f.n)(this.http.post(this.addCustomerAssetUrl,e))}},{key:"updateCustomerAsset",value:function(e,t){return(0,f.n)(this.http.put(this.updateCustomerAssetUrl+e,t))}},{key:"deleteCustomerAsset",value:function(e){var t=this;return(0,f.n)(this.http.delete(this.deleteCustomerAssetUrl+e).pipe((0,C.b)(function(n){if(null==n?void 0:n.success){var o=t.getCustomerAssets(),i=o.findIndex(function(t){return t._id===e});i>-1&&(o.splice(i,1),t.setCustomerAssets(o),t.assetsChanged$.next(!0))}})))}},{key:"getPreviousAddresses",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return(0,f.n)(this.http.get("".concat(this.previousAddressesUrl,"/").concat(e,"/").concat(t))).then(function(e){return(null==e?void 0:e.success)?e.data:[]}).catch(function(){return[]})}},{key:"login",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.http.post(this.fielddAuthUrl,e,this.getCaptchaHeaders(I.Ho.LOGIN)).pipe((0,C.b)(function(e){var o;if(e.firstTimeLogin)return e;t.localStorageService.store("isLoggedIn",!0),t.localStorageService.store("countryCurrency",t.fieldLocaleService.getCurrentCurrencySymbol(e.company.activeCountry.toUpperCase())),e.clientAppSettings&&(t.setClientAppSettings(e.clientAppSettings),delete e.clientAppSettings),(null===(o=e.user)||void 0===o?void 0:o.appPermission)&&t.setAppPermissions(e.user.appPermission),t.localStorageService.store("currentUser",e),t.storeCustomerEmail(e.user.emailID),n||t.checkForPendingRating(),t.getFirebaseToken(),t.refreshCustomerAssets(),t.userChanged$.next(!0),t.setUserInLogRocket()}),(0,T.K)(this.handleError))}},{key:"refreshCustomerAssets",value:function(){var e=this;return(0,f.n)(this.http.get(this.refreshCustomerAssetsUrl)).then(function(t){e.setCustomerAssets((null==t?void 0:t.data)||[]),e.assetsChanged$.next(!0)}).catch(function(){})}},{key:"setCustomerAssets",value:function(e){this.localStorageService.store("customerAssets",e)}},{key:"getCustomerAssets",value:function(){return this.localStorageService.retrieve("customerAssets")||[]}},{key:"getAppPermissions",value:function(){return this.localStorageService.retrieve("appPermissions")}},{key:"setAppPermissions",value:function(e){this.localStorageService.store("appPermissions",e)}},{key:"updateLocalAsset",value:function(e){var t=!0,n=this.getCustomerAssets();n=n.map(function(n){return n._id===e._id?(t=!1,e):n}),t&&n.unshift(e),this.setCustomerAssets(n),this.assetsChanged$.next(!0)}},{key:"getCustomerEmail",value:function(){var e,t=this.localStorageService.retrieve("currentUser"),n=this.localStorageService.retrieve("emailId");return(null===(e=null==t?void 0:t.user)||void 0===e?void 0:e.emailID)||n}},{key:"getBiometricEnabled",value:function(){return this.localStorageService.retrieve("isBiometricEnabled")}},{key:"getDeviceID",value:function(){var e,t=this.localStorageService.retrieve("deviceDetails");return null===(e=null==t?void 0:t.device)||void 0===e?void 0:e.deviceId}},{key:"storeBiometricEnabled",value:function(e){return this.localStorageService.store("isBiometricEnabled",e)}},{key:"storeCustomerEmail",value:function(e){this.localStorageService.store("emailId",e)}},{key:"getCurrentCurrency",value:function(){return this.localStorageService.retrieve("countryCurrency")}},{key:"showBiometricPopUp",value:function(e){var t=this;if(!this.isBrowser())return this.alertService.showActionBox("Log In Faster on This Device","Please enable this device's fingerprint or face recognition for a faster and more secure login experience.","Trust this device","Disable").then(function(n){if(t.storeBiometricEnabled(n),t.getCustomerEmail()&&n)return t.biometricAuthenticateService(!0,!1,e)})}},{key:"biometricAuthenticateService",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0,r=this.getDeviceID(),a=this.getCustomerEmail(),s=this.getBiometricEnabled()||!1,l=null===(e=this.getCurrentUserCompanyInfo())||void 0===e?void 0:e._id;if(!o||a&&s){if(!a)return this.alertService.showMessage("Oops","Please login for the first time in order to active the biometric authentication.");if(!s)return this.showBiometricPopUp(i);this.fingerprintAIO.isAvailable().then(function(e){"biometric"===e||"finger"===e||"face"===e?t.fingerprintAIO.show({title:"Biometric Authentication",description:"Please authenticate"}).then(function(e){if(e){var o={emailID:a,biometricEnabled:s,deviceId:r,companyID:l};n?t.setFirstTimeBiometricLogin({emailID:a,deviceId:r,companyId:l}).subscribe(function(e){(null==e?void 0:e.success)&&t.login(o).subscribe(function(e){e&&(t.storeBiometricEnabled(!0),i&&i())})},function(){t.alertService.showMessage("Oops","Please login for the first time in order to active the biometric authentication.")}):t.login(o).subscribe(function(e){e&&(t.storeBiometricEnabled(!0),i&&i())})}}).catch(function(e){(null==e?void 0:e.code)!==t.fingerprintAIO.BIOMETRIC_DISMISSED&&t.alertService.showMessage("Oops","Please login for the first time in order to active the biometric authentication.")}):t.alertService.showMessage("Oops","Please login for the first time in order to active the biometric authentication.")},function(){t.alertService.showMessage("Oops","Device does not support biometric authentication.")})}}},{key:"logout",value:function(){var e=this;this.http.get(this.logoutUrl).subscribe(function(t){return e.resetAppAndCompanySettings()},function(t){e.resetAppAndCompanySettings()})}},{key:"resetAllData",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.localStorageService.clear(),e&&this.router.navigate([""])}},{key:"resetAppAndCompanySettings",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getCurrentUserCompanyInfo(),n=this.getAppSettings(),o=this.getBiometricEnabled(),i=this.getCustomerEmail(),r=this.localStorageService.retrieve("deviceDetails");this.localStorageService.clear(),this.storeCustomerEmail(i),this.localStorageService.store("deviceDetails",r),o&&this.storeBiometricEnabled(o),this.setOnlyCompanyData(t),this.setClientAppSettings(n),e&&this.router.navigateByUrl("/login",{replaceUrl:!0}),this.userChanged$.next(!1),this.assetsChanged$.next(!0)}},{key:"signup",value:function(e){return this.http.post(this.fieldRegistrationUrl,e).pipe((0,T.K)(this.handleError))}},{key:"forgotPasswordRequest",value:function(e){return this.http.post(this.fieldForgotPasswordUrl,e).pipe((0,T.K)(this.handleError))}},{key:"resetPasswordRequest",value:function(e){return this.http.post(this.fieldResetPasswordUrl,e).pipe((0,T.K)(this.handleError))}},{key:"validateGuestUser",value:function(e,t){return this.http.post(this.getUserUrl,{emailID:e,companyID:t}).pipe((0,w.U)(function(t){var n;return(null==t?void 0:t.success)&&(null===(n=t.doc)||void 0===n?void 0:n.firstName)?(t.doc.emailID=e,t):null}),(0,T.K)(function(){return(0,g.of)(null)}))}},{key:"isUserLoggedIn",value:function(){return this.localStorageService.retrieve("isLoggedIn")}},{key:"getAuthenticatedUserData",value:function(){return this.localStorageService.retrieve("currentUser")}},{key:"getCurrentUserInfo",value:function(){var e=this.getAuthenticatedUserData();return null==e?void 0:e.user}},{key:"getCurrentUserAuthInfo",value:function(){var e=this.getAuthenticatedUserData();return null==e?void 0:e.auth}},{key:"getCurrentUserCompanyInfo",value:function(){var e=this.getAuthenticatedUserData();return null==e?void 0:e.company}},{key:"getAppSettings",value:function(){return this.localStorageService.retrieve("appSettings")||{}}},{key:"getDynamicText",value:function(){var e,t=(null===(e=this.getAppSettings())||void 0===e?void 0:e.dynamicText)||{};return Object.entries(j).forEach(function(e){var n=r(e,2),o=n[0],i=n[1];"object"==typeof t[o]||"string"==typeof t[o]||(t[o]=i||"")}),t}},{key:"setSessionToken",value:function(e){this.localStorageService.store("session-token",e)}},{key:"getSessionToken",value:function(){return this.localStorageService.retrieve("session-token")}},{key:"handleError",value:function(e){return(0,y._)(e)}},{key:"updateCompanyData",value:function(e){var t=this.getAuthenticatedUserData();t.company=e,this.localStorageService.store("currentUser",t),this.localStorageService.store("countryCurrency",this.fieldLocaleService.getCurrentCurrencySymbol(e.activeCountry))}},{key:"updateLoggedInUserInfo",value:function(e){for(var t=this.getAuthenticatedUserData(),n=0,o=Object.keys(e);n<o.length;n++){var i=o[n];t.user[i]=e[i]}this.localStorageService.store("currentUser",t),this.userChanged$.next(!0)}},{key:"updateLoggedInUserByProp",value:function(e){var t=this.getAuthenticatedUserData();for(var n in e)t.user[n]=e[n];this.localStorageService.store("currentUser",t),this.userChanged$.next(!0)}},{key:"updateLoggedInUser",value:function(e){var t=this.getAuthenticatedUserData();t.user=e,this.localStorageService.store("currentUser",t),this.userChanged$.next(!0)}},{key:"checkFirstTimeLogin",value:function(e){return(0,f.n)(this.http.post(this.fieldCheckFirstTimeLoginUrl,e))}},{key:"setFirstTimeBiometricLogin",value:function(e){return this.http.post(this.setFirstTimeBiometricLoginUrl,e).pipe((0,T.K)(this.handleError))}},{key:"updateBiometricLogin",value:function(){var e,t=this;if(this.getBiometricEnabled()){var n=!0,o={emailID:this.getCustomerEmail(),deviceId:this.getDeviceID(),companyId:null===(e=this.getCurrentUserCompanyInfo())||void 0===e?void 0:e._id};(0,f.n)(this.setFirstTimeBiometricLogin(o)).then(function(e){(null==e?void 0:e.success)||(n=!1)}).catch(function(){n=!1}).finally(function(){t.storeBiometricEnabled(n)})}}},{key:"checkForPendingRating",value:function(){var e=this;this.http.get("".concat(this.checkForPendingRatingUrl)).subscribe(function(t){(null==t?void 0:t.success)&&(null==t?void 0:t.order)&&e.openRatingModalCb&&e.openRatingModalCb(t.order)},function(){})}},{key:"isDesktop",value:function(){return this.platform.is("desktop")}},{key:"isBrowser",value:function(){return!this.platform.is("cordova")||this.platform.is("cordova")&&!(null==b.N?void 0:b.N.companyID)}},{key:"isIframe",value:function(){try{return window.self!==window.top}catch(e){return!0}}},{key:"setFavIconImg",value:function(e){var t=document.querySelector("link[rel*='icon']")||document.createElement("link");t.type="image/x-icon",t.rel="shortcut icon",t.href=e,document.getElementsByTagName("head")&&document.getElementsByTagName("head").length&&document.getElementsByTagName("head")[0].appendChild(t)}},{key:"setOgData",value:function(e,t){t&&(document.head.innerHTML+='<meta property="og:title" content="'.concat(t,'" />')),e&&(document.head.innerHTML+='<meta property="og:image" content="'.concat(e,'" />'))}},{key:"getCompanyForDemo",value:function(e){return(0,f.n)(this.http.post(this.getCompanyForDemoUrl,{code:e}))}},{key:"getDefaultCompanies",value:function(){return(0,f.n)(this.http.get(this.getDefaultCompaniesUrl))}},{key:"refreshCompanyDetailsFromServer",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(function(n,o){var i={};(!e.isBrowser()||e.isOnCRM&&b.N.companyID)&&(i={companyId:b.N.companyID});var r={headers:(new u.WM).set("ignore-version-check","true")};e.http.post(e.fieldGetCompanyUrl,i,r).subscribe(function(o){var i;if(o&&o.success){var r=Promise.resolve(!0);e.getAuthenticatedUserData()?e.updateCompanyData(o.company):e.setOnlyCompanyData(o.company),e.setClientAppSettings(o.clientAppSettings),t&&(e.paymentPromise=e.addExternalScripts(),e.implementAnalytics(),e.setTitle()),e.companyChanged$.next(!0),e.isUserLoggedIn()&&(t?e.refreshUser():e.userChanged$.next(!0)),(null===(i=window.location.href)||void 0===i?void 0:i.includes("/404"))&&e.hasOnlinePortalAccess()&&(r=e.router.navigate([""])),e.setCompanyInLogRocket(),e.isOnCRM&&r.then(function(){setTimeout(function(){window.top.postMessage({eventType:I.I6.onDataLoaded},"*")},300)}),n({})}},function(t){var o={};switch(t.status){case 400:o.serverError=!0;break;case 403:o.isDisabled=!0;break;case 451:o.isPaymentRequired=!0;break;default:o.isNotFound=!0}e.isBrowser()&&(e.localStorageService.clear(),e.userChanged$.next(!1),e.companyChanged$.next(!1)),e.router.navigate(["404"],{state:o}),n({})})})}},{key:"hasOnlinePortalAccess",value:function(){var e;return null===(e=this.getCurrentUserCompanyInfo())||void 0===e?void 0:e.hasOnlinePortalAccess}},{key:"restrictDynamicMapFlag",get:function(){return this._restrictDynamicMapFlag},set:function(e){this._restrictDynamicMapFlag=e}},{key:"refreshUser",value:function(){var e=this;this.http.get(this.refreshUserDataUrl).subscribe(function(t){var n;(null==t?void 0:t.success)&&((null===(n=t.user)||void 0===n?void 0:n.appPermission)&&e.setAppPermissions(t.user.appPermission),e.updateLoggedInUserInfo(t.user),e.refreshCustomerAssets())})}},{key:"setTitle",value:function(){var e=this.getCurrentUserCompanyInfo();(null==e?void 0:e.name)&&(this.titleService.setTitle("Book Online | "+e.name),this.metaService.addTag({name:"description",content:"Book "+e.serviceName+" online in "+e.cities+". Select your service and we will send an online booking confirmation instantly"}))}},{key:"updateClientAppSetting",value:function(e){for(var t=this.getAppSettings(),n=0,o=Object.entries(e);n<o.length;n++){var i=r(o[n],2),a=i[0],s=i[1];t[a]=s}this.localStorageService.store("appSettings",t),this.setStyleVariables(t),this.companyChanged$.next(this.companyChanged$.getValue())}},{key:"setClientAppSettings",value:function(e){this.setStyleVariables(e),this.localStorageService.store("appSettings",e)}},{key:"setOnlyCompanyData",value:function(e){this.localStorageService.store("currentUser",{company:e}),this.localStorageService.store("countryCurrency",this.fieldLocaleService.getCurrentCurrencySymbol(null==e?void 0:e.activeCountry))}},{key:"getFirebaseToken",value:function(){var e=this;if(!this.isBrowser())return this.firebaseX.getToken().then(function(t){var n,o={device:{deviceId:t,deviceType:e.platform.is("ios")||"ios"===(null===(n=null==window?void 0:window.cordova)||void 0===n?void 0:n.platformId)?"iOS":"Android"}};e.storeFirebaseToken(o),e.registerToken(o),e.updateBiometricLogin()})}},{key:"registerToken",value:function(e){var t,n=this.localStorageService.retrieve("deviceDetails");(null===(t=null==n?void 0:n.device)||void 0===t?void 0:t.deviceId)&&this.http.post(this.registerTokenUrl,e).subscribe(function(e){})}},{key:"storeFirebaseToken",value:function(e){this.localStorageService.store("deviceDetails",e)}},{key:"getDeviceDetails",value:function(){return this.localStorageService.retrieve("deviceDetails")||!1}},{key:"setStyleVariables",value:function(e){var t,n,o,i=document.documentElement;if(e&&e.clientAppFontFamily){var r=e.clientAppFontFamily.split(" ").join("+");r+=":wght@400;500;600";var a=document.createElement("link");a.href="https://fonts.googleapis.com/css2?family=".concat(r,"&display=swap"),a.rel="stylesheet",document.head.appendChild(a),i.style.setProperty("--ion-font-family","'".concat(e.clientAppFontFamily,"', '").concat(e.clientAppFontFamilyCategory,"'"))}if(e&&e.clientAppImage&&i.style.setProperty("--company-image","url(".concat(this.imageResizePipe.transform(e.clientAppImage,"300x300"),")")),e&&(null===(t=e.clientAppFeatureColourRgb)||void 0===t?void 0:t.length)>0&&(null===(n=e.clientAppMainColourRgb)||void 0===n?void 0:n.length)>0){var s=e.clientAppFeatureColourRgb;i.style.setProperty("--ion-color-primary",e.clientAppFeatureColourHex),i.style.setProperty("--ion-color-primary-rgb","".concat(s[0],", ").concat(s[1],", ").concat(s[2])),i.style.setProperty("--ion-color-primary-tint",e.clientAppFeatureColourHex),i.style.setProperty("--ion-color-primary-tint-rgb","".concat(s[0],", ").concat(s[1],", ").concat(s[2]));var l=e.clientAppMainColourRgb;if(i.style.setProperty("--main-font-color",e.clientAppMainColourHex),i.style.setProperty("--main-font-color-rgb","".concat(l[0],", ").concat(l[1],", ").concat(l[2])),i.style.setProperty("--main-dropdown-icon","url(\"data:image/svg+xml;charset=UTF-8,%3Csvg width='19' height='19' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='rgb(".concat(s[0],", ").concat(s[1],", ").concat(s[2],")' %3E%3Cpath d='M9.5 0A9.5 9.5 0 1 0 19 9.5 9.51 9.51 0 0 0 9.5 0Zm0 17.417A7.917 7.917 0 1 1 17.417 9.5 7.925 7.925 0 0 1 9.5 17.417Z' /%3E%3Cpath d='M9.5 12.667a2.37 2.37 0 0 1-1.573-.596c-.259-.23-.504-.454-.665-.615L4.988 9.221a.792.792 0 0 1 1.108-1.13l2.28 2.24c.149.148.37.35.6.554.3.264.749.264 1.048 0 .23-.204.451-.405.595-.548l2.285-2.245a.792.792 0 1 1 1.108 1.129l-2.279 2.24c-.158.157-.401.38-.66.608a2.367 2.367 0 0 1-1.573.598Z' /%3E%3C/g%3E%3C/svg%3E\")")),(null===(o=e.clientAppCtaColourRgb)||void 0===o?void 0:o.length)>0){var u=e.clientAppCtaColourRgb;i.style.setProperty("--main-cta-color",e.clientAppCtaColourHex),i.style.setProperty("--main-cta-color-rgb","".concat(u[0],", ").concat(u[1],", ").concat(u[2]))}}}},{key:"setDemoAppSettings",value:function(){this.setClientAppSettings({clientAppMainColourHex:"#222",clientAppMainColourRgb:[34,34,34],clientAppFeatureColourHex:"#0668ff",clientAppFeatureColourRgb:[6,104,255],clientAppCtaColourHex:"#000000",clientAppCtaColourRgb:[0,0,0],clientAppIconColorHex:"#ffffff",clientAppIconColorRgb:[255,255,255],clientAppImage:"https://fieldd-images.s3.ap-southeast-2.amazonaws.com/fieldd_default_images/default_logo_blue.png"})}},{key:"getCurrentLocation",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(o,i){var r,a=new google.maps.LatLng(49.2712,-123.134),s=t.getCurrentUserCompanyInfo();if((null==s?void 0:s.defaultMapCordinates)&&(null==s?void 0:s.defaultMapCordinates.hasOwnProperty("latitude"))){var l=s.defaultMapCordinates;a=new google.maps.LatLng(l.latitude,l.longitude)}else if((null===(r=null==s?void 0:s.address)||void 0===r?void 0:r.location)&&s.address.location.hasOwnProperty("latitude")&&s.address.location.hasOwnProperty("longitude")){var u=null==s?void 0:s.address.location;a=new google.maps.LatLng(u.latitude,u.longitude)}t.isBrowser()?navigator.geolocation.getCurrentPosition(function(e){var t=new google.maps.LatLng(e.coords.latitude,e.coords.longitude);o(t)},function(n){e&&t.alertService.showMessage(x.t.unableToFindCurrentLocationTitle(s),x.t.unableToFindCurrentLocation(s)),o(a)}):t.geolocation.getCurrentPosition({enableHighAccuracy:n,timeout:1e4}).then(function(e){var t=new google.maps.LatLng(e.coords.latitude,e.coords.longitude);o(t)}).catch(function(){e&&t.alertService.showMessage(x.t.unableToFindCurrentLocationTitle(s),x.t.unableToFindCurrentLocation(s)),o(a)})})}},{key:"getPlaceFromAddressString",value:function(e){return e?this.getGeoCoderResult({address:e}):null}},{key:"getAddressFromCoordinates",value:function(e){return e.lat()&&e.lng()?this.getGeoCoderResult({location:{lat:e.lat(),lng:e.lng()}}):null}},{key:"getGeoCoderResult",value:function(e){var t=this;return(new google.maps.Geocoder).geocode(e).then(function(e){var n,o=e.results;return(n=t.findMostAppropriateResult(o,google.maps.GeocoderLocationType.ROOFTOP))||(n=t.findMostAppropriateResult(o,google.maps.GeocoderLocationType.GEOMETRIC_CENTER)),n||(n=t.findMostAppropriateResult(o,google.maps.GeocoderLocationType.APPROXIMATE)),n}).catch(function(e){return null})}},{key:"findMostAppropriateResult",value:function(e,t){var n,o,r=i(e);try{for(r.s();!(o=r.n()).done;){var a=o.value;if((null===(n=a.geometry)||void 0===n?void 0:n.location_type)===t)return a}}catch(s){r.e(s)}finally{r.f()}}},{key:"getDistanceFromCoordinates",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:google.maps.TravelMode.DRIVING;return new Promise(function(o){(new google.maps.DistanceMatrixService).getDistanceMatrix({origins:[new google.maps.LatLng(e)],destinations:[new google.maps.LatLng(t)],travelMode:n},function(e,t){var n,i,r;return t===google.maps.DistanceMatrixStatus.OK&&e?o(null===(r=null===(i=null===(n=e.rows)||void 0===n?void 0:n[0])||void 0===i?void 0:i.elements)||void 0===r?void 0:r[0]):o(!1)})})}},{key:"getCrowsDistance",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!t)return 0;var o=this.deg2rad(t.latitude-e.latitude),i=this.deg2rad(t.longitude-e.longitude),r=Math.sin(o/2)*Math.sin(o/2)+Math.cos(this.deg2rad(e.latitude))*Math.cos(this.deg2rad(t.latitude))*Math.sin(i/2)*Math.sin(i/2),a=12742*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return n?1e3*a*K:a}},{key:"deg2rad",value:function(e){return e*(Math.PI/180)}},{key:"getMiles",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.value=e.value*K,t&&(e.text=e.text.replace(" mi"," miles")),e}},{key:"getKilometers",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.value=e.value/1e3,t&&(e.text=e.text.replace(" m",1e3*e.value<=1?" metre":" metres")),e}},{key:"implementAnalytics",value:function(){var e=this.getCurrentUserCompanyInfo();if(this.isBrowser()){if((null==e?void 0:e.googleAnalyticsID)&&""!=(null==e?void 0:e.googleAnalyticsID)){var t=document.createElement("script");t.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+e.googleAnalyticsID),t.async=!0,t.onload=function(){var t=document.createElement("script");t.innerHTML="\n                            window.dataLayer = window.dataLayer || [];\n                            function gtag(){dataLayer.push(arguments);}\n                            gtag('js', new Date());\n                            gtag('config', '".concat(e.googleAnalyticsID,"');\n                        "),document.head.appendChild(t)},document.head.appendChild(t)}if((null==e?void 0:e.googleTagManagerID)&&""!=(null==e?void 0:e.googleTagManagerID)){var n=document.createElement("script");n.setAttribute("src","https://www.googletagmanager.com/gtm.js?id="+e.googleTagManagerID),n.async=!0,n.onload=function(){var t=document.createElement("script");t.innerHTML="\n                            window.dataLayer = window.dataLayer || [];\n                            function gtag(){dataLayer.push(arguments);}\n                            gtag('js', new Date());\n                            gtag('config', '".concat(e.googleTagManagerID,"');\n                        "),document.head.appendChild(t)},document.head.appendChild(n)}if((null==e?void 0:e.facebookTrackingPixelID)&&""!=(null==e?void 0:e.facebookTrackingPixelID)){var o=document.createElement("script");o.textContent=b.N.facebookTrackingScript+"fbq('init', '".concat(e.facebookTrackingPixelID,"');\n                    fbq('track', 'PageView');"),document.head.appendChild(o)}}var i={companyId:null==e?void 0:e._id},r=window.marketingTrackingId;r&&r.length&&(i.marketingCampaignTrackingId=r),this.http.post(this.portalVisitUrl,i).subscribe(function(e){},function(e){})}},{key:"addExternalScripts",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new Promise(function(n,o){try{if(!(null==t?void 0:t.length)){var i=e.getCurrentUserCompanyInfo();switch(e.getPaymentGateway(i)){case I.gg.SQUARE:t="https://web.squarecdn.com/v1/square.js";break;case I.gg.STRIPE:t="https://js.stripe.com/v3/";break;case I.gg.PAY_FABRIC:t="/assets/libs/payFabric/payfabricpayments.v2.bundle.min.js";break;case I.gg.QUAL_FIELDD:t="https://app.qualpay.com/hosted/embedded/js/qp-embedded-sdk.min.js";break;case I.gg.FINIX_FIELDD:t="https://js.finix.com/v/1/finix.js";break;default:return n(!0)}}var r=document.createElement("script");r.setAttribute("src",t),r.addEventListener("load",function(){return n(!0)}),r.addEventListener("error",function(e){(0,O.Tb)(e),n(!1)}),document.head.appendChild(r)}catch(r){(0,O.Tb)(r),n(!1)}})}},{key:"getPaymentGateway",value:function(e){var t,n,o,i;if(null==e?void 0:e.thirdPartyPayments){if((null==e?void 0:e.thirdPartySquare)&&""!=(null==e?void 0:e.squareApplicationId))return I.gg.SQUARE;if((null==e?void 0:e.thirdPartyStripe)&&""!=(null==e?void 0:e.stripePublicKey))return I.gg.STRIPE;if((null==e?void 0:e.thirdPartyPayFabric)&&""!=(null==e?void 0:e.payFabricPublicKey))return I.gg.PAY_FABRIC;if((null==e?void 0:e.thirdPartyPin)&&""!=(null==e?void 0:e.pinPublicKey))return I.gg.PIN}else if(null==e?void 0:e.useFielddPay)return(null===(n=null===(t=null==e?void 0:e.recipientData)||void 0===t?void 0:t.fielddPayAccount)||void 0===n?void 0:n.toLowerCase())===I.gg.QUALPAY?I.gg.QUAL_FIELDD:(null===(o=null==e?void 0:e.recipientData)||void 0===o?void 0:o.fielddPayAccount)===I.gg.ADYEN_FIELDD?I.gg.ADYEN_FIELDD:(null===(i=null==e?void 0:e.recipientData)||void 0===i?void 0:i.fielddPayAccount)===I.gg.FINIX_FIELDD?I.gg.FINIX_FIELDD:I.gg.PIN_FIELDD;return"none"}},{key:"getGatewayConfigured",value:function(e){return!(!(null==e?void 0:e.acceptCard)||!(null==e?void 0:e.useFielddPay)&&!(null==e?void 0:e.thirdPartyPayments)||!Object.values(I.gg).includes(this.getPaymentGateway(e)))}},{key:"updateMarketingClick",value:function(e){return(0,f.n)(this.http.get("".concat(this.updateMarketingClickUrl,"/").concat(e))).catch(function(){})}},{key:"visitCompanyWebsite",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getCurrentUserCompanyInfo(),n=""!==(null==t?void 0:t.website)?null==t?void 0:t.website:(null==t?void 0:t.domainUrl)+".fieldd.co";this.isBrowser()&&(this.isIframe()?location.href=location.href:e?window.open("https://"+n,"_self"):window.open("https://"+n,"_blank"))}},{key:"canVisitRepeatJobs",value:function(e,t){var n,o,i,r,a,s;return!!(e&&e.length&&t)&&(null===(n=e[0])||void 0===n?void 0:n.hasRepeatOptions)&&((null===(i=null===(o=e[0])||void 0===o?void 0:o.repeatJobOptions)||void 0===i?void 0:i.length)||(null===(r=e[0])||void 0===r?void 0:r.allowCustomRepeatOption))&&(!(null===(a=e[0])||void 0===a?void 0:a.staffRequired)||(null===(s=e[0])||void 0===s?void 0:s.staffRequired)<2)}},{key:"getHasRequestedJob",value:function(e){return(0,f.n)(this.http.get("".concat(this.hasRequestedJobUrl,"/").concat(e)))}},{key:"setLocalHasRequestedJob",value:function(e){this.localStorageService.store("hasRequestedJob",e)}},{key:"getLocalHasRequestedJob",value:function(){return this.localStorageService.retrieve("hasRequestedJob")}},{key:"getRedirectionURL",value:function(e){return this.http.post(this.getAppRedirectionUrl,e).pipe((0,T.K)(this.handleError))}},{key:"ExternalAuth",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0;return(0,s.mG)(this,void 0,void 0,a().mark(function o(){var i,r;return a().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(this.isBrowser()||this.isIframe()){o.next=7;break}if(!this.platform.is("android")&&"android"!==(null===(e=null==window?void 0:window.cordova)||void 0===e?void 0:e.platformId)){o.next=6;break}if("apple"!==n){o.next=5;break}return i=new U.Z.auth.OAuthProvider("apple.com"),o.abrupt("return",(i.addScope("email"),i.addScope("name"),this.authLoginWithRedirect(i,t,n)));case 5:return o.abrupt("return",this.authLoginWithRedirect(new U.Z.auth.GoogleAuthProvider,t,n));case 6:return o.abrupt("return","apple"===n?this.authLoginWithApplePlugin(t,n):this.authLoginWithGooglePlugin(t,n));case 7:if("apple"!==n){o.next=10;break}return r=new U.Z.auth.OAuthProvider("apple.com"),o.abrupt("return",(r.addScope("email"),r.addScope("name"),this.authLoginWithPopUp(r,t,n)));case 10:if("google"!==n){o.next=12;break}return o.abrupt("return",this.authLoginWithPopUp(new U.Z.auth.GoogleAuthProvider,t,n));case 12:case"end":return o.stop()}},o,this)}))}},{key:"authLoginWithPopUp",value:function(e,t,n){var o=this;return new Promise(function(i){o.angularFireAuth.signInWithPopup(e).then(function(e){return(0,s.mG)(o,void 0,void 0,a().mark(function o(){var r;return a().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!e.additionalUserInfo.profile.email.includes("privaterelay.appleid.com")){o.next=2;break}return o.abrupt("return",void this.fieldAlertService.showMessage("Oops","Your Email With Apple Account Is Hidden. Please Unhide Your Email Through Settings > [your name] > iCloud > Hide My Email Or Try Another Login Partner."));case 2:return o.next=4,this.postExternalAuthOperations(e,t,n);case 4:r=o.sent,i(r);case 6:case"end":return o.stop()}},o,this)}))},function(e){throw e}).catch(function(e){"auth/popup-closed-by-user"!==(null==e?void 0:e.code)&&"auth/cancelled-popup-request"!==(null==e?void 0:e.code)&&o.fieldAlertService.showMessage("Oops","google"===n?"There was an issue with Google login. Please try again later":"There was an issue with Apple login. Please try again later"),i(!1)})})}},{key:"authLoginWithRedirect",value:function(e,t,n){var o=this;return this.localStorageService.store("firebase-auth",{inProgress:!0,openInModal:t,signInMethod:n}),new Promise(function(t){o.angularFireAuth.signInWithRedirect(e).then().catch(function(e){o.clearFirebaseRedirect(),o.fieldAlertService.showMessage("Oops","google"===n?"There was an issue with Google login. Please try again later":"There was an issue with Apple login. Please try again later"),t(!1)})})}},{key:"authLoginWithGooglePlugin",value:function(e,t){var n=this;return new Promise(function(o){try{n.googlePlus.login({}).then(function(i){return(0,s.mG)(n,void 0,void 0,a().mark(function n(){var r;return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return"string"==typeof i&&(i=JSON.parse(i)),n.next=3,this.postExternalAuthOperations(i,e,t,!1);case 3:r=n.sent,o(r);case 5:case"end":return n.stop()}},n,this)}))}).catch(function(){o(!1)})}catch(i){o(!1)}})}},{key:"authLoginWithApplePlugin",value:function(e,t){var n=this;return new Promise(function(o){try{n.signInWithApple.signin({requestedScopes:[N.Y.ASAuthorizationScopeFullName,N.Y.ASAuthorizationScopeEmail]}).then(function(i){return(0,s.mG)(n,void 0,void 0,a().mark(function n(){var r;return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.postExternalAuthOperations(i,e,t,!1);case 2:r=n.sent,o(r);case 4:case"end":return n.stop()}},n,this)}))}).catch(function(e){o(!1)})}catch(i){o(!1)}})}},{key:"postExternalAuthOperations",value:function(e,t,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return(0,s.mG)(this,void 0,void 0,a().mark(function i(){var r,s,l;return a().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,s=this.getCurrentUserCompanyInfo(),r=o?this.formatExternalLogin(e,n):"apple"===n?this.formatApplePluginLogin(e,n):this.formatGooglePluginLogin(e,n),i.next=5,this.externalLogin(r);case 5:return l=i.sent,i.abrupt("return",(null==l?void 0:l.success)?(this.localStorageService.store("isLoggedIn",!0),this.localStorageService.store("countryCurrency",this.fieldLocaleService.getCurrentCurrencySymbol(s.activeCountry.toUpperCase())),this.localStorageService.store("currentUser",l),this.storeCustomerEmail(l.user.emailID),t||this.checkForPendingRating(),this.getFirebaseToken(),this.userChanged$.next(!0),this.refreshCustomerAssets(),this.setUserInLogRocket(),!0):(l.message&&this.fieldAlertService.showMessage("Oops",l.message),!1));case 9:return i.prev=9,i.t0=i.catch(0),i.abrupt("return",!1);case 12:case"end":return i.stop()}},i,this,[[0,9]])}))}},{key:"checkForRedirectAuth",value:function(){var e=this;if(!this.isBrowser()){var t=this.localStorageService.retrieve("firebase-auth");(null==t?void 0:t.inProgress)&&(this.hasRedirectedFromFirebase=!0,this.loadingService.httpWrapperLoader(this.angularFireAuth.getRedirectResult().then(function(n){return(0,s.mG)(e,void 0,void 0,a().mark(function e(){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&n.credential){e.next=2;break}throw new Error;case 2:if(!n.additionalUserInfo.profile.email.includes("privaterelay.appleid.com")){e.next=6;break}this.fieldAlertService.showMessage("Oops","Your Email With Apple Account Is Hidden. Please Unhide Your Email Through Settings > [your name] > iCloud > Hide My Email Or Try Another Login Partner."),e.next=13;break;case 6:return e.next=8,this.postExternalAuthOperations(n,t.openInModal,t.signInMethod);case 8:if(!e.sent){e.next=12;break}this.getFirebaseToken(),t.openedInModal||this.router.navigate(["/"]),e.next=13;break;case 12:this.fieldAlertService.showToastMessage("Temporary delay login, please try again",D.N.Error);case 13:case"end":return e.stop()}},e,this)}))}).catch(function(n){"auth/popup-closed-by-user"!==(null==n?void 0:n.code)&&"auth/cancelled-popup-request"!==(null==n?void 0:n.code)&&e.fieldAlertService.showMessage("Oops","google"===t.signInMethod?"There was an issue with Google login. Please try again later":"There was an issue with Apple login. Please try again later")})),this.clearFirebaseRedirect())}}},{key:"clearFirebaseRedirect",value:function(){this.localStorageService.store("firebase-auth",null)}},{key:"formatGooglePluginLogin",value:function(e,t){var n=this.getCurrentUserCompanyInfo();return{companyId:this.isBrowser()?null==n?void 0:n._id:b.N.companyID,externalSource:t,emailID:null==e?void 0:e.email,firstName:null==e?void 0:e.givenName,lastName:null==e?void 0:e.familyName,image:null==e?void 0:e.image,externalId:null==e?void 0:e.idToken,accessToken:null==e?void 0:e.accessToken}}},{key:"formatApplePluginLogin",value:function(e,t){var n,o,i=this.getCurrentUserCompanyInfo(),r=(0,l.Z)(null==e?void 0:e.identityToken);return{companyId:this.isBrowser()?null==i?void 0:i._id:b.N.companyID,externalSource:t,emailID:(null==e?void 0:e.email)||(null==r?void 0:r.email),firstName:null===(n=null==e?void 0:e.fullName)||void 0===n?void 0:n.givenName,lastName:null===(o=null==e?void 0:e.fullName)||void 0===o?void 0:o.familyName,externalId:null==e?void 0:e.identityToken,accessToken:null==e?void 0:e.authorizationCode}}},{key:"formatExternalLogin",value:function(e,t){var n,o,i,r,a,s,l,u,c,d,p,h,v,m,f,g,y,k=this.getCurrentUserCompanyInfo(),w=null===(n=null==e?void 0:e.user)||void 0===n?void 0:n.displayName.substring(0,(null===(o=null==e?void 0:e.user)||void 0===o?void 0:o.displayName.lastIndexOf(" "))+1),A=null===(i=null==e?void 0:e.user)||void 0===i?void 0:i.displayName.substring((null===(r=null==e?void 0:e.user)||void 0===r?void 0:r.displayName.lastIndexOf(" "))+1,null===(a=null==e?void 0:e.user)||void 0===a?void 0:a.displayName.length);return{companyId:this.isBrowser()?null==k?void 0:k._id:b.N.companyID,externalSource:t,emailID:null===(l=null===(s=null==e?void 0:e.additionalUserInfo)||void 0===s?void 0:s.profile)||void 0===l?void 0:l.email,firstName:(null===(c=null===(u=null==e?void 0:e.additionalUserInfo)||void 0===u?void 0:u.profile)||void 0===c?void 0:c.given_name)||w,lastName:(null===(p=null===(d=null==e?void 0:e.additionalUserInfo)||void 0===d?void 0:d.profile)||void 0===p?void 0:p.family_name)||A,image:(null===(v=null===(h=null==e?void 0:e.additionalUserInfo)||void 0===h?void 0:h.profile)||void 0===v?void 0:v.picture)||(null===(m=null==e?void 0:e.user)||void 0===m?void 0:m.photoURL)||"",externalId:null===(f=null==e?void 0:e.credential)||void 0===f?void 0:f.idToken,accessToken:null===(g=null==e?void 0:e.credential)||void 0===g?void 0:g.accessToken,phone:(null===(y=null==e?void 0:e.user)||void 0===y?void 0:y.phoneNumber)||""}}},{key:"externalLogin",value:function(e){return(0,f.n)(this.http.post(this.externalLoginUrl,e))}},{key:"showAppRoot",value:function(){var e=document.getElementById("main-app-root");e&&e.classList.add("show")}},{key:"updatePermission",value:function(e,t){var n=this.getAppPermissions();(!n||(null==n?void 0:n[e])!==t)&&((n=n||{})[e]=t,this.setAppPermissions(n),this.isUserLoggedIn()&&this.updateUserPermission(e,t))}},{key:"requestPermission",value:function(e){var t=this;return new Promise(function(n){if(t.isBrowser())return n(!1);try{t.modalService.openComponentModal("AppPermissionComponent",null,"full-modal",function(o){return(0,s.mG)(t,void 0,void 0,a().mark(function t(){var i,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.askPermission)){t.next=15;break}if(r=!1,t.prev=2,t.t0=e===I.r3.NOTIFICATION,!t.t0){t.next=8;break}return t.next=7,this.firebaseX.grantPermission();case 7:r=t.sent;case 8:t.next=12;break;case 10:t.prev=10,t.t1=t.catch(2);case 12:this.updatePermission(e,r?I.g1.GRANTED:I.g1.DENIED),t.next=16;break;case 15:this.updatePermission(e,I.g1.DENIED);case 16:n(!0);case 17:case"end":return t.stop()}},t,this,[[2,10]])}))})}catch(o){n(!1)}})}},{key:"getCaptcha",value:function(e){return new Promise(function(t,n){try{grecaptcha.enterprise.ready(function(){grecaptcha.enterprise.execute(window.GOOGLE_CAPTCHA_API_KEY,{action:e}).then(function(e){return t(e)})})}catch(o){return n(o)}})}},{key:"getCaptchaHeaders",value:function(e){return{headers:(new u.WM).set("captcha-token",e)}}}])}();return e.\u0275fac=function(t){return new(t||e)(z.LFG(u.eN),z.LFG(_.Z),z.LFG(Y),z.LFG(V.F0),z.LFG(H.t4),z.LFG(G.b),z.LFG(P.b),z.LFG(D.H),z.LFG(Q.Dx),z.LFG(Q.h_),z.LFG(J.zQ),z.LFG(D.H),z.LFG(W.E),z.LFG(L.L),z.LFG(N.s),z.LFG(R.Q),z.LFG(E.$),z.LFG(Z.A),z.LFG(M.h),z.LFG(F.Z))},e.\u0275prov=z.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},21298:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var o=function(){return d(function e(){h(this,e)},null,[{key:"getFailureMessage",value:function(e){return"Booking could not be completed"}},{key:"getOutOfZoneMessage",value:function(e){var t=null==e?void 0:e.outOfServiceLink,n=(null==e?void 0:e.outOfServiceMessage)||"Selected address is outside of service area";return t&&(n+='<br><a target="_blank" href="https://'+t+'">'+t+"</a>"),n}},{key:"goodFilterMessage",value:function(e){var t,n;return(null===(n=null===(t=null==e?void 0:e.reviewFilters)||void 0===t?void 0:t.goodFilter)||void 0===n?void 0:n.message)||"Thanks for the great rating! Would you mind rating us online?"}},{key:"getOutOfZoneTitle",value:function(e){return(null==e?void 0:e.outOfServiceTitle)||"Oops"}},{key:"noWorkersOnZoneTitle",value:function(e){return(null==e?void 0:e.noWorkerServiceTitle)||"Oops"}},{key:"noWorkersOnZoneMessage",value:function(e){return(null==e?void 0:e.noWorkerServiceMessage)||"We don't have any workers available in the selected area, please try another service or time"}},{key:"serviceMaxTitle",value:function(e){return(null==e?void 0:e.serviceMaxTitle)||"Oops"}},{key:"serviceMaxMessage",value:function(e){return(null==e?void 0:e.serviceMaxMessage)||"You've reached the maximum limit of this service"}},{key:"addonMaxTitle",value:function(e){return(null==e?void 0:e.addonMaxTitle)||"Oops"}},{key:"addonMaxMessage",value:function(e){return(null==e?void 0:e.addonMaxMessage)||"You've reached the maximum limit of this item"}},{key:"addonRequiredMessage",value:function(e){return(null==e?void 0:e.addonRequiredMessage)||"This item is required for the selected service and can't be removed"}},{key:"addonRequiredTitle",value:function(e){return(null==e?void 0:e.addonRequiredTitle)||"Oops"}},{key:"getOutOfAreaLink",value:function(e){return(null==e?void 0:e.outOfServiceLink)||""}},{key:"getNoServiceAvailable",value:function(e){return(null==e?void 0:e.fullyBookedMessage)||"Sorry we are fully booked, please try another day or service."}},{key:"getNoServiceAvailableTitle",value:function(e){return(null==e?void 0:e.fullyBookedTitle)||"Oops"}},{key:"getConfirmationMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?(null==e?void 0:e.confirmationPopupASAP)||"Your on-demand ASAP request has been sent to our entire team.":(null==e?void 0:e.confirmationPopup)||"Your booking has instantly been confirmed for the time you selected."}},{key:"getConfirmationTitle",value:function(e){return(null==e?void 0:e.confirmationPopupTitle)||"Success"}},{key:"addressIncompleteMessage",value:function(e){return(null==e?void 0:e.addressIncompleteMessage)||"Please complete address details"}},{key:"addressIncompleteTitle",value:function(e){return(null==e?void 0:e.addressIncompleteTitle)||"Oops"}},{key:"getIncompleteExtraQuestion",value:function(e){return(null==e?void 0:e.incompleteExtraQuestion)||"Please complete all required fields"}},{key:"getIncompleteExtraQuestionTitle",value:function(e){return(null==e?void 0:e.incompleteExtraQuestionTitle)||"Oops"}},{key:"getIncompleteSlotSelectionMessage",value:function(e){return(null==e?void 0:e.incompleteSlotSelectionMessage)||"Please select a slot to continue"}},{key:"getIncompleteSlotSelectionTitle",value:function(e){return(null==e?void 0:e.incompleteSlotSelectionTitle)||"Oops"}},{key:"getIncompleteServiceSelectionMessage",value:function(e){return(null==e?void 0:e.incompleteServiceSelectionMessage)||"Please select a service to continue"}},{key:"getIncompleteServiceSelectionTitle",value:function(e){return(null==e?void 0:e.incompleteServiceSelectionTitle)||"Oops"}},{key:"getAddressNotSelectedFromDropdownMessage",value:function(e){return(null==e?void 0:e.addressNotSelectedFromDropdownMessage)||"Please choose an address from one of the dropdown results"}},{key:"getAddressNotSelectedFromDropdownTitle",value:function(e){return(null==e?void 0:e.addressNotSelectedFromDropdownTitle)||"Oops"}},{key:"unableToGetCompanyLocationsMessage",value:function(e){return(null==e?void 0:e.unableToGetCompanyLocationsMessage)||"There was an error retrieving the company's location. Please try again later."}},{key:"unableToGetCompanyLocationsTitle",value:function(e){return(null==e?void 0:e.unableToGetCompanyLocationsTitle)||"Oops"}},{key:"unableToFindCurrentLocation",value:function(e){return(null==e?void 0:e.unableToFindCurrentLocation)||"Unable to find current location. Please try again later."}},{key:"unableToFindCurrentLocationTitle",value:function(e){return(null==e?void 0:e.unableToFindCurrentLocationTitle)||"Oops"}},{key:"unableToBuildReBookObject",value:function(e){return(null==e?void 0:e.unableToBuildReBookObject)||"Unable to rebook at this time. Please try again later."}},{key:"unableToBuildReBookObjectTitle",value:function(e){return(null==e?void 0:e.unableToBuildReBookObjectTitle)||"Oops"}},{key:"expiredPromoCode",value:function(e){return(null==e?void 0:e.expiredPromoCode)||"This promo code has expired"}},{key:"expiredPromoCodeTitle",value:function(e){return(null==e?void 0:e.expiredPromoCodeTitle)||"Oops"}},{key:"promoCodeAlreadyRedeemed",value:function(e){return(null==e?void 0:e.promoCodeAlreadyRedeemed)||"This promo code has already been redeemed"}},{key:"promoCodeAlreadyRedeemedTitle",value:function(e){return(null==e?void 0:e.promoCodeAlreadyRedeemedTitle)||"Oops"}},{key:"promoCodeInvalid",value:function(e){return(null==e?void 0:e.promoCodeInvalid)||"Invalid promo code"}},{key:"promoCodeInvalidTitle",value:function(e){return(null==e?void 0:e.promoCodeInvalidTitle)||"Oops"}},{key:"promoCodeExceeds",value:function(e){return(null==e?void 0:e.promoCodeExceeds)||"The discount you're trying to redeem is more than the amount of the booking"}},{key:"promoCodeExceedsTitle",value:function(e){return(null==e?void 0:e.promoCodeExceedsTitle)||"Oops"}},{key:"promoCodeGeneralError",value:function(e){return(null==e?void 0:e.promoCodeGeneralError)||"The code you entered appears to have expired, or be invalid."}},{key:"promoCodeGeneralErrorTitle",value:function(e){return(null==e?void 0:e.promoCodeGeneralErrorTitle)||"Oops"}},{key:"bookingCannotBeCanceled",value:function(e){return(null==e?void 0:e.bookingCannotBeCanceled)||"Oops this booking cannot be cancelled"}},{key:"bookingCannotBeCanceledTitle",value:function(e){return(null==e?void 0:e.bookingCannotBeCanceledTitle)||"Oops"}},{key:"checkboxLeftIncomplete",value:function(e){return(null==e?void 0:e.checkboxLeftIncomplete)||"Please ensure all checkboxes have been checked."}},{key:"checkboxLeftIncompleteTitle",value:function(e){return(null==e?void 0:e.checkboxLeftIncompleteTitle)||"Oops"}},{key:"promoCodeNotAppliedOnService",value:function(e){return(null==e?void 0:e.promoCodeNotApplicable)||"Unfortunately this promo code cannot be applied to your selected services or products, please select another service and try again"}},{key:"customCancelMessage",value:function(e){var t;return(null===(t=null==e?void 0:e.cancellationPolicy)||void 0===t?void 0:t.message)||"This booking cannot be cancelled"}},{key:"customCancelTitle",value:function(e){var t;return(null===(t=null==e?void 0:e.cancellationPolicy)||void 0===t?void 0:t.title)||"Oops "}},{key:"customRescheduleMessage",value:function(e){var t;return(null===(t=null==e?void 0:e.reschedulePolicy)||void 0===t?void 0:t.message)||"This booking cannot be rescheduled"}},{key:"customRescheduleTitle",value:function(e){var t;return(null===(t=null==e?void 0:e.reschedulePolicy)||void 0===t?void 0:t.title)||"Oops "}},{key:"compulsoryCheckboxTitle",value:function(e){return(null==e?void 0:e.compulsoryCheckboxTitle)||"Terms of Service"}},{key:"customerAssets.title",value:function(e){var t;return(null===(t=null==e?void 0:e.customerAssets)||void 0===t?void 0:t.title)||"Assets"}},{key:"customerAssets.mainTitle",value:function(e){var t;return(null===(t=null==e?void 0:e.customerAssets)||void 0===t?void 0:t.mainTitle)||"Details"}},{key:"customerAssets.profileTitle",value:function(e){var t;return(null===(t=null==e?void 0:e.customerAssets)||void 0===t?void 0:t.profileTitle)||"Details"}},{key:"customerAssets.newAssetTitle",value:function(e){var t;return(null===(t=null==e?void 0:e.customerAssets)||void 0===t?void 0:t.newAssetTitle)||"Add Asset"}},{key:"customerAssets.bookingButton",value:function(e){var t;return(null===(t=null==e?void 0:e.customerAssets)||void 0===t?void 0:t.bookingButton)||"Book Now"}},{key:"customerAssets.addButton",value:function(e){var t;return(null===(t=null==e?void 0:e.customerAssets)||void 0===t?void 0:t.addButton)||"Add"}}])}()},66024:function(e,t,n){"use strict";n.d(t,{ju:function(){return i},v4:function(){return r},f2:function(){return a},bU:function(){return s},wJ:function(){return l}});var o,i=((o=i||(i={}))[o.PromoCode=0]="PromoCode",o[o.ServiceSettings=1]="ServiceSettings",i),r=function(){return(e=r||(r={})).None="",e.Mobile="forMobile",e.Shop="forFixed",e.A2B="isA2B",e.Virtual="isVirtual",r;var e}(),a=function(){return(e=a||(a={}))[e.AddressSelection=1]="AddressSelection",e[e.ServiceTypeSelection=2]="ServiceTypeSelection",e[e.ShopSelection=3]="ShopSelection",e[e.ServiceSelection=4]="ServiceSelection",e[e.DropOffSelection=5]="DropOffSelection",e[e.SlotSelection=6]="SlotSelection",e[e.ExtraQuestions=7]="ExtraQuestions",e[e.UserDetails=8]="UserDetails",e[e.IntakeForm=9]="IntakeForm",e[e.Summary=10]="Summary",a;var e}(),s=function(){return(e=s||(s={}))[e.NoError=0]="NoError",e[e.TermsCondition=1]="TermsCondition",e[e.Prepay=2]="Prepay",e[e.PreAuth=3]="PreAuth",e[e.Questions=4]="Questions",e[e.GuestUserDetails=5]="GuestUserDetails",e[e.PhoneNumberCompulsory=6]="PhoneNumberCompulsory",e[e.PhoneNumberNotCompulsory=7]="PhoneNumberNotCompulsory",e[e.ScaVerificationError=8]="ScaVerificationError",s;var e}(),l=function(){return(e=l||(l={})).FromLeft="from-left",e.FromRight="from-right",l;var e}()},41116:function(e,t,n){"use strict";n.d(t,{q:function(){return x}});var o,a=n(87554),l=n(20710),u=n(88355),c=n(7964),p=n(92340),v=n(82426),m=n(7048),f=n(66024),g=n(2281),y=n(96636),b=n(80711),k=n(21298),w=n(34138),A=n(25344),S=n(4200),C=n(15433),T=n(67410),U=n(18459),I=n(2316),P=n(53882),x=(o=function(){return d(function e(t,n,o,i,r,s,l){h(this,e),this.http=t,this.authService=n,this.alertService=o,this.fieldCurrencyPipe=i,this.loadingService=r,this.commonHelper=s,this.dateService=l,this.createBookingUrl=p.N.baseUrl+"/v2/user/portal/book",this.companyServiceUrl=p.N.baseUrl+"/user/service",this.inventoriesUrl=p.N.baseUrl+"/user/portal/inventory",this.inventoriesByVariantUrl=p.N.baseUrl+"/user/portal/inventoryByVariant",this.getZoneUrl=p.N.baseUrl+"/user/portal/getzone",this.getFreeSlotsUrl=p.N.baseUrl+"/user/portal/freeslots",this.loadFirstUrl=p.N.baseUrl+"/user/portal/loadFirstAvailableSlot",this.bookingHistoryUrl=p.N.baseUrl+"/user/bookingHistory",this.extraQuestionUrl=p.N.baseUrl+"/v2/booking/extraQuestions",this.promoCodeRedemptionUrl=p.N.baseUrl+"/v2/user/redeem/promocode",this.getAvailableStaffListUrl=p.N.baseUrl+"/user/portal/listAllRefreshersWithSlotDetails",this.getUserFreeCreditsUrl=p.N.baseUrl+"/v2/user/freecredits",this.getVariantPriceListUrl=p.N.baseUrl+"/company/variantPriceList",this.getQuoteDetailUrl=p.N.baseUrl+"/user/getQuote",this.getQrDetailsUrl=p.N.baseUrl+"/user/getQrCode",this.updateBookingAttemptUrl=p.N.baseUrl+"/user/bookingAttempt",this.partnerBioUrl=p.N.baseUrl+"/partner/bio",this.rescheduleJobUrl=p.N.baseUrl+"/v2/user/reschedule",this.onlinePortalReceiptUrl=p.N.baseUrl+"/customer/order/receipt",this.getAllZonesUrl=p.N.baseUrl+"/v2/user/zones",this.questionLookUpUrl=p.N.baseUrl+"/lookups/question",this.getShopLocationsUrl=p.N.baseUrl+"/v2/user/shops",this.locationChanged$=new a.X(null),this.dropOffLocationChanged$=new a.X(null)},[{key:"createBooking",value:function(e){var t=this.fillCommonBookingRequestDetails(e);return(0,l.n)(this.http.post(this.createBookingUrl,t,this.authService.getCaptchaHeaders(C.Ho.BOOKING)))}},{key:"getZoneByZoneId",value:function(e){return this.http.post(this.getZoneUrl,e).pipe((0,v.K)(this.handleError))}},{key:"getCompanyServices",value:function(e){return this.http.post(this.companyServiceUrl,e).pipe((0,v.K)(this.handleError))}},{key:"getUserBookingHistory",value:function(e){return(0,l.n)(this.http.post(this.bookingHistoryUrl,e))}},{key:"getExtraQuestions",value:function(e){return this.http.post(this.extraQuestionUrl,e).pipe((0,v.K)(this.handleError))}},{key:"redeemPromoCode",value:function(e){return(0,u.D)(this.loadingService.httpWrapperLoader((0,l.n)(this.http.post(this.promoCodeRedemptionUrl,e)))).pipe((0,v.K)(this.handleError))}},{key:"getShopLocations",value:function(e){return this.http.get("".concat(this.getShopLocationsUrl,"/").concat(e)).pipe((0,v.K)(this.handleError))}},{key:"getInventories",value:function(e){return this.http.post(this.inventoriesUrl,e).pipe((0,v.K)(this.handleError))}},{key:"getInventoriesByVariant",value:function(e){return(0,l.n)(this.http.post(this.inventoriesByVariantUrl,e))}},{key:"getAllZones",value:function(e){return(0,l.n)(this.http.get("".concat(this.getAllZonesUrl,"/").concat(e)))}},{key:"getFreeSlots",value:function(e){return this.http.post(this.getFreeSlotsUrl,e).pipe((0,v.K)(this.handleError))}},{key:"getFirstAvail",value:function(e){return this.http.post(this.loadFirstUrl,e).pipe((0,v.K)(this.handleError))}},{key:"getAvailableStaffsList",value:function(e){return this.http.post(this.getAvailableStaffListUrl,e).pipe((0,v.K)(this.handleError))}},{key:"getLatestUserFreeCredits",value:function(e){return this.http.post(this.getUserFreeCreditsUrl,e).pipe((0,v.K)(this.handleError))}},{key:"getVariantPriceList",value:function(e){return this.http.post(this.getVariantPriceListUrl,e).pipe((0,v.K)(this.handleError))}},{key:"getQuoteDetails",value:function(e){return this.http.get("".concat(this.getQuoteDetailUrl,"/").concat(e)).pipe((0,v.K)(this.handleError))}},{key:"getQrDetails",value:function(e){return this.http.post("".concat(this.getQrDetailsUrl),e).pipe((0,v.K)(this.handleError))}},{key:"getLookupData",value:function(e){return this.http.post("".concat(this.questionLookUpUrl),e).pipe((0,v.K)(this.handleError))}},{key:"calculateDiscountedAmountForItem",value:function(e,t,n,o){if(!o)return-1;if("giftVoucher"===o.category||!o.applied_on||"giftVoucher"!==o.category&&"booking"===o.applied_on)return t;switch(n){case"variant":return"custom"===o.applied_on&&(o.variantIds.includes("all")||o.variantIds.includes(e))?t:-1;case"inventory":return"custom"===o.applied_on&&(o.inventoryIds.includes("all")||o.inventoryIds.includes(e))?t:-1;case"travelCharges":return"travelCharges"===o.applied_on?t:-1;default:return-1}}},{key:"calculateTotalAndApplyDiscount",value:function(e,t,n,o){var r,a,s,l,u,c,d,p,h,v,m,f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,g=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,y=arguments.length>6&&void 0!==arguments[6]&&arguments[6],b=0,k=0,w=0,A=this.getJobDistanceCharge(),S={appliedOnVariants:!1,appliedOnInventories:!1,appliedOnTravelCharges:!1,applied_on:null},C=[[0,0],[0,0]],T=null;T=o||(null==e?void 0:e.discount);var U=0,I=0,P=null==n?void 0:n.freeCredits,x=0,D=null;if(null==T?void 0:T.isInviteCode){var _=null==T?void 0:T.inviteCodeDetails;x=null==_?void 0:_.inviteCodeAmount}else D=null==T?void 0:T.promoCodeDetails,S.applied_on=null==D?void 0:D.applied_on;if(null==t?void 0:t.length){var M,L=i(t);try{for(L.s();!(M=L.n()).done;){var O=M.value,Z=0;if("custom_quote"===(null===(r=null==O?void 0:O.variant)||void 0===r?void 0:r.id)&&(null===(s=null===(a=null==O?void 0:O.variant)||void 0===a?void 0:a.lineItems)||void 0===s?void 0:s.length))for(var E=0;E<(null===(u=null===(l=null==O?void 0:O.variant)||void 0===l?void 0:l.lineItems)||void 0===u?void 0:u.length);E++){var N=null==O?void 0:O.variant.lineItems[E],R=Number(N.price)*Number(N.quantity);b+=R,Z+=R;var q=-1;D&&(q=this.calculateDiscountedAmountForItem(N.id,R,"variant",D))>=0&&(U+=q,S.appliedOnVariants=!0),C[+!!this.getTaxValue(N)][+(q>=0||(null==f?void 0:f.discountedAmount)>0)]=C[+!!this.getTaxValue(N)][+(q>=0||(null==f?void 0:f.discountedAmount)>0)]+R}else{var j=Number(null===(c=null==O?void 0:O.variant)||void 0===c?void 0:c.price)*Number(null===(d=null==O?void 0:O.variant)||void 0===d?void 0:d.numberOfBookings);b+=j,Z+=j;var F=-1;D&&(F=this.calculateDiscountedAmountForItem(null===(p=null==O?void 0:O.variant)||void 0===p?void 0:p.id,j,"variant",D))>=0&&(U+=F,S.appliedOnVariants=!0),C[+!!this.getTaxValue(null==O?void 0:O.variant)][+(F>=0||(null==f?void 0:f.discountedAmount)>0)]=C[+!!this.getTaxValue(null==O?void 0:O.variant)][+(F>=0||(null==f?void 0:f.discountedAmount)>0)]+j}if(null===(h=O.inventories)||void 0===h?void 0:h.length)for(var B=0;B<(null===(v=O.inventories)||void 0===v?void 0:v.length);B++){var G=O.inventories[B],z=G.quantity*G.salePrice;k+=z,Z+=z;var Y=-1;D&&(Y=this.calculateDiscountedAmountForItem(G.id,z,"inventory",D))>=0&&(U+=Y,S.appliedOnInventories=!0),C[+!!this.getTaxValue(G)][+(Y>=0||(null==f?void 0:f.discountedAmount)>0)]=C[+!!this.getTaxValue(G)][+(Y>=0||(null==f?void 0:f.discountedAmount)>0)]+z}for(var V=0;V<(null===(m=O.extraVariants)||void 0===m?void 0:m.length);V++){var H=O.extraVariants[V],Q=H.numberOfBookings*H.price;b+=Q,Z+=Q;var J=-1;D&&(J=this.calculateDiscountedAmountForItem(H.id,Q,"variant",D))>=0&&(U+=J,S.appliedOnVariants=!0),C[+!!this.getTaxValue(H)][+(J>=0||(null==f?void 0:f.discountedAmount)>0)]=C[+!!this.getTaxValue(H)][+(J>=0||(null==f?void 0:f.discountedAmount)>0)]+Q}var W=this.getJobDistanceCharge(O,n,Z);w+=W.totalTravelCharge,Z+=W.totalTravelCharge,A=this.sumObjectsByKey(A,W)}}catch(ne){L.e(ne)}finally{L.f()}}var K=b+k+w;if(y||(K+=A.zoneTravelCharge||0,w+=A.zoneTravelCharge),w>0){var $=-1;D&&($=this.calculateDiscountedAmountForItem(null,w,"travelCharges",D))>=0&&(U+=$,S.appliedOnTravelCharges=!0),C[1][+($>=0||(null==f?void 0:f.discountedAmount)>0)]=C[1][+($>=0||(null==f?void 0:f.discountedAmount)>0)]+w}if(D&&"fixed"===D.type?U>D.value&&(U=D.value):D&&"percentage"===D.type&&(U*=D.value/100),(null==f?void 0:f.discountPerJob)>0&&g&&(I=(null==f?void 0:f.isFixed)?Number(null==g?void 0:g.numberOfBookings)*Number(null==f?void 0:f.discountPerJob):K*Number((null==f?void 0:f.discountPerJob)/100)),P&&(null==P?void 0:P.length)){var X=null==P?void 0:P.filter(function(e){return 1==e.selected});null==X||X.forEach(function(e){x+=e.amount})}C=this.applyDiscountOnTaxDiscount(C,U,1);var ee=x+I;C[1][0]=C[1][0]+C[1][1],C[1][1]=0,C[0][0]=C[0][0]+C[0][1],C[0][1]=0;var te=+(+(C=this.applyDiscountOnTaxDiscount(C,ee,0))[1][0]+ +C[0][0]).toFixed(2)||0;return U+=x+I,{distanceChargeDetails:A,calculatedDiscountDetails:S,totalAfterDiscount:te,taxableAmountAfterDiscount:+C[1][0].toFixed(2)||0,nonTaxableAmountAfterDiscount:+C[0][0].toFixed(2)||0,discountedAmount:+U.toFixed(2)||0,repeatDiscountAmount:I}}},{key:"sumObjectsByKey",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=(e[n]||0)+t[n]);return e},{})}},{key:"getTaxValue",value:function(e){return!(null==e?void 0:e.hasOwnProperty("showTaxes"))||e.showTaxes}},{key:"applyDiscountOnTaxDiscount",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e[1][n]>=t?e[1][n]=e[1][n]-t:(e[1][n]=e[1][n]-t,e[1][n]<0&&(t=e[1][n],e[1][n]=0,e[0][n]>0&&(e[0][n]=e[0][n]+t,e[0][n]<0&&(e[0][n]=0)))),e[1][n]<0&&(e[1][n]=0),e[0][n]<0&&(e[0][n]=0),e}},{key:"getUpdatedQuantity",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=e.preSelectQty;return o&&e.quantity<=o&&!0!==t?(e.quantity=o,this.alertService.showMessage(k.t.addonRequiredTitle(n),k.t.addonRequiredMessage(n)),o):t?(null==e?void 0:e.max)&&(null==e?void 0:e.max)===e.quantity?(e.hasOwnProperty("salePrice")?this.alertService.showMessage(k.t.addonMaxTitle(n),k.t.addonMaxMessage(n)):this.alertService.showMessage(k.t.serviceMaxTitle(n),k.t.serviceMaxMessage(n)),e.quantity):0==e.quantity&&(null==e?void 0:e.min)?e.min:++e.quantity:(null==e?void 0:e.min)&&(null==e?void 0:e.min)===e.quantity?0:0==e.quantity?e.quantity:--e.quantity}},{key:"getTimeObj",value:function(e){return{hours:+e.substring(0,2),mins:+e.substring(2,4)}}},{key:"getVariantTime",value:function(e){var t;return 60*((null==(t=(null==e?void 0:e.showServiceTime)?(null==e?void 0:e.serviceTime)?this.getTimeObj(e.serviceTime):"":null==e?void 0:e.totalServiceTime)?void 0:t.hours)||0)+((null==t?void 0:t.mins)||0)}},{key:"getTotalTimeInMin",value:function(e,t){var n,o,i,r,a,s,l,u=this,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"job",d=0;return("job"===c||"variant"===c)&&(l=this.getVariantTime(null==e?void 0:e.variant),"job"===c&&(l*=((null===(n=null==e?void 0:e.variant)||void 0===n?void 0:n.combineMultipleJobSlots)?null===(o=null==e?void 0:e.variant)||void 0===o?void 0:o.numberOfBookings:1)||1,(null===(i=null==e?void 0:e.extraVariants)||void 0===i?void 0:i.length)&&(null==e||e.extraVariants.forEach(function(e){var t=u.getVariantTime(e);t*=((null==e?void 0:e.combineMultipleJobSlots)?null==e?void 0:e.numberOfBookings:1)||1,l+=t})))),l||"inventory"===c?(("job"===c||"inventory"===c)&&(null===(r=null==e?void 0:e.inventories)||void 0===r?void 0:r.length)&&(null==e||e.inventories.forEach(function(e){e.inventoryRequiresExtraTimeSlot&&(d+=(e.quantity||1)*(e.inventoryTimeSlotsRequired||0))})),(l||0)+d*(60*((null===(a=null==t?void 0:t.timeBetweenBookings)||void 0===a?void 0:a.time)||0)+((null===(s=null==t?void 0:t.timeBetweenBookings)||void 0===s?void 0:s.min)||0))):0}},{key:"getFormattedScheduledDateTime",value:function(e,t){var n,o,i,a,l,u,c,d=this,p={};if(null===(n=null==e?void 0:e.scheduleDetails)||void 0===n?void 0:n.hasOwnProperty("minutes")){var h="".concat(null===(o=e.scheduleDetails)||void 0===o?void 0:o.requestedDate,"/").concat((null===(i=e.scheduleDetails)||void 0===i?void 0:i.requestedMonth)+1,"/").concat(null===(a=e.scheduleDetails)||void 0===a?void 0:a.requestedYear);c=g(h,"DD/MM/YYYY").hour(null===(l=e.scheduleDetails)||void 0===l?void 0:l.hour).minute(null===(u=e.scheduleDetails)||void 0===u?void 0:u.minutes),p.date=this.dateService.dowString(c),p.partnerDetails=[];var v={};if(e.selectedSlots&&e.selectedSlots.length){for(var m=e.selectedSlots.slice().sort(function(e,t){return e._id.hour!=t._id.hour?e._id.hour-t._id.hour:e._id.minutes-t._id.minutes}),f=0;f<m.length;f++){var y=m[f]._id.hour+"-"+m[f]._id.minutes;v[y]||(v[y]=[]),v[y].push(this.getFormattedSlot(c,m[f]))}for(var b=this.getTotalTimeInMin(e,t),k=function(){var e=r(A[w],2),n=(e[0],e[1]),o=n[0].timeObj.add(b,"m");o=d.checkToAddLunchTime(n[0].time,d.dateService.generateTimeString(o),t);var i=n.map(function(e){return{time:n[0].time+" - "+o,name:e.partnerName,image:e.image,rating:e.rating,_id:e.partnerId}});p.partnerDetails=[].concat(s(p.partnerDetails),s(i))},w=0,A=Object.entries(v);w<A.length;w++)k()}}return p}},{key:"checkToAddLunchTime",value:function(e,t,n){var o=g().hours(n.lunchStartTime.time).minute(n.lunchStartTime.min).seconds(0).milliseconds(0),i=60*n.lunchDuration.time+n.lunchDuration.min,r=g(o).clone().add(i,"m");if(n.haveLunchBreak){var a=g(e,"h:mma").hour(),s=g(e,"h:mma").minutes(),l=g(t,"h:mma").hour(),u=g(t,"h:mma").minutes();(n.lunchStartTime.time>a||n.lunchStartTime.time===a&&n.lunchStartTime.min>=s)&&(r.hour()<l||r.hour()===l&&r.minutes()<=u)&&(t=this.dateService.generateTimeString(g(t,"h:mma").add(i,"m")))}return t}},{key:"getFormattedSlot",value:function(e,t){return e.set({hour:t._id.hour,minutes:t._id.minutes}),{time:this.dateService.generateTimeString(e),timeObj:e.clone(),partnerName:t.partner.name||t.partner.firstName,image:t.partner.image,rating:t.partner.rating,partnerId:t.partner._id}}},{key:"getParent",value:function(e,t){for(var n in t.variants)if(t.variants[n].id===e.pid)return t.variants[n]}},{key:"getServiceHistory",value:function(e,t,n){try{var o,i=[];if(0==e.pid)return i;if(!(o=this.getParent(e,t)))return i;i.push(o.name);for(var r=0;o&&0!=o.pid&&(!n||n&&r<n);)r++,(o=this.getParent(o,t))&&o.name&&i.push(o.name);return i}catch(i){return[]}}},{key:"addServiceHistory",value:function(e,t){var n=this.getServiceHistory(e,t);(null==n?void 0:n.length)&&(e.serviceHistory=n.reverse().join(" \u2022 "))}},{key:"getDiscountInfo",value:function(e){var t="";if(e){if(e.isInviteCode)t="".concat(this.fieldCurrencyPipe.transform(e.inviteCodeDetails.inviteCodeAmount)," Off");else{var n=e.promoCodeDetails;t=("fixed"===n.type?this.fieldCurrencyPipe.transform(n.value):n.value+"%")+" Off"}return t}return""}},{key:"fillCommonBookingRequestDetails",value:function(e){var t,n,o,r,a,s,l,u,c=this,d={},p=e.booking;if(this.authService.isUserLoggedIn()){var h=this.authService.getCurrentUserInfo();d.customerEmail=h.emailID,d.customerFirstName=h.firstName,d.customerLastName=h.lastName,d.customerPhone=null===(t=h.phone)||void 0===t?void 0:t.toString()}else{var v=e.guestUser;d.customerEmail=v.emailID,d.customerFirstName=v.firstName,d.customerLastName=v.lastName,d.customerPhone=null===(n=v.guestPhone)||void 0===n?void 0:n.toString(),v.customerCompanyName&&(d.customerCompanyName=v.customerCompanyName),v.foundUsReason&&(d.foundUsReason=v.foundUsReason)}d.customerPhone=(null==d?void 0:d.customerPhone)?d.customerPhone.replace(/[()\s-]/g,""):"";var m,f=e.intakeForm;if((null==f?void 0:f.length)&&(d.intakeForm=f),d.amount=p.total,null===(o=p.zones)||void 0===o?void 0:o.length){var y=this.commonHelper.getZone(p.zones,p.timezone);d.cityZoneId=y.id,m=y.timezone,d.extendZoneIds=p.zones.filter(function(e){return e.id!==y.id}).map(function(e){return e.id})}else m=(null===(r=null==p?void 0:p.selectedShop)||void 0===r?void 0:r._id)?p.selectedShop.timezone:p.timezone;if(d.companyID=this.getCompany()._id,d.discountedAmount=p.totalDiscount,d.address_components=p.address_components,p.pickupAddress&&(d.geolocation=p.pickupAddress.location,d.jobAddress=p.pickupAddress.address),d.serviceId=p.serviceId,p.discount&&(p.discount.isInviteCode?d.clientCode=p.discount.inviteCodeDetails.inviteCode:d.promoCode=p.discount.promoCodeDetails.code),e.freeCredits){var b=e.freeCredits.filter(function(e){return 1==e.selected});b&&b.length>0&&(d.freeCreditObj=b.map(function(e){return{_id:e._id,firstName:e.firstName,userId:e.userId,lastName:e.lastName,amount:e.amount}}))}d.jobs=[];var k,w=i(p.jobs);try{var A=function(){var e=k.value,t={},n=c.createVariantRequestObject(null==e?void 0:e.variant,p.serviceId);if(t.variants=[n],null===(a=e.extraVariants)||void 0===a||a.map(function(e){t.variants.push(c.createVariantRequestObject(e,p.serviceId))}),t.requiresQuote=!!n.requiresQuote,t.isOnDemand=!!e.isOnDemand,t.inventory=null===(s=e.inventories)||void 0===s?void 0:s.map(function(e){return{salePrice:e.salePrice,quantity:e.quantity,name:e.name,id:e._id,mfgPartNumber:e.mfgPartNumber,costPrice:e.costPrice,inventoryRequiresExtraTimeSlot:e.inventoryRequiresExtraTimeSlot,timeSlot:e.timeSlot,inventoryTimeSlotsRequired:e.inventoryTimeSlotsRequired,showTaxes:!e.hasOwnProperty("showTaxes")||e.showTaxes}}),t.questions=c.addExtraQuestions(e.questions),(null===(l=e.customerAssets)||void 0===l?void 0:l.length)&&(t.customerAssets=e.customerAssets.map(function(e){return"new"!==e._id?{_id:e._id}:{_id:e._id,data:e.data,profileImage:e.profileImage}})),!t.isOnDemand){t.min=e.scheduleDetails.minutes,t.time=e.scheduleDetails.hour,t.requestedDate=e.scheduleDetails.requestedDate,t.requestedMonth=e.scheduleDetails.requestedMonth,t.requestedYear=e.scheduleDetails.requestedYear,t.mergeSlotCount=e.scheduleDetails.mergeSlotCount,t.selectedSlots=e.selectedSlots.map(function(e){return{partnerId:e.partnerId,hour:e._id.hour,minutes:e._id.minutes}});var o=g.utc("".concat(e.scheduleDetails.requestedDate,"/").concat(e.scheduleDetails.requestedMonth+1,"/").concat(e.scheduleDetails.requestedYear),"DD/MM/YYYY").startOf("day").valueOf();t.scheduledOn=o,t.dateTime=t.scheduledOn}t.timezone=m,(null===(u=null==p?void 0:p.selectedShop)||void 0===u?void 0:u._id)?(t.selectedShop=p.selectedShop,t.timezone=p.selectedShop.timezone):p.routeAddress&&(t.routeAddresses=[p.routeAddress]),d.jobs.push(t)};for(w.s();!(k=w.n()).done;)A()}catch(U){w.e(U)}finally{w.f()}if(e.paymentMethod&&"Cash"!=e.paymentMethod&&"Invoice"!=e.paymentMethod&&"guestUserCard"!=e.paymentMethod){var S=e.cardDetails;if(!S||!S.length){var C=this.authService.getCurrentUserInfo();S=null==C?void 0:C.cardDetails}var T=S.find(function(t){return t._id==e.paymentMethod});d.cardToken=T.cardToken,d.prePayUsingCardToken=e.prePaymentSettings&&e.prePaymentSettings.prePaymentAvailable,d.paymentMethodSelected="Card"}else"guestUserCard"===e.paymentMethod&&e.cardDetails?(d.paymentMethodSelected=e.paymentMethod,d.prePaymentDetails=Object.assign({},e.cardDetails)):e.paymentMethod&&(d.paymentMethodSelected=e.paymentMethod);return e.verificationToken&&"NOT_REQUIRED"!==e.verificationToken&&(d.verificationToken=e.verificationToken),d.totalAmount=d.amount,p.comment&&(d.comment=p.comment),p.quoteReqOrderId&&(d.quoteReqOrderId=p.quoteReqOrderId),e.bookingAttemptId&&(d.bookingAttemptId=e.bookingAttemptId),p.qrCodeId&&(d.qrCodeId=p.qrCodeId),p.marketingTrackingId&&(d.marketingTrackingId=p.marketingTrackingId),d}},{key:"createVariantRequestObject",value:function(e,t){var n={fullName:e.fullName,id:e.id,name:e.name,numberOfBookings:e.numberOfBookings?e.numberOfBookings:1,price:e.discountedPrice,serviceId:t,primaryImageUrl:e.primaryImageUrl,selectedPriceNodeId:e.selectedPriceNodeId,staffRequired:e.staffRequired,requiresQuote:e.requiresQuote,showTaxes:!e.hasOwnProperty("showTaxes")||e.showTaxes};return e.repeatOptionSelected&&(n.repeatOptionSelected=e.repeatOptionSelected),n}},{key:"getJobDistanceCharge",value:function(){var e,t,n,o,i,r,a,s,l,u,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,h=0,v=0,m=0,g=0,y=0;try{var b=this.authService.getCurrentUserCompanyInfo(),k=null===(e=null==d?void 0:d.booking)||void 0===e?void 0:e.distanceDetails,w=null==c?void 0:c.variant;if((null==w?void 0:w.isA2B)&&(null==k?void 0:k.distanceInfo)&&k.durationInfo){var A=(null===(t=k.distanceInfo)||void 0===t?void 0:t.value)||0,S=(null===(n=k.durationInfo)||void 0===n?void 0:n.value)||0,C=0,T=0;(null==w?void 0:w.isTravelChargeEnabled)?(w.isKmsRateEnabled&&(C=w.ratePerKms,T=w.freeKms),w.chargeForTime&&(v=w.chargeForTimeRate*S/60),m=w.minimumTravelCost||0):(null==b?void 0:b.isTravelChargeEnabled)&&((null==b?void 0:b.isKmsRateEnabled)&&(C=b.ratePerKms,T=b.freeKms),(null==b?void 0:b.chargeForTime)&&(v=b.chargeForTimeRate*S/60),m=b.minimumTravelCost||0);var U=A||0;T>0&&(U-=T),U<0&&(U=0),h=C*U,y=Math.max(m,h+v)}(null===(i=null===(o=null==d?void 0:d.booking)||void 0===o?void 0:o.zoneTravelCharge)||void 0===i?void 0:i.value)&&!(null===(a=null===(r=null==d?void 0:d.booking)||void 0===r?void 0:r.selectedShop)||void 0===a?void 0:a._id)&&d.currentServiceType!==f.v4.Virtual&&d.currentServiceType!==f.v4.Shop&&(g=(null===(s=null==d?void 0:d.booking)||void 0===s?void 0:s.zoneTravelCharge.isFixed)?null===(l=null==d?void 0:d.booking.zoneTravelCharge)||void 0===l?void 0:l.value:(null===(u=null==d?void 0:d.booking.zoneTravelCharge)||void 0===u?void 0:u.value)/100*(p+y))}catch(b){}finally{return{totalDistanceCharge:+h.toFixed(2),totalDurationCharge:+v.toFixed(2),minimumTravelCost:+m.toFixed(2),totalTravelCharge:+y.toFixed(2),zoneTravelCharge:+g.toFixed(2)}}}},{key:"addExtraQuestions",value:function(e){for(var t,n=[],o=0;o<(null==e?void 0:e.length);o++){var i=e[o];(null===(t=i.answersList)||void 0===t?void 0:t.length)?n=[].concat(s(n),s(this.getAnswersList(i))):(i.questionValue||i.questionData&&Object.keys(i.questionData).length||!i.questionValue&&i.fileValue)&&n.push(i)}return n.length>0?n.map(function(e){return{questionId:e._id,fileName:e.fileName,fileType:e.fileType,fileValue:e.fileValue,questionTitle:e.questionTitle,questionType:e.questionType,questionValue:e.questionValue,questionData:e.questionData}}):[]}},{key:"getAnswersList",value:function(e){for(var t=[],n=0;n<e.answersList.length;n++){var o=e.answersList[n];(o.questionValue||!o.questionValue&&o.fileValue)&&(o._id=e._id,t.push(o))}return t}},{key:"handleError",value:function(e){return(0,c._)(e)}},{key:"getCompany",value:function(){return this.authService.getCurrentUserCompanyInfo()}},{key:"calculateCompanyTax",value:function(e,t,n){var o=0;return t=(0,U.Xh)(t),e>0&&(null==t?void 0:t.length)&&t.forEach(function(t){var i=0;i=+(i=n?e*(t.tax/100):e-e/(1+t.tax/100)).toFixed(2),t.taxAmount=i,o+=i}),{tax:+o.toFixed(2),taxList:t}}},{key:"isCompanyTaxApplicable",value:function(){var e=this.getCompany();return!!(!(null==e?void 0:e.companyOperationModel)&&(null==e?void 0:e.GSTRegistered)||(null==e?void 0:e.companyOperationModel)&&(null==e?void 0:e.contractorGSTRegistered))}},{key:"getServiceProductCount",value:function(e){return e.jobs.reduce(function(e,t){var n,o,i=t.variant?t.variant.numberOfBookings||1:0;return i&&(null===(n=t.extraVariants)||void 0===n||n.forEach(function(e){i+=e.numberOfBookings||0}),null===(o=t.inventories)||void 0===o||o.forEach(function(e){i+=e.quantity||0})),e+i},0)}},{key:"validateLocationReceivedFromGoogle",value:function(e){var t;if(e&&!(null==e?void 0:e.address_components)){var n=this.getCompany();if(!(null==e?void 0:e.name))return this.alertService.showMessage(k.t.addressIncompleteTitle(n),k.t.addressIncompleteMessage(n)),!1;if(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.length)return this.alertService.showMessage(k.t.getAddressNotSelectedFromDropdownTitle(n),k.t.getAddressNotSelectedFromDropdownMessage(n)),!1}return!0}},{key:"updateBookingAttempt",value:function(e){var t=this,n=this.createBookingAttemptRequest(e);return this.http.post(this.updateBookingAttemptUrl,n).pipe((0,m.b)(function(e){(null==e?void 0:e.sessionToken)&&t.authService.setSessionToken(e.sessionToken)}),(0,v.K)(this.handleError))}},{key:"createBookingAttemptRequest",value:function(e){var t,n,o,i,r,a,s,l,u,c,d,p,h,v,m,y,b,k,w={},A=e.booking;if(e.bookingAttemptId&&(w.bookingAttemptId=e.bookingAttemptId),w.companyId=null===(t=this.getCompany())||void 0===t?void 0:t._id,A.address_components&&(w.address_components=A.address_components||[]),(null===(n=null==A?void 0:A.zones)||void 0===n?void 0:n.length)?(w.timezone=A.zones[0].timezone,w.cityZoneId=A.zones[0].id):w.cityZoneId=null,A.pickupAddress&&(w.geolocation=A.pickupAddress.location,w.jobAddress=A.pickupAddress.address),w.hasNoSlots=!!e.hasNoSlots,w.shopHasNoSlots=!!e.shopHasNoSlots,(null===(o=A.selectedShop)||void 0===o?void 0:o._id)?(w.selectedShop=A.selectedShop,w.timezone=(null===(i=A.selectedShop)||void 0===i?void 0:i.timezone)||null):(null===(r=A.routeAddress)||void 0===r?void 0:r.location)&&(w.routeAddresses=[A.routeAddress]),this.authService.isUserLoggedIn()){var S=this.authService.getCurrentUserInfo();w.customerId=S._id,w.customerEmail=S.emailID,w.customerFirstName=S.firstName,w.customerLastName=S.lastName,w.customerPhone=null===(a=S.phone)||void 0===a?void 0:a.toString()}else if(e.guestUser){var C=e.guestUser;w.customerEmail=C.emailID,w.customerFirstName=C.firstName,w.customerLastName=C.lastName,w.customerPhone=null===(s=C.guestPhone)||void 0===s?void 0:s.toString(),w.customerCompanyName&&(w.customerCompanyName=C.customerCompanyName),w.foundUsReason&&(w.foundUsReason=C.foundUsReason)}if(w.customerPhone=(null==w?void 0:w.customerPhone)?w.customerPhone.replace(/[()\s-]/g,""):"",(null===(l=A.jobs)||void 0===l?void 0:l.length)&&(w.variants=[],w.inventory=[],A.jobs.forEach(function(e){var t,n,o,i,r,a,s,l,u,c,d,p={};p.fullName=null===(t=null==e?void 0:e.variant)||void 0===t?void 0:t.fullName,p.id=null===(n=null==e?void 0:e.variant)||void 0===n?void 0:n.id,p.name=null===(o=null==e?void 0:e.variant)||void 0===o?void 0:o.name,p.numberOfBookings=(null===(i=null==e?void 0:e.variant)||void 0===i?void 0:i.numberOfBookings)?null===(r=null==e?void 0:e.variant)||void 0===r?void 0:r.numberOfBookings:1,p.price=null===(a=null==e?void 0:e.variant)||void 0===a?void 0:a.discountedPrice,p.serviceId=A.serviceId,p.primaryImageUrl=null===(s=null==e?void 0:e.variant)||void 0===s?void 0:s.primaryImageUrl,p.selectedPriceNodeId=null===(l=null==e?void 0:e.variant)||void 0===l?void 0:l.selectedPriceNodeId,p.staffRequired=null===(u=null==e?void 0:e.variant)||void 0===u?void 0:u.staffRequired,p.requiresQuote=null===(c=null==e?void 0:e.variant)||void 0===c?void 0:c.requiresQuote,w.variants.push(p),(null===(d=null==e?void 0:e.inventories)||void 0===d?void 0:d.length)&&(w.inventory=w.inventory.concat(e.inventories.map(function(e){return{salePrice:e.salePrice,quantity:e.quantity,name:e.name,id:e.id,mfgPartNumber:e.mfgPartNumber,costPrice:e.costPrice,inventoryRequiresExtraTimeSlot:e.inventoryRequiresExtraTimeSlot,timeSlot:e.timeSlot,inventoryTimeSlotsRequired:e.inventoryTimeSlotsRequired}})))})),null===(c=null===(u=A.jobs)||void 0===u?void 0:u[0])||void 0===c?void 0:c.scheduleDetails){var T=g.utc("".concat(A.jobs[0].scheduleDetails.requestedDate,"/").concat(A.jobs[0].scheduleDetails.requestedMonth+1,"/").concat(A.jobs[0].scheduleDetails.requestedYear),"DD/MM/YYYY").startOf("day").valueOf();w.scheduledOn=T}return(null===(h=null===(p=null===(d=A.jobs)||void 0===d?void 0:d[0])||void 0===p?void 0:p.selectedSlots)||void 0===h?void 0:h.length)&&(w.partnerIds=Array.from(new Set(null===(m=null===(v=A.jobs)||void 0===v?void 0:v[0])||void 0===m?void 0:m.selectedSlots.map(function(e){return e.partnerId}))),w.selectedSlots=null===(b=null===(y=A.jobs)||void 0===y?void 0:y[0])||void 0===b?void 0:b.selectedSlots.map(function(e){return{partnerId:e.partnerId,hour:e._id.hour,minutes:e._id.minutes}})),w.totalAmount=A.total,w.progressStep=e.currentStep,e.currentStep===f.f2.AddressSelection&&!(null===(k=w.address_components)||void 0===k?void 0:k.length)&&(w.progressStep=0),A.qrCodeId&&(w.qrCodeId=A.qrCodeId),A.marketingTrackingId&&(w.marketingTrackingId=A.marketingTrackingId),w}},{key:"notifyLocationChanged",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?this.dropOffLocationChanged$.next(e):this.locationChanged$.next(e)}},{key:"getRequiredSlots",value:function(e,t){if(!e||!(null==t?void 0:t.variant))return 1;var n=0,o=(null==t?void 0:t.variant.numberOfBookings)||1;return(null==t?void 0:t.variant.combineMultipleJobSlots)&&(o=1),(null==t?void 0:t.variant.staffRequired)>1&&(o*=null==t?void 0:t.variant.staffRequired),n+=o}},{key:"requiresQuoting",value:function(e){return!!(null==e?void 0:e.find(function(e){return!0===(null==e?void 0:e.requiresQuote)}))}},{key:"validateTermsCondition",value:function(e,t){var n;return!((null===(n=null==e?void 0:e.compulsoryCheckbox)||void 0===n?void 0:n.length)&&!t)}},{key:"checkTotalPrePayAmount",value:function(e,t){return e<0?0:e>t?t:+e}},{key:"checkPartialPayment",value:function(e,t,n){var o=+t,r=e.partialPrePayValue;if(e&&e.partialPrePay&&e.prePaymentAvailable){if("fixed"===e.partialPrePayType){if(null==n?void 0:n.length){r=0;var a,s=i(n);try{for(s.s();!(a=s.n()).done;){var l=a.value;(null==l?void 0:l.variant)&&(r+=(null==l?void 0:l.variant.numberOfBookings)&&!(null==l?void 0:l.variant.combineMultipleJobSlots)?+(+(null==l?void 0:l.variant.numberOfBookings)*+e.partialPrePayValue).toFixed(2):+e.partialPrePayValue.toFixed(2))}}catch(u){s.e(u)}finally{s.f()}}return this.checkTotalPrePayAmount(r,t)}o=+(o*(r/100)).toFixed(2)}return this.checkTotalPrePayAmount(o,t)}},{key:"prePayCheck",value:function(e){return!(!(null==e?void 0:e.prePaymentAvailable)||!(null==e?void 0:e.prePaymentCompulsory))}},{key:"getPartnerBio",value:function(e){return(0,l.n)(this.http.get("".concat(this.partnerBioUrl,"/").concat(e)))}},{key:"rescheduleJob",value:function(e){return this.http.post(this.rescheduleJobUrl,e).pipe((0,v.K)(this.handleError))}},{key:"sendReceipt",value:function(e){return(0,l.n)(this.http.post(this.onlinePortalReceiptUrl,e))}},{key:"validateEmailField",value:function(e){return!!(null==e?void 0:e.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/))}},{key:"validateCardDetailsForPrepay",value:function(e,t){var n=e.paymentMethod,o=null;return n&&"Cash"!=n&&"Invoice"!=n&&(o=e.cardDetails&&!Array.isArray(e.cardDetails)?e.cardDetails:t.cardDetails.find(function(e){return e._id===t.defaultPaymentMethod})),o}},{key:"validateBooking",value:function(e,t,n){var o;if(!this.validateTermsCondition(n,e.termsConditionAccepted))return f.bU.TermsCondition;var i=null==e?void 0:e.prePaymentSettings;if(this.prePayCheck(i)){var r=e.paymentMethod;if("Cash"==r||"Invoice"==r)return this.checkPreAuthOrPrePayError(i);if(!r)return this.checkPreAuthOrPrePayError(i);if(!this.validateCardDetailsForPrepay(e,t))return this.checkPreAuthOrPrePayError(i)}var a=e.paymentMethod;if(a&&"Cash"!=a&&"Invoice"!=a&&!e.verificationToken)return f.bU.ScaVerificationError;var s=e.guestUser;if(s&&(!this.validateEmailField(s.emailID)||!s.firstName||!s.lastName))return f.bU.GuestUserDetails;if(!(null==t?void 0:t.phone)&&!(null==s?void 0:s.guestPhone))return(null==n?void 0:n.compulsoryCustomerPhone)?f.bU.PhoneNumberCompulsory:f.bU.PhoneNumberNotCompulsory;for(var l=null===(o=null==e?void 0:e.booking)||void 0===o?void 0:o.jobs,u=0;u<l.length;u++)if(!this.validateQuestions(l[u].questions))return f.bU.Questions;return f.bU.NoError}},{key:"validateQuestions",value:function(e){for(var t,n,o=0;e&&o<e.length;o++)if(!0===e[o].compulsory)switch(e[o].questionType){case"file":if(!e[o].fileValue)return!1;break;case"list":if(!(null===(n=null===(t=e[o])||void 0===t?void 0:t.answersList)||void 0===n?void 0:n.find(function(e){return e.fileValue||e.questionValue})))return!1;break;case"text":case"dropdown":if(!e[o].questionValue)return!1}return!0}},{key:"checkPreAuthOrPrePayError",value:function(e){return(null==e?void 0:e.onlyPreAuth)?f.bU.PreAuth:f.bU.Prepay}},{key:"getTotalAndDiscountInfo",value:function(e,t){var n,o,r,a,s,l,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3],d={},p={},h=i(t=t||[]);try{for(h.s();!(l=h.n()).done;){var v=l.value;(null===(o=null===(n=null==v?void 0:v.variant)||void 0===n?void 0:n.repeatOptionSelected)||void 0===o?void 0:o.discountPerJob)>0&&(d=Object.assign({},null==v?void 0:v.variant.repeatOptionSelected),p=Object.assign({},null==v?void 0:v.variant))}}catch(U){h.e(U)}finally{h.f()}var m=this.calculateTotalAndApplyDiscount(e.booking,t,e,u,d,p,c),f=m.distanceChargeDetails,g=m.totalAfterDiscount,y=m.taxableAmountAfterDiscount,b=m.discountedAmount,k=m.calculatedDiscountDetails,w=m.repeatDiscountAmount,A=this.calculateCompanyTax(y,null===(r=e.booking)||void 0===r?void 0:r.taxList,null===(a=e.booking)||void 0===a?void 0:a.taxExclusive),S=A.tax,C=A.taxList,T=g;return(null===(s=e.booking)||void 0===s?void 0:s.taxExclusive)&&e.taxApplicable&&S>0&&(T=g+S),{calculatedDiscountDetails:k,totalAfterTax:T,totalDiscount:b||0,distanceCharge:f||{},tax:S||0,totalAfterDiscount:g,repeatDiscountAmount:w,taxList:C}}}])}(),o.\u0275fac=function(e){return new(e||o)(I.LFG(P.eN),I.LFG(y._),I.LFG(w.H),I.LFG(b.c),I.LFG(A.A),I.LFG(S.$),I.LFG(T.R))},o.\u0275prov=I.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o)},52134:function(e,t,n){"use strict";n.d(t,{E:function(){return u}});var o,i=n(2316),r=n(53399),a=n(53792),s=n(96636),l=n(21298),u=((o=function(){return d(function e(){h(this,e),this.company$=(0,i.f3M)(s._).company$},[{key:"transform",value:function(e){return this.company$.pipe((0,r.U)(function(t){return l.t[e](t)}),(0,a.x)())}}])}()).\u0275fac=function(e){return new(e||o)},o.\u0275pipe=i.Yjl({name:"bookingConstant",type:o,pure:!0}),o)},80711:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var o,i=n(96636),r=n(2316),a=n(54364),s=(o=function(){return d(function e(t,n){h(this,e),this.currencyPipe=t,this.fieldAuthenticationService=n},[{key:"transform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"symbol-narrow";return this.currencyPipe.transform(e,this.fieldAuthenticationService.getCurrentCurrency(),t)}}])}(),o.\u0275fac=function(e){return new(e||o)(r.Y36(a.H9,16),r.Y36(i._,16))},o.\u0275pipe=r.Yjl({name:"fieldCurrency",type:o,pure:!0}),o)},57215:function(e,t,n){"use strict";n.d(t,{X:function(){return u}});var o,i=n(2316),r=n(53399),a=n(39754),s=n(53792),l=n(96636),u=(o=function(){return d(function e(){h(this,e),this.dynamicText$=(0,i.f3M)(l._).dynamicText$},[{key:"transform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.dynamicText$.pipe((0,r.U)(function(t){return t[e]}),(0,a.h)(this.isString),(0,r.U)(function(e){return e.replace("#%#dynamic_replace#%#",String(t))}),(0,s.x)())}},{key:"isString",value:function(e){return"string"==typeof e}}])}(),o.\u0275fac=function(e){return new(e||o)},o.\u0275pipe=i.Yjl({name:"dynamicText",type:o,pure:!0}),o)},41634:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var o,i=n(2316),r=(o=function(){return d(function e(){h(this,e)},[{key:"transform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"==typeof e){var n=e.split(",");return n=n.filter(function(e){return"undefined"!=e.trim()}).map(function(e){return e.trim()}),n.length>2&&n.splice(-1),t&&n.length>2&&n.splice(-1),n.join(", ")}if(null==e?void 0:e.address_line1){var o;if(t){var i=e.address_line1;o="".concat(i)}else{var r=e.address_line1,a=e.address_city;o="".concat(r,", ").concat(a)}return o}return null==e?void 0:e.address_city}}])}(),o.\u0275fac=function(e){return new(e||o)},o.\u0275pipe=i.Yjl({name:"formatAddress",type:o,pure:!0}),o)},28733:function(e,t,n){"use strict";n.d(t,{E:function(){return r}});var o,i=n(2316),r=(o=function(){return d(function e(){h(this,e),this.BASE_URLS=["https://fieldd-images.s3.ap-southeast-2.amazonaws.com/","https://fieldd-images.s3-ap-southeast-2.amazonaws.com/","https://fieldd-images.s3.amazonaws.com/"],this.REDIRECT_URL="https://dn0xhy2xsjuze.cloudfront.net/"},[{key:"transform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||"string"!=typeof e||e.startsWith("data:")||e.startsWith("blob:"))return e||"";var n=this.REDIRECT_URL;return t&&!e.includes(".svg")&&!e.includes(".csv")&&!e.includes(".pdf")&&(n+=t+"/"),this.BASE_URLS.forEach(function(t){return e=e.replace(t,n)}),e}}])}(),o.\u0275fac=function(e){return new(e||o)},o.\u0275pipe=i.Yjl({name:"imageResize",type:o,pure:!0}),o)},39077:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var o,i=n(96636),r=n(41116),a=n(2316),s=(o=function(){return d(function e(t,n){h(this,e),this.bookingService=t,this.fieldAuthenticationService=n},[{key:"transform",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"job";try{var o=this.fieldAuthenticationService.getCurrentUserCompanyInfo();if(Array.isArray(e)){var i=0;return e.forEach(function(e){Object.keys(e||{}).length&&Object.keys(o||{}).length&&(i+=t.bookingService.getTotalTimeInMin(e,o,n))}),this.getDisplayTime(i)}if(Object.keys(e||{}).length&&Object.keys(o||{}).length){var r=this.bookingService.getTotalTimeInMin(e,o,n);if(r)return this.getDisplayTime(r)}}catch(o){}return""}},{key:"getDisplayTime",value:function(e){var t=this.fieldAuthenticationService.getDynamicText(),n=t.hour,o=t.shortHour,i=t.min;if(e>=60){var r=Math.floor(e/60);return 0===Math.floor(e%60)?"".concat(r," ").concat(n):"".concat(r," ").concat(o," ").concat(Math.floor(e%60)," ").concat(i)}return"".concat(e," ").concat(i)}}])}(),o.\u0275fac=function(e){return new(e||o)(a.Y36(r.q,16),a.Y36(i._,16))},o.\u0275pipe=a.Yjl({name:"timeString",type:o,pure:!0}),o)},96289:function(e,t,n){"use strict";n.d(t,{m:function(){return S}});var o,i=n(54364),r=n(53448),a=n(58916),s=n(2316),l=((o=d(function e(){h(this,e)})).\u0275fac=function(e){return new(e||o)},o.\u0275mod=s.oAB({type:o}),o.\u0275inj=s.cJS({imports:[[i.ez,a.Pc]]}),o),u=n(80711),c=n(39077),p=n(28733),v=n(34483),m=n(41634),f=n(18659),g=n(1331),y=n(12349),b=n(27566),k=n(33737),w=n(64314),A=n(46868),S=function(){var e=d(function e(){h(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({providers:[v.V1,f.$,g.i,y.D,i.H9,i.Ov,u.c,c.z,p.E,m.Y,b.Z,k.I,w.e],imports:[[i.ez,r.u5,r.UX,A.m,l],i.ez,r.u5,r.UX,A.m,l]}),e}()},71408:function(e,t,n){"use strict";n.d(t,{U:function(){return m}});var o=n(2316),i=n(10231),r=n(39754),a=n(18459),s=n(4200),l=n(71570),u=n(58916),c=n(54364);function p(e,t){if(1&e){var n=o.EpF();o.TgZ(0,"img",2),o.NdJ("load",function(){return o.CHM(n),o.oxw()._imageLoaded()})("error",function(e){return o.CHM(n),o.oxw().imageErrorHandler(e)}),o.qZA()}if(2&e){var i=o.oxw();o.Q6J("src",i.src,o.LSH)("alt",i.alt),o.uIk("loading",i.lazyLoad?"lazy":"eager")}}var v,m=((v=function(){return d(function e(t,n,i){h(this,e),this.elementRef=t,this.commonHelper=n,this.domSanitizerService=i,this._alt="",this.isInView=!1,this.FALLBACK_IMAGE="../../../assets/img/blank_image.svg",this.imageLoaded=!1,this.altImage=!1,this.lazyLoad=!0,this.load=new o.vpe},[{key:"alt",set:function(e){this._alt=null!=e?e:""}},{key:"src",get:function(){return this._src},set:function(e){this.__src=e,this.altImage=!1,(void 0===this.__src||""===this.__src)&&(this._src=this.domSanitizerService.bypassSecurityTrustResourceUrl(this._alt?this._alt:this.FALLBACK_IMAGE),this.altImage=!0)}},{key:"ngAfterViewInit",value:function(){var e=this;this.src&&!this.lazyLoad&&this.fetchFile(),this.lazyLoad&&(0,a.jo)(this.elementRef.nativeElement).pipe((0,i.o)(function(e){return!e},!0),(0,r.h)(function(e){return!!e})).subscribe(function(t){t&&(e.isInView=!0,e.lazyLoad&&e.fetchFile())})}},{key:"ngOnChanges",value:function(e){var t,n;((null===(t=e.src)||void 0===t?void 0:t.currentValue)&&this.isInView||!1===(null===(n=e.lazyLoad)||void 0===n?void 0:n.currentValue)||!e.lazyLoad&&!this.lazyLoad)&&this.fetchFile()}},{key:"fetchFile",value:function(){var e=this;!this.__src||!this.isInView&&this.lazyLoad||(this.imageLoaded=!1,this.commonHelper.getFile(this.__src).then(function(t){e._src=e.commonHelper.base64ToUri(null==t?void 0:t.data,e.__src)}))}},{key:"_imageLoaded",value:function(){this.imageLoaded=!0,this.load.emit()}},{key:"imageErrorHandler",value:function(e){e.target.src=this._alt?this._alt:this.FALLBACK_IMAGE}}])}()).\u0275fac=function(e){return new(e||v)(o.Y36(o.SBq),o.Y36(s.$),o.Y36(l.H7))},v.\u0275cmp=o.Xpm({type:v,selectors:[["app-image-shell"]],hostVars:4,hostBindings:function(e,t){2&e&&o.ekj("img-loaded",t.imageLoaded)("alt-img",t.altImage)},inputs:{lazyLoad:"lazyLoad",alt:"alt",src:"src"},outputs:{load:"load"},features:[o.TTD],decls:2,vars:1,consts:[["name","crescent",1,"spinner"],["class","inner-img",3,"src","alt","load","error",4,"ngIf"],[1,"inner-img",3,"src","alt","load","error"]],template:function(e,t){1&e&&(o._UZ(0,"ion-spinner",0),o.YNc(1,p,1,3,"img",1)),2&e&&(o.xp6(1),o.Q6J("ngIf",t.src))},directives:[u.PQ,c.O5],styles:['[_nghost-%COMP%]{display:block;position:relative;height:100%;width:100%;border-radius:0;border-radius:var(--image-shell-border-radius, 0px);z-index:2;overflow:hidden}.alt-img[_nghost-%COMP%]{--image-shell-object-fit: contain}[_nghost-%COMP%] > .inner-img[_ngcontent-%COMP%]{-webkit-transition:visibility 0s linear,opacity .2s linear;transition:visibility 0s linear,opacity .2s linear;opacity:0;visibility:hidden;width:100%;width:var(--image-shell-img-width, 100%);height:100%;height:var(--image-shell-img-height, 100%);max-width:var(--max-width);-o-object-fit:contain;object-fit:contain;-o-object-fit:var(--image-shell-object-fit, contain);object-fit:var(--image-shell-object-fit, contain);border-radius:0;border-radius:var(--image-shell-border-radius, 0px)}[_nghost-%COMP%] > .spinner[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]:before{content:"";background:transparent;background:var(--image-shell-loading-background, transparent);border-radius:0;border-radius:var(--image-shell-border-radius, 0px);position:absolute;top:0;bottom:0;left:0;right:0}.img-loaded[_nghost-%COMP%]:before{display:none}.img-loaded[_nghost-%COMP%] > .inner-img[_ngcontent-%COMP%]{opacity:1;visibility:visible}[animation=spinner][_nghost-%COMP%]{--image-shell-loading-background: rgba(var(--ion-color-primary-rgb), .1)}[animation=spinner][_nghost-%COMP%] > .spinner[_ngcontent-%COMP%]{display:block;position:absolute;top:-webkit-calc(50% - -webkit-calc(28px / 2));top:calc(50% - calc(28px / 2));top:-webkit-calc(50% - -webkit-calc(var(--image-shell-spinner-size, 28px) / 2));top:calc(50% - calc(var(--image-shell-spinner-size, 28px) / 2));left:-webkit-calc(50% - -webkit-calc(28px / 2));left:calc(50% - calc(28px / 2));left:-webkit-calc(50% - -webkit-calc(var(--image-shell-spinner-size, 28px) / 2));left:calc(50% - calc(var(--image-shell-spinner-size, 28px) / 2));width:28px;width:var(--image-shell-spinner-size, 28px);height:28px;height:var(--image-shell-spinner-size, 28px);font-size:28px;font-size:var(--image-shell-spinner-size, 28px);line-height:28px;line-height:var(--image-shell-spinner-size, 28px);color:rgba(var(--ion-color-primary-rgb),.25);color:var(--image-shell-spinner-color, rgba(var(--ion-color-primary-rgb), .25))}[animation=spinner].img-loaded[_nghost-%COMP%] > .spinner[_ngcontent-%COMP%]{display:none;visibility:hidden}']}),v)},18752:function(e,t,n){"use strict";n.d(t,{D:function(){return w}});var o,i=n(42321),s=n(2316),l=n(53882),u=n(78603),c=n(75249),p=n(39754),v=n(53792),m=n(54366),f=n(53399),g=n(65110),y=n(18459),b=n(71570),k=n(81984),w=((o=function(){return d(function e(t,n,o,i,r){h(this,e),this.domSanitizer=t,this.nativeStorage=n,this.httpClient=o,this.elementRef=i,this.renderer=r,this.FALLBACK_IMAGE="../../../assets/img/blank_image.svg",this.isInView=!1,this.src$=new u.t,this.subscriptions=[],this.lazyLoad=!0},[{key:"ngOnInit",value:function(){var e=this;this.subscriptions.push(this.src$.asObservable().pipe((0,p.h)(function(){return!e.lazyLoad||e.isInView}),(0,v.x)(),(0,m.w)(function(t){return(0,i.mG)(e,void 0,void 0,a().mark(function e(){var n;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.renderer.setProperty(this.elementRef.nativeElement,"innerHTML",'<svg viewBox="0 0 10 10"></svg>'),e.next=3,this.nativeStorage.get(t);case 3:return n=e.sent,e.abrupt("return",[t,null==n?void 0:n.file]);case 5:case"end":return e.stop()}},e,this)}))}),(0,m.w)(function(t){var n=r(t,2),o=n[0],i=n[1];if(i)return(0,c.of)([o,i]);var a=new l.WM;return a.set("Accept","image/svg+xml"),e.httpClient.get(o,{headers:a,responseType:"text"}).pipe((0,f.U)(function(e){return[o,e]}))})).subscribe({next:function(t){var n=r(t,2),o=n[0],i=n[1];e.setSvg(o,i)}}))}},{key:"ngAfterViewInit",value:function(){var e=this;(0,y.jo)(this.elementRef.nativeElement).pipe((0,g.P)(function(e){return!!e})).subscribe(function(){e.isInView=!0,e.lazyLoad&&e.src$.next(e.src||e.FALLBACK_IMAGE)})}},{key:"ngOnChanges",value:function(){this.src$.next(this.src||this.FALLBACK_IMAGE)}},{key:"setSvg",value:function(e,t){t&&(this.nativeStorage.set(e,{lastUsed:Date.now(),file:t}),t=(t=t.replace(/fill=""/g,'fill="var(--fill-color, var(--main-grey-i-color))"')).replace(/stroke=""/g,'stroke="var(--fill-color, var(--main-grey-i-color))"'),t=this.domSanitizer.sanitize(s.q3G.HTML,this.domSanitizer.bypassSecurityTrustHtml(t)),this.renderer.setProperty(this.elementRef.nativeElement,"innerHTML",t))}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach(function(e){return e.unsubscribe()})}}])}()).\u0275fac=function(e){return new(e||o)(s.Y36(b.H7),s.Y36(k.Ke),s.Y36(l.eN),s.Y36(s.SBq),s.Y36(s.Qsj))},o.\u0275cmp=s.Xpm({type:o,selectors:[["svg-shell"],["","svg-shell",""]],inputs:{lazyLoad:"lazyLoad",src:"src"},features:[s.TTD],decls:0,vars:0,template:function(e,t){},encapsulation:2}),o)},47731:function(e,t,n){"use strict";n.d(t,{a:function(){return v}});var o,i=n(42221),r=n(7964),a=n(7048),s=n(82426),l=n(47708),u=n(92340),c=n(2316),p=n(53882),v=((o=function(){return d(function e(t){h(this,e),this.http=t,this.uploadImageUrl=u.N.baseUrl+"/chat/images"},[{key:"establishConnection",value:function(e){this.socket=l.connect(u.N.socket_url+"/chat",{transports:["websocket"],query:{userType:"user",_id:e}})}},{key:"disconnect",value:function(){var e;null===(e=this.socket)||void 0===e||e.disconnect()}},{key:"sendMessage",value:function(e){this.socket.emit("new-message",e)}},{key:"onNewMessage",value:function(){var e=this;return new i.y(function(t){e.socket.on("new-message",function(e){t.next(e)})})}},{key:"sendHelplineMessage",value:function(e){this.socket.emit("new-chat-message",e)}},{key:"onHelplineNewMessage",value:function(){var e=this;return new i.y(function(t){e.socket.on("new-chat-message",function(e){t.next(e)})})}},{key:"sendMessageAsSeen",value:function(e){this.socket.emit("seen-chat-message",e)}},{key:"onMessageSeen",value:function(){var e=this;return new i.y(function(t){e.socket.on("seen-chat-message",function(e){t.next(e)})})}},{key:"uploadChatImage",value:function(e){var t=this.dataURItoBlob(e),n=new FormData;return n.append("images",t,"name.jpeg"),this.http.post(this.uploadImageUrl,n).pipe((0,a.b)(),(0,s.K)(this.handleError))}},{key:"dataURItoBlob",value:function(e){for(var t=window.atob(e),n=new ArrayBuffer(t.length),o=new Uint8Array(n),i=0;i<t.length;i++)o[i]=t.charCodeAt(i);return new Blob([o],{type:"image/jpeg"})}},{key:"onJobChange",value:function(){var e=this;return new i.y(function(t){e.socket.on("job-update",function(e){t.next(e)})})}},{key:"handleError",value:function(e){return(0,r._)(e)}}])}()).\u0275fac=function(e){return new(e||o)(c.LFG(p.eN))},o.\u0275prov=c.Yz7({token:o,factory:o.\u0275fac}),o)},4200:function(e,t,n){"use strict";n.d(t,{$:function(){return k}});var o=n(42321),s=n(18659),l=n(1331),u=n(92340);function c(e){return e.then(function(e){return e.default||e})}var p,v=n(15433),m=n(18459),f=n(2316),g=n(58916),y=n(81984),b=n(71570),k=(p=function(){return d(function e(t,n,o,i,r){h(this,e),this.file=t,this.platform=n,this.nativeStorage=o,this.inAppBrowser=i,this.domSanitizer=r,this.baseURI=u.N.baseUrl,this.apiKey=u.N.apiKey,this.itiInstances={}},[{key:"importIntlTelInput",get:function(){return this._importIntlTelInput||(this._importIntlTelInput=n.e(7439).then(n.t.bind(n,97439,23)).then(function(e){return e.default})),this._importIntlTelInput}},{key:"importUtils",get:function(){return this._importUtils||(this._importUtils=c(n.e(3816).then(n.t.bind(n,13816,23)))),this._importUtils}},{key:"importJsZip",get:function(){return this._importJsZip||(this._importJsZip=n.e(7284).then(n.t.bind(n,17284,23)).then(function(e){return e.default})),this._importJsZip}},{key:"importFileSaver",get:function(){return this._importFileSaver||(this._importFileSaver=c(n.e(7797).then(n.t.bind(n,97797,23))).then(function(e){return e.saveAs})),this._importFileSaver}},{key:"getCompanyDomainUrl",value:function(e){return e.brandDomain&&e.brandDomain.DNSPropagated&&e.brandDomain.SSLGenerated&&"completed"===e.brandDomain.isCertGenerated.toLowerCase()&&e.brandDomain.domainName?e.brandDomain.domainName:e.domainUrl+".fieldd.co"}},{key:"getRepeatWord",value:function(e,t){var n="",o="".concat((null==t?void 0:t.wordEvery)||"Every"," ").concat(e.repeatEvery>1?e.repeatEvery+" ":"");return(n="WEEKLY"===(null==e?void 0:e.frequency)?o+(null==t?void 0:t.wordWeek)||"Week(s)":"DAILY"===e.frequency?o+(null==t?void 0:t.wordDay)||"Day(s)":o+(null==t?void 0:t.wordMonth)||"Month(s)").includes("(s)")&&(n=n.replace("(s)",1===e.repeatEvery?"":"s")),n}},{key:"downloadPdf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,o.mG)(this,void 0,void 0,a().mark(function o(){var i;return a().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!n){o.next=9;break}return i=new Blob([e],{type:"application/pdf"}),e=URL.createObjectURL(i),o.next=5,this.importFileSaver;case 5:o.t0=o.sent,(0,o.t0)(i,t),o.next=10;break;case 9:this.inAppBrowser.create(encodeURI(e),"_system").show();case 10:case"end":return o.stop()}},o,this)}))}},{key:"saveLocally",value:function(e,t){return(0,o.mG)(this,void 0,void 0,a().mark(function n(){var o,i;return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.importFileSaver;case 2:if(o=n.sent,!this.platform.is("cordova")){n.next=17;break}return this.platform.is("ios")||window,n.prev=5,n.next=8,this.file.writeFile(this.file.dataDirectory,t,this.base64ToBlob(e));case 8:i=n.sent,console.log(i),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(5),console.log(n.t0,"e");case 15:n.next=18;break;case 17:o(URL.createObjectURL(this.base64ToBlob(e)),t);case 18:case"end":return n.stop()}},n,this,[[5,12]])}))}},{key:"downloadFiles",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file";Array.isArray(e)||(e=[e]);var o=Promise.all(e.map(function(e){return t.getFile(e)}));return Promise.all([this.importJsZip,o]).then(function(o){var i=r(o,2),a=i[0],s=i[1];if(1===e.length){var l=s[0],u=l.data,c=l.extension;return t.saveLocally(u,"".concat(n,"-").concat(Date.now(),".").concat(c))}var d=new a;return s.forEach(function(e,t){if(e){var n=e.data,o=e.extension;d.file("".concat(t+1,".").concat(o),n.split("base64,")[1],{base64:!0})}}),d.generateAsync({type:"base64"}).then(function(e){return t.saveLocally(e="data:application/zip;base64,".concat(e),"".concat(n,"-").concat(Date.now(),".zip"))})})}},{key:"getFile",value:function(e){return(0,o.mG)(this,void 0,void 0,a().mark(function t(){var n,o;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.nativeStorage.get(e);case 3:if(!(null==(n=t.sent)?void 0:n.file)){t.next=8;break}t.t0=n.file,t.next=11;break;case 8:return t.next=10,this.fetchFile(e);case 10:t.t0=t.sent;case 11:return o=t.t0,t.abrupt("return",{data:o,extension:o.split(";")[0].split("/")[1]});case 15:return t.prev=15,t.t1=t.catch(0),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,15]])}))}},{key:"fetchFile",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,o.mG)(this,void 0,void 0,a().mark(function n(){var o,i,r=this;return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e);case 2:if((o=n.sent).status>=200&&o.status<=299){n.next=5;break}throw new Error("Not found");case 5:return n.next=7,o.blob();case 7:return i=n.sent,n.next=10,new Promise(function(n){var o=new FileReader;o.onload=function(){var i=o.result;t&&r.nativeStorage.set(e,{lastUsed:Date.now(),file:i}),n(i)},o.readAsDataURL(i)});case 10:return n.abrupt("return",n.sent);case 11:case"end":return n.stop()}},n)}))}},{key:"base64ToBlob",value:function(e){for(var t=e.split(";")[0].split(":")[1],n=window.atob(e.split("base64,")[1]),o=new ArrayBuffer(n.length),i=new Uint8Array(o),r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return new Blob([i],{type:t})}},{key:"base64ToUri",value:function(e,t){var n;if(e)try{n=URL.createObjectURL(this.base64ToBlob(e))}catch(o){n=e}return this.domSanitizer.bypassSecurityTrustResourceUrl(n||t)}},{key:"getBrowser",value:function(){var e,t,n=navigator.userAgent,o=navigator.appName;return-1!=(t=n.indexOf("Opera"))?o="Opera":-1!=(t=n.indexOf("MSIE"))?o="Microsoft Internet Explorer":-1!=(t=n.indexOf("Chrome"))?o="Chrome":-1!=(t=n.indexOf("Safari"))?o="Safari":-1!=(t=n.indexOf("Firefox"))?o="Firefox":(e=n.lastIndexOf(" ")+1)<(t=n.lastIndexOf("/"))&&(o=n.substring(e,t)).toLowerCase()==o.toUpperCase()&&(o=navigator.appName),this.isMobileBrowser?"Mobile Browser":o}},{key:"isMobileBrowser",get:function(){var e=navigator.userAgent||navigator.vendor;return/windows phone|android|iPad|iPhone|iPod/i.test(e)}},{key:"getZone",value:function(e,t){if(!(null==e?void 0:e.length))return null;var n=null==e?void 0:e[0];try{t&&((n=null==e?void 0:e.find(function(e){var n;return(null===(n=e.timezone)||void 0===n?void 0:n.toLowerCase())===(null==t?void 0:t.toLowerCase())}))||(n=null==e?void 0:e[0]))}catch(o){}finally{return n}}},{key:"openPdfInPrint",value:function(e){return(0,o.mG)(this,void 0,void 0,a().mark(function t(){var n,o,i,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,(null==(n=document.querySelectorAll("[name=pdf-iframe]"))?void 0:n.length)&&n.forEach(function(e){document.body.removeChild(e)}),t.next=5,fetch(e);case 5:return t.next=7,t.sent.blob();case 7:o=t.sent,i=URL.createObjectURL(o),r=document.createElement("iframe"),t.t0=(r.name="pdf-iframe",r.setAttribute("crossOrigin","Anonymous"),r.setAttribute("type","application/pdf"),r.setAttribute("src",i),r.style.display="none",document.body.appendChild(r),this.getBrowser()),t.next="Firefox"===t.t0||"Chrome"===t.t0?13:15;break;case 13:return r.addEventListener("load",function(){r.contentWindow.focus(),r.contentWindow.print();try{r.addEventListener("focus",function(e){document.body.removeChild(r)})}catch(e){setTimeout(function(){document.body.removeChild(r)},500)}}),t.abrupt("break",16);case 15:window.frames[r.name].addEventListener("load",function(){window.frames[r.name].focus(),window.frames[r.name].print()});case 16:t.next=20;break;case 18:t.prev=18,t.t1=t.catch(0);case 20:case"end":return t.stop()}},t,this,[[0,18]])}))}},{key:"compareJob",value:function(e,t){var n,o;return!e||(null===(n=null==t?void 0:t.variant)||void 0===n?void 0:n.id)!==(null===(o=null==e?void 0:e.variant)||void 0===o?void 0:o.id)||this.hasMergeCountChanged(e,t)||this.extraVariantsChanged(e,t)}},{key:"extraVariantsChanged",value:function(e,t){var n,o,i,r;return(null===(n=null==t?void 0:t.extraVariants)||void 0===n?void 0:n.length)!=(null===(o=null==e?void 0:e.extraVariants)||void 0===o?void 0:o.length)||!!((null===(i=null==t?void 0:t.extraVariants)||void 0===i?void 0:i.length)&&(null===(r=null==e?void 0:e.extraVariants)||void 0===r?void 0:r.length)&&this.hasUncommonVariants(null==t?void 0:t.extraVariants,null==e?void 0:e.extraVariants))}},{key:"hasMergeCountChanged",value:function(e,t){return this.getMergeCount(e)!==this.getMergeCount(t)}},{key:"getMergeCount",value:function(e){var t,n=0;return(null==e?void 0:e.variant)&&(n+=(e.variant.timeSlotsRequired||1)*(e.variant.numberOfBookings||1)),(null===(t=null==e?void 0:e.inventories)||void 0===t?void 0:t.length)&&(n+=e.inventories.reduce(function(e,t){return t.inventoryRequiresExtraTimeSlot&&(e+=(t.quantity||1)*(t.inventoryTimeSlotsRequired||0)),e},0)),n}},{key:"hasUncommonZones",value:function(e,t){if(e=Array.isArray(e)?e:[],t=Array.isArray(t)?t:[],e.length!==t.length)return!0;var n,o=i(t);try{var r,a=function(){var t=n.value;if(e.find(function(e){return e.id!==t.id}))return{v:!0}};for(o.s();!(n=o.n()).done;)if(r=a())return r.v}catch(s){o.e(s)}finally{o.f()}return!1}},{key:"hasUncommonVariants",value:function(e,t){if(!(null==e?void 0:e.length)||e.length!==t.length)return!0;for(var n=!1,o=0;o<e.length;o++){for(var i=!1,r=0;r<t.length;r++)if(String(e[o].id)===String(t[r].id)&&e[o].numberOfBookings===t[r].numberOfBookings){i=!0;break}if(!i){n=!0;break}}return n}},{key:"mapServiceToStaff",value:function(e,t){var n={};try{for(var o=0;o<e.length;o++)e[o].hasVariants||(n[e[o].id]=this.getApplicableStaff(e[o].id,t))}catch(o){}finally{return n}}},{key:"getApplicableStaff",value:function(e,t){var n=[];try{if(null==t?void 0:t.length)for(var o=0;o<t.length;o++)(t[o].performServices.indexOf("all")>-1||t[o].performServices.indexOf(e)>-1)&&n.push(String(t[o]._id))}catch(o){}finally{return n}}},{key:"hasCommonStaff",value:function(e){for(var t=0;t<e.length;t++)for(var n,o=e[t],i=function(){var t=o[r];if(0==e.filter(function(e){return-1==e.indexOf(t)}).length)return{v:!0}},r=0;r<o.length;r++)if(n=i())return n.v;return!1}},{key:"hasGeolocationChange",value:function(e,t){return!t||!(t&&e&&t.latitude===e.latitude&&t.longitude===e.longitude)}},{key:"mapAssetList",value:function(e,t){var n=this;return(e||[]).filter(function(e){return!!Array.isArray(null==e?void 0:e.data)}).map(function(e){var o;return n.mapAssetData(e,(null===(o=null==t?void 0:t.customerAssets)||void 0===o?void 0:o.items)||[])})}},{key:"mapAssetData",value:function(e,t){var n,o,i=(0,m.VS)((null==e?void 0:e.data)||[],"label"),r=i["License Plate"],a=[],s=(0,m.Xh)(t).sort(function(e,t){return e.position-t.position}).map(function(e){var t=i[e.label];e.inputType===v.ih.LICENSE_PLATE&&(r&&!t&&(t=r),!n&&(null==t?void 0:t.value)&&(n=t));var s=Object.assign(Object.assign({},e),{value:((null==t?void 0:t.value)||"").trim()});if((null==s?void 0:s.value)&&[v.ih.TEXT,v.ih.PARAGRAPH].includes(e.inputType)&&a.push(s.value),(null==t?void 0:t.extraData)&&(s.extraData=t.extraData,!o&&e.inputType===v.ih.PHOTOS&&Array.isArray(s.extraData))){var l=s.extraData.find(function(e){return!!e});l&&(o=l)}return s});return((null==r?void 0:r.extraData)||(null==n?void 0:n.value))&&(n=r||n,a.length||(a.push("".concat(n.extraData.year||""," ").concat(n.extraData.model||""," ").concat(n.extraData.make||"").trim()),a.push("".concat(n.plate||""))),n.extraData.image&&(o=n.extraData.image)),{_id:(null==e?void 0:e._id)||"",data:s,image:o,profileImage:(null==e?void 0:e.profileImage)||"",title:a[0]||"",subtitle:a[1]||"",selected:!1}}},{key:"initIntlInput",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#phone";return Promise.all([this.importIntlTelInput,this.importUtils]).then(function(o){var i,a=r(o,2),s=a[0],l=a[1],u=document.querySelector(n);if(u){null===(i=t.itiInstances[n])||void 0===i||i.destroy();var c=s(u,{separateDialCode:!0,allowDropdown:null==e?void 0:e.internationalCustomerPhone,onlyCountries:(null==e?void 0:e.internationalCustomerPhone)?[]:[null==e?void 0:e.activeCountry],utilsScript:l});t.itiInstances[n]=c,c.setCountry(null==e?void 0:e.activeCountry);var d=u.parentElement.querySelector(".iti__selected-flag");d&&d.removeAttribute("tabIndex");var p=function(){setTimeout(function(){var e,t=null===(e=u.parentElement.querySelector(".iti__flag-container"))||void 0===e?void 0:e.clientWidth;t&&u.style.setProperty("--iti-flag-con-width",t+"px")})};return u.addEventListener("countrychange",function(){return p()}),p(),c}})}},{key:"formatPhoneNumber",value:function(e){return this.importUtils.then(function(){return intlTelInputUtils.formatNumber(e,null,intlTelInputUtils.numberFormat.NATIONAL)}).catch(function(){return e})}},{key:"animateAddItem",value:function(e,t,n,o,i){var r=this;try{var a=function(o){var a;void 0===o&&(o=null===(a=e.name)||void 0===a?void 0:a.charAt(0)),r.animateAddition(o,t,n,.5),"function"==typeof i&&i()};if(e.primaryImageUrl||e.image){var s=o.transform(e.primaryImageUrl||e.image,"180x180");this.nativeStorage.get(s).then(function(e){return a('<img src="'.concat((null==e?void 0:e.file)||s,'">'))}).catch(function(){return a()})}else a()}catch(a){i()}}},{key:"animateAddition",value:function(e,t,n){var o,i,r,a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,l=document.createElement("div");l.classList.add("add-service-animation"),o=this.getPositionFromElem(t),r=o.top,a=o.left,l.style.setProperty("--left",a+"px"),l.style.setProperty("--top",r+"px"),l.style.setProperty("--speed",s+"s");var u=document.createElement("p");u.innerHTML=e,l.appendChild(u);var c=l;document.body.appendChild(l),i=this.getPositionFromElem(n),r=i.top,a=i.left,setTimeout(function(){c.style.padding="5px",c.style.transform="rotate(-30deg)",c.style.opacity="0",c.style.setProperty("--left",a+"px"),c.style.setProperty("--top",r+"px"),setTimeout(function(){c.remove()},1e3*s+100)},100)}},{key:"getPositionFromElem",value:function(e){var t,n,o,i;return{top:((null===(t=null==e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.top)+(null===(n=null==e?void 0:e.getBoundingClientRect())||void 0===n?void 0:n.bottom))/2,left:((null===(o=null==e?void 0:e.getBoundingClientRect())||void 0===o?void 0:o.left)+(null===(i=null==e?void 0:e.getBoundingClientRect())||void 0===i?void 0:i.right))/2}}},{key:"converseThreeToSixHexDigits",value:function(e){var t=[e.charAt(1),e.charAt(2),e.charAt(3)];return"#".concat(t[0],t[0],t[1],t[1],t[2],t[2])}},{key:"hexToRgb",value:function(e){var t=e;4===t.length&&(t=this.converseThreeToSixHexDigits(t));var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null}}])}(),p.\u0275fac=function(e){return new(e||p)(f.LFG(s.$),f.LFG(g.t4),f.LFG(y.Ke),f.LFG(l.i),f.LFG(b.H7))},p.\u0275prov=f.Yz7({token:p,factory:p.\u0275fac,providedIn:"root"}),p)},76645:function(e,t,n){"use strict";n.d(t,{C:function(){return m}});var o,i=n(32316),r=n(39754),a=n(10231),l=n(96636),u=n(2316),c=["map"],p=["staticMapEl"],v=(o=function(){return d(function e(t,n){h(this,e),this.elementRef=t,this.authService=n,this.staticMap=!1,this.markers={},this.directionsService=new google.maps.DirectionsService,this.STATIC_MAP_ID="static-map-el",this.map=null,this.polylineOptions={strokeColor:"#0668ff",strokeOpacity:.6,strokeWeight:5}},[{key:"ngOnInit",value:function(){this.directionsRenderer=new google.maps.DirectionsRenderer({polylineOptions:this.polylineOptions})}},{key:"STATIC_MAP_BASE",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"place";return"https://www.google.com/maps/embed/v1/".concat(e,"?key=").concat(window.GOOGLE_MAPS_API_KEY)}},{key:"ngAfterViewInit",value:function(){var e=this;setTimeout(function(){return e.initializeMap()})}},{key:"initializeMap",value:function(){var e,t,n,o,i=this;window.staticMap?(this.authService.restrictDynamicMapFlag=!0,this.staticMap=!0,n=document.getElementById("index-static-map"),o=null===(t=this.staticMapEl)||void 0===t?void 0:t.nativeElement):(n=document.getElementById("index-google-map"),o=null===(e=this.mapElement)||void 0===e?void 0:e.nativeElement,this.authService.restrictDynamicMapFlag=!1,this.staticMap=!1),n&&window.mapInitialized?this.moveMapElement(n,o):(window.mapInitialized=!0,this.authService.companyChanged$.pipe((0,a.o)(function(e){return!e},!0),(0,r.h)(function(e){return!!e})).subscribe(function(){var e,t,n,r,a=i.authService.getCurrentUserCompanyInfo(),s=i.authService.getAppSettings(),l={latitude:30.2672,longitude:-97.7431};if((null==a?void 0:a.defaultMapCordinates)&&(null==a?void 0:a.defaultMapCordinates.hasOwnProperty("latitude"))?l=a.defaultMapCordinates:(null===(e=null==a?void 0:a.address)||void 0===e?void 0:e.location)&&a.address.location.hasOwnProperty("latitude")&&a.address.location.hasOwnProperty("longitude")&&(l=null==a?void 0:a.address.location),i.staticMap&&o){var u=document.createElement("iframe");u.setAttribute("id",i.STATIC_MAP_ID),u.setAttribute("style","height:100%;width:100%"),o.append(u),i.setStaticMapUrl(l.latitude,l.longitude,12),i.map=null,i.setMapReady()}else{r=s.mapStyle&&"original_map"===s.mapStyle?new google.maps.StyledMapType(window.mapStylesOriginal):new google.maps.StyledMapType(window.mapStyles);var c={center:new google.maps.LatLng(l.latitude,l.longitude),clickableIcons:!1,draggable:!0,disableDoubleClickZoom:!0,fullscreenControl:!1,streetViewControl:!1,mapTypeControl:!1,mapTypeControlOptions:{mapTypeIds:["roadmap","satellite","hybrid","terrain","styled_map"]},zoom:16,icon:"../../../../../../../../assets/img/transparent.png",zoomControl:!0,mapTypeId:google.maps.MapTypeId.ROADMAP,gestureHandlingOption:"cooperate"};i.map=new google.maps.Map(o,c),null===(t=i.map)||void 0===t||t.mapTypes.set("styled_map",r),null===(n=i.map)||void 0===n||n.setMapTypeId("styled_map"),i.setMapReady()}}))}},{key:"setMapReady",value:function(){this.mapInitialized=!0,this.authService.mapReady$.next(!0)}},{key:"moveMapElement",value:function(e,t){this.authService.showAppRoot(),window.staticMap?(this.map=null,this.STATIC_MAP_ID="index-static-map"):this.map=window.map,this.setMapReady();var n=document.createDocumentFragment();n.appendChild(e),null==t||t.appendChild(n)}},{key:"createMarker",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!this.staticMap&&this.map){this.removeMarker(e);var i=new google.maps.Marker({map:this.map,draggable:!!o,animation:google.maps.Animation.DROP});t&&i.setPosition(t),i.setIcon(n||"../../../../assets/img/custompin.svg"),"function"==typeof o&&i.addListener("dragend",function(e){return o(e)}),this.markers[e]=i,"partnerMarker"==e&&(this.partnerPosition=t,this.partnerIcon=n)}}},{key:"setMarkerIcon",value:function(e,t){var n;t&&this.map&&this.markers&&(null===(n=this.markers[e])||void 0===n||n.setIcon(t))}},{key:"changeMarkerPosition",value:function(e,t){var n;null===(n=this.markers[e])||void 0===n||n.setPosition(t),"partnerMarker"==e&&(this.partnerPosition=t)}},{key:"moveMarker",value:function(e,t,n){isNaN(null==t?void 0:t.latitude)||isNaN(null==t?void 0:t.longitude)||(this.markers[e]||this.createMarker(e,{lat:null==t?void 0:t.latitude,lng:null==t?void 0:t.longitude},n),this.animateMove(e,0,(t.latitude-this.partnerPosition.lat)/100,(t.longitude-this.partnerPosition.lng)/100,t.bearing))}},{key:"animateMove",value:function(e,t,n,o,i){var r,a=this;if(this.partnerPosition.lat+=n,this.partnerPosition.lng+=o,this.changeMarkerPosition(e,this.partnerPosition),100!=t&&(t++,setTimeout(function(){a.animateMove(e,t,n,o,i)},100)),100==t){var s=document.querySelectorAll("img[src='".concat(this.partnerIcon.url,"']"));(null==s?void 0:s.length)&&(s[0].style.transform="rotate(".concat(i,"deg)"),(null===(r=s[0].parentElement)||void 0===r?void 0:r.style)&&(s[0].parentElement.style.overflow="visible"))}}},{key:"removeMarker",value:function(e){var t;try{this.markers[e]&&void 0!==this.markers[e].setMap&&(null===(t=this.markers[e])||void 0===t||t.setMap(null),this.markers[e]=null,delete this.markers[e])}catch(n){}}},{key:"centerDirection",value:function(e,t){var n=this,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.staticMap||!e||!t||setTimeout(function(){var i,r,a=Math.abs(e-t)/2;n.getZoom()>16?n.setZoom(n.getZoom()-2):a>.01&&n.setZoom(n.getZoom()-1),a<.001&&(a=.001),o&&n.panTo({lat:(null===(i=n.map)||void 0===i?void 0:i.getCenter().lat())+a,lng:null===(r=n.map)||void 0===r?void 0:r.getCenter().lng()})},100)}},{key:"moveMap",value:function(e,t,n){var o,i,r,a,s,l,u,c;this.map&&this.mapInitialized&&"function"==typeof this.map.getCenter&&(n?(null===(o=null==e?void 0:e.lat)||void 0===o?void 0:o.toFixed(4))==(null===(a=null===(r=null===(i=this.map)||void 0===i?void 0:i.getCenter())||void 0===r?void 0:r.lat())||void 0===a?void 0:a.toFixed(4))&&(null===(s=null==e?void 0:e.lng)||void 0===s?void 0:s.toFixed(4))==(null===(c=null===(u=null===(l=this.map)||void 0===l?void 0:l.getCenter())||void 0===u?void 0:u.lng())||void 0===c?void 0:c.toFixed(4))||this.animatePanTo(e,t):(this.panTo(e),this.setZoom(t)))}},{key:"moveMapToMarker",value:function(e){this.markers[e]&&this.moveMap(this.markers[e].getPosition())}},{key:"handleZoomOut",value:function(e,t,n){var o=this;e<=16?setTimeout(function(){o.panTo(t),o.handleZoomIn(n||16,e)},100):(this.setZoom(e--),setTimeout(function(){o.handleZoomOut(e,t,n)},100))}},{key:"handleZoomIn",value:function(e,t){var n=this;t!=e&&(this.setZoom(t++),setTimeout(function(){n.handleZoomIn(e,t)},100))}},{key:"animatePanTo",value:function(e,t){this.handleZoomOut(this.getZoom(),e,t)}},{key:"setZoom",value:function(e){var t;e&&!isNaN(e)&&this.map&&"function"==typeof this.map.setZoom&&(null===(t=this.map)||void 0===t||t.setZoom(e))}},{key:"panTo",value:function(e){var t;!isNaN(e.lat)&&!isNaN(e.lng)&&this.map&&"function"==typeof this.map.panTo&&(null===(t=this.map)||void 0===t||t.panTo({lat:e.lat,lng:e.lng}))}},{key:"getZoom",value:function(){var e;if(this.map&&"function"==typeof this.map.getZoom)return null===(e=this.map)||void 0===e?void 0:e.getZoom()}},{key:"setStaticMapUrl",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:12;if(this.staticMap){var o="".concat(this.STATIC_MAP_BASE(),"&q=").concat(e,",").concat(t,"&zoom=").concat(n);this.setIframeUrl(o)}}},{key:"setIframeUrl",value:function(e){var t=document.getElementById(this.STATIC_MAP_ID);null==t||t.setAttribute("src",e)}},{key:"setDirection",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:google.maps.UnitSystem.METRIC,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:google.maps.TravelMode.DRIVING,a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:12;if(e&&t){if(this.staticMap){var l="".concat(this.STATIC_MAP_BASE("directions"),"&origin=").concat(e.latitude,",").concat(e.longitude,"&destination=").concat(t.latitude,",").concat(t.longitude,"&zoom=").concat(s);this.setIframeUrl(l)}(!this.staticMap||a)&&(!this.staticMap&&this.map&&this.directionsRenderer.setMap(this.map),this.directionsService.route({origin:new google.maps.LatLng(e.latitude,e.longitude),destination:new google.maps.LatLng(t.latitude,t.longitude),travelMode:r,unitSystem:i},function(i,r){"OK"===r&&(n.staticMap||(n.directionsRenderer.setDirections(i),n.directionsRenderer.setOptions({suppressMarkers:!0}),n.centerDirection(e.lat,t.lat,!1)),o&&o(i))}))}}},{key:"setPathOnStaticMap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:12,o="".concat(this.STATIC_MAP_BASE("directions"),"&origin=").concat(e.lat,",").concat(e.lng,"&destination=").concat(t.lat,",").concat(t.lng,"&zoom=").concat(n);this.setIframeUrl(o)}},{key:"createPolyline",value:function(e,t,n){try{if(this.staticMap)return void(t&&n&&this.setPathOnStaticMap(t,n));if(!this.map)return;this.clearPolyline(),this.polyline=new google.maps.Polyline(Object.assign({path:google.maps.geometry.encoding.decodePath(e),geodesic:!0},this.polylineOptions)),this.polyline.setMap(this.map),this.zoomToObject(this.polyline)}catch(o){}}},{key:"createPolygon",value:function(e,t){try{this.polygon&&"function"==typeof this.polygon.setMap&&this.polygon.setMap(null),this.polygon=new google.maps.Polygon({paths:e,strokeWeight:1,strokeColor:t.strokeColor,fillColor:"#000000",fillOpacity:t.opacity}),this.polygon.setMap(this.map)}catch(n){}}},{key:"zoomToObject",value:function(e){for(var t=new google.maps.LatLngBounds,n=e.getPath().getArray(),o=0;o<n.length;o++)t.extend(n[o]);this.map.fitBounds(t)}},{key:"highlightZones",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{opacity:.1,strokeColor:"#000"};if(e&&e.length){var n=[[{lat:-85.1054596961173,lng:-180},{lat:85.1054596961173,lng:180},{lat:85.1054596961173,lng:-180},{lat:-85.1054596961173,lng:180},{lat:-85.1054596961173,lng:0}]].concat(s(e));this.createPolygon(n,t)}}},{key:"isClockwise",value:function(e){if(!e||e.length<3)return null;for(var t=e.length-1,n=e[t].lat*e[0].lng-e[0].lat*e[t].lng,o=0;o<t;++o){var i=o+1;n+=e[o].lat*e[i].lng-e[i].lat*e[o].lng}return n>0}},{key:"clearMarkers",value:function(){for(var e=0,t=Object.keys(this.markers);e<t.length;e++){var n=t[e];this.removeMarker(n)}}},{key:"clearDirections",value:function(){var e;try{null===(e=this.directionsRenderer)||void 0===e||e.setMap(null)}catch(t){}}},{key:"clearPolygon",value:function(){var e;try{null===(e=this.polygon)||void 0===e||e.setMap(null)}catch(t){}}},{key:"clearPolyline",value:function(){var e;try{null===(e=this.polyline)||void 0===e||e.setMap(null)}catch(t){}}},{key:"clearMap",value:function(){!this.staticMap&&this.map&&this.mapInitialized&&(this.clearMarkers(),this.clearDirections(),this.clearPolygon(),this.clearPolyline())}}])}(),o.\u0275fac=function(e){return new(e||o)(u.Y36(u.SBq),u.Y36(l._))},o.\u0275cmp=u.Xpm({type:o,selectors:[["google-component"]],viewQuery:function(e,t){var n;1&e&&(u.Gf(c,5),u.Gf(p,5)),2&e&&(u.iGM(n=u.CRH())&&(t.mapElement=n.first),u.iGM(n=u.CRH())&&(t.staticMapEl=n.first))},hostVars:2,hostBindings:function(e,t){2&e&&u.ekj("is-static",t.staticMap)},decls:7,vars:0,consts:[["id","map"],["map",""],[1,"map-wrapper-con"],[1,"map-wrapper"],[2,"height","100%","width","100%"],["staticMapEl",""]],template:function(e,t){1&e&&(u.TgZ(0,"div"),u._UZ(1,"div",0,1),u.qZA(),u.TgZ(3,"div",2),u.TgZ(4,"div",3),u._UZ(5,"div",4,5),u.qZA(),u.qZA())},styles:[""]}),o),m=function(){var e=function(){return d(function e(t,n,o){h(this,e),this.componentFactoryResolver=t,this.injector=n,this.router=o,this.createComponentRef()},[{key:"componentRef",get:function(){return this._componentRef},set:function(e){this._componentRef=e}},{key:"createComponentRef",value:function(){var e,t,n,o=this,a=null===(e=this.componentFactoryResolver)||void 0===e?void 0:e.resolveComponentFactory(v);this.componentRef=null==a?void 0:a.create(this.injector),(null===(t=this.componentRef)||void 0===t?void 0:t.hostView)&&(null===(n=this.componentRef)||void 0===n||n.hostView.onDestroy(function(){o.createComponentRef()})),this.googleMapComponent=this.componentRef.instance,this.router.events.pipe((0,r.h)(function(e){var t,n;return e instanceof i.OD&&(null===(t=e.url)||void 0===t?void 0:t.split("?")[0])!==(null===(n=o.router.url)||void 0===n?void 0:n.split("?")[0])})).subscribe(function(){o.currentViewContainerRef&&o.detach(o.currentViewContainerRef)})}},{key:"attach",value:function(e){var t;e.indexOf(this.componentRef.hostView)>-1||(this.currentViewContainerRef=e,e.insert(null===(t=this.componentRef)||void 0===t?void 0:t.hostView))}},{key:"detach",value:function(e){var t,n=e.indexOf(null===(t=this.componentRef)||void 0===t?void 0:t.hostView);n>-1&&(this.googleMapComponent.clearMap(),null==e||e.detach(n))}}])}();return e.\u0275fac=function(t){return new(t||e)(u.LFG(u._Vd),u.LFG(u.zs3),u.LFG(i.F0))},e.\u0275prov=u.Yz7({token:e,factory:e.\u0275fac}),e}()},18459:function(e,t,n){"use strict";n.d(t,{jo:function(){return c},Xp:function(){return d},uC:function(){return p},_v:function(){return h},zZ:function(){return v},HO:function(){return g},VS:function(){return y},vM:function(){return b},Xh:function(){return k}});var o=n(42221),i=n(75249),r=n(5332),a=n(19073),s=n(53399),l=n(82426),u=n(53792);function c(e){return new o.y(function(t){var n=new IntersectionObserver(function(e){t.next(e)});return n.observe(e),function(){return n.disconnect()}}).pipe((0,a.z)(function(e){return e}),(0,s.U)(function(e){return e.isIntersecting}),(0,l.K)(function(){return(0,i.of)(!0)}),(0,u.x)())}function d(e,t){return new o.y(function(t){var n=new ResizeObserver(function(e){t.next(e)});return n.observe(e),function(){return n.disconnect()}}).pipe((0,a.z)(function(e){return e}),(0,s.U)(function(e){return t&&e.contentRect?e.contentRect[t]:e.contentRect}),(0,l.K)(function(){return r.E}),(0,u.x)())}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{childList:!0,subtree:!0};return new o.y(function(n){var o=new MutationObserver(function(e){n.next(e)});return o.observe(e,t),function(){return o.disconnect()}}).pipe((0,a.z)(function(e){return e}),(0,l.K)(function(){return r.E}),(0,u.x)())}function h(e){return new Promise(function(t){return setTimeout(t,e)})}function v(e){var t;if(/Loading chunk [^\s]+ failed/.test(e.message)){var n=null===(t=window.caches)||void 0===t?void 0:t.keys();return n?n.then(function(e){return Promise.all(e.map(caches.delete))}).catch(function(){}).finally(function(){return window.location.reload()}):window.location.reload(),!0}return!1}var m=Object.prototype.toString,f=Symbol.prototype.valueOf;function g(e,t){return e.filter(function(e,n,o){return n===o.findIndex(function(n){return function(e,t,n){return n.every(function(n){return e[n]===t[n]})}(n,e,t)})})}function y(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=0;o<e.length;o++)n[e[o][t]]=e[o];return n}function b(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=0;o<e.length;o++){var i=e[o];n[i[t]]||(n[i[t]]=[]),n[i[t]].push(i)}return n}function k(e,t){switch(w(e)){case"object":return function(e,t){if("function"==typeof t)return t(e);if(t||function(e){var t,n;return!1!==S(e)&&(void 0===(t=e.constructor)||!(!1===S(n=t.prototype)||!1===n.hasOwnProperty("isPrototypeOf")))}(e)){var n=new e.constructor;for(var o in e)n[o]=k(e[o],t);return n}return e}(e,t);case"array":return function(e,t){for(var n=new e.constructor(e.length),o=0;o<e.length;o++)n[o]=k(e[o],t);return n}(e,t);default:return function(e){switch(w(e)){case"array":return e.slice();case"object":return Object.assign({},e);case"date":return new e.constructor(Number(e));case"map":return new Map(e);case"set":return new Set(e);case"buffer":return function(e){var t=e.length,n=Buffer.allocUnsafe?Buffer.allocUnsafe(t):Buffer.from(t);return e.copy(n),n}(e);case"symbol":return function(e){return f?Object(f.call(e)):{}}(e);case"arraybuffer":return function(e){var t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}(e);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(e){return new e.constructor(e.buffer,e.byteOffset,e.length)}(e);case"regexp":return function(e){var t=void 0!==e.flags?e.flags:/\w+$/.exec(e)||void 0,n=new e.constructor(e.source,t);return n.lastIndex=e.lastIndex,n}(e);case"error":return Object.create(e);default:return e}}(e)}}function w(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;if("boolean"===t)return"boolean";if("string"===t)return"string";if("number"===t)return"number";if("symbol"===t)return"symbol";if("function"===t)return function(e){return"GeneratorFunction"===A(e)}(e)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(A(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(t=m.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function A(e){return"function"==typeof e.constructor?e.constructor.name:null}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}},41839:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var o,i=n(94354),r=n(18459),a=n(2316),s=((o=function(){return d(function e(){h(this,e),this.storage={},this.hasPermission=!0,this.localStorage$=new i.x,this.hasPermission=this.checkForPermission()&&!this.isIframe()},[{key:"checkForPermission",value:function(){try{return"undefined"!=typeof localStorage&&(localStorage.setItem("feature_test","yes"),"yes"===localStorage.getItem("feature_test"))&&(localStorage.removeItem("feature_test"),!0)}catch(e){return!1}}},{key:"isIframe",value:function(){try{return window.self!==window.top}catch(e){return!0}}},{key:"store",value:function(e,t){this.hasPermission?localStorage.setItem("fielddData"+e,JSON.stringify(t)):this.storage[e]=(0,r.Xh)(t),this.localStorage$.next(e)}},{key:"retrieve",value:function(e){return this.hasPermission?JSON.parse(localStorage.getItem("fielddData"+e)):(0,r.Xh)(this.storage[e])}},{key:"clear",value:function(){this.hasPermission?localStorage.clear():this.storage={},this.localStorage$.next(null)}}])}()).\u0275fac=function(e){return new(e||o)},o.\u0275prov=a.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o)},40108:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var o,i=n(92340),a=n(25344),s=n(18459),l=n(2316),u=n(58916),c=(o=function(){return d(function e(t,n,o){h(this,e),this.platform=t,this.modalController=n,this.loadingService=o,this.openedModals=new Set},[{key:"isBrowser",get:function(){return!this.platform.is("cordova")||this.platform.is("cordova")&&!(null==i.N?void 0:i.N.companyID)}},{key:"importComponent",value:function(e){switch(e){case"AddPaymentMethodComponent":return Promise.all([n.e(5438),n.e(4080),n.e(8628)]).then(n.bind(n,28628)).then(function(e){return e.AddPaymentMethodComponent});case"PaymentMenuOptionsComponent":return n.e(1450).then(n.bind(n,71450)).then(function(e){return e.PaymentMenuOptionsComponent});case"StaffProfileComponent":return n.e(3851).then(n.bind(n,43851)).then(function(e){return e.StaffProfileComponent});case"PhotosModalComponent":return n.e(5324).then(n.bind(n,45324)).then(function(e){return e.PhotosModalComponent});case"TermsConditionComponent":return n.e(9845).then(n.bind(n,39845)).then(function(e){return e.TermsConditionComponent});case"IframeUrlComponent":return n.e(1087).then(n.bind(n,91087)).then(function(e){return e.IframeUrlComponent});case"UserProfileComponent":return Promise.all([n.e(7062),n.e(5993),n.e(6112)]).then(n.bind(n,65993)).then(function(e){return e.UserProfileComponent});case"AssetDetailsComponent":return Promise.all([n.e(7062),n.e(9307),n.e(2014),n.e(721)]).then(n.bind(n,32014)).then(function(e){return e.AssetDetailsComponent});case"ServiceListComponent":return n.e(586).then(n.bind(n,95872)).then(function(e){return e.ServiceListComponent});case"ServiceDetailsModalComponent":return Promise.all([n.e(9854),n.e(4735)]).then(n.bind(n,14735)).then(function(e){return e.ServiceDetailsModalComponent});case"ProductDetailsModalComponent":return n.e(9854).then(n.bind(n,99854)).then(function(e){return e.ProductDetailsModalComponent});case"LoginComponent":return n.e(9955).then(n.bind(n,89955)).then(function(e){return e.LoginComponent});case"RescheduleComponent":return Promise.all([n.e(1425),n.e(120)]).then(n.bind(n,73888)).then(function(e){return e.RescheduleComponent});case"ReceiptComponent":return Promise.all([n.e(5996),n.e(5160)]).then(n.bind(n,75160)).then(function(e){return e.ReceiptComponent});case"BookingRatingComponent":return Promise.all([n.e(5438),n.e(4080),n.e(1634),n.e(8592),n.e(3293)]).then(n.bind(n,73293)).then(function(e){return e.BookingRatingComponent});case"ShareBookingRatingComponent":return n.e(8391).then(n.bind(n,78391)).then(function(e){return e.ShareBookingRatingComponent});case"BookingMessageComponent":return Promise.all([n.e(7062),n.e(1611)]).then(n.bind(n,21611)).then(function(e){return e.BookingMessageComponent});case"BookingSuccessModalComponent":return n.e(3362).then(n.bind(n,53362)).then(function(e){return e.BookingSuccessModalComponent});case"RepeatJobComponent":return n.e(4673).then(n.bind(n,94673)).then(function(e){return e.RepeatJobComponent});case"RepeatJobEndDateComponent":return n.e(3873).then(n.bind(n,53873)).then(function(e){return e.RepeatJobEndDateComponent});case"AppDemoComponent":return n.e(7147).then(n.bind(n,37147)).then(function(e){return e.AppDemoComponent});case"AppPermissionComponent":return n.e(9752).then(n.bind(n,59752)).then(function(e){return e.AppPermissionComponent});case"PayJobComponent":return Promise.all([n.e(5438),n.e(4080),n.e(5996),n.e(1634),n.e(4608)]).then(n.bind(n,24113)).then(function(e){return e.PayJobComponent});default:return Promise.resolve(e)}}},{key:"openComponentModal",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3?arguments[3]:void 0,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.openedModals.has(String(e)))throw new Error;this.openedModals.add(String(e));var s=function(){return Promise.all([n.importComponent(e).catch(n.handleImportError.bind(n)),n.modalController.getTop()])};return(this.isBrowser?this.loadingService.httpWrapperLoader(s()):s()).then(function(s){var l=r(s,2),u=l[0],c=l[1];return n.modalController.create({component:u,componentProps:t,cssClass:(n.isBrowser?"in-browser ":"")+o,mode:"ios",swipeToClose:a,keyboardClose:!1,backdropDismiss:!1,presentingElement:c||document.querySelector("ion-router-outlet")}).then(function(t){return t.onDidDismiss().then(function(t){n.openedModals.delete(String(e)),"function"==typeof i&&i(t)}),t.present().then(function(){return t})})}).catch(function(t){throw n.openedModals.delete(String(e)),t})}},{key:"handleImportError",value:function(e){if(!(0,s.zZ)(e))throw e}},{key:"closeModal",value:function(e){return this.modalController.getTop().then(function(t){return null==t?void 0:t.dismiss(e)})}},{key:"closeAllModal",value:function(){var e=this;return this.modalController.getTop().then(function(t){return!t||t.dismiss().then(function(){return e.closeAllModal()})})}}])}(),o.\u0275fac=function(e){return new(e||o)(l.LFG(u.t4),l.LFG(u.IN),l.LFG(a.A))},o.\u0275prov=l.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o)},92340:function(e,t,n){"use strict";n.d(t,{N:function(){return o}});var o={production:!0,baseUrl:"https://api.fieldd.co",socket_url:"https://api.fieldd.co:9100",apiKey:"c112f68c22a4b6ff1240e072f64677d155b3d05488bcf5c5194b88aef04ea765",companyID:"",packageName:"",fbAppID:"247263719862729",googleAppID:"272021518514-lb6oo87d1revlabkgvnnnujroa0qal0m.apps.googleusercontent.com",customerId:"58d4b510d5572f3275c91723",finixEnv:"live",firebaseConfig:{apiKey:"AIzaSyBcvAPYHf_4w2DnIgc_gceEIHUqsrq6i4E",authDomain:"refresh-158805.firebaseapp.com",databaseURL:"https://refresh-158805.firebaseio.com",projectId:"refresh-158805",storageBucket:"refresh-158805.appspot.com",messagingSenderId:"151087308856",appId:"1:151087308856:web:67f350b99dabeed0ad06cd"},bookingStatus:{0:"Requested",.2:"Quote Req",.5:"Quoted",1:"Accepted",2:"En-Route",3:"Arrived",3.5:"Before Photos",3.6:"Before Check",3.7:"Before Forms",3.8:"CARFAX",4:"In Progress",4.5:"After Photos",4.6:"After Check",4.7:"After Forms",4.8:"Signature",5:"Done",6:"Cancelled",8:"Pay by cash",12:"Invoiced",12.5:"Pending Inv Bank",13:"Pd-Inv-Card",14:"Pd-Inv-Bank",15:"Inv-Void",16:"Pay By CardRecord",17:"Quote Completed",17.2:"Quote Denied",17.5:"Quote Approved",18:"Quote Won",19:"No Charge"},demoAppId:"fieldd_demo_app",facebookTrackingScript:"!function(f,b,e,v,n,t,s)\n    {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n    n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n    if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n    n.queue=[];t=b.createElement(e);t.async=!0;\n    t.src=v;s=b.getElementsByTagName(e)[0];\n    s.parentNode.insertBefore(t,s)}(window,document,'script',\n    'https://connect.facebook.net/en_US/fbevents.js');"}},5359:function(t,n,i){"use strict";var r=i(71570),s=i(2316),l=i(32316),u=i(58916),c=i(96636),p=i(54364),v=i(71408),m=i(28733);function f(e,t){if(1&e&&(s._UZ(0,"app-image-shell",6),s.ALo(1,"imageResize")),2&e){var n=s.oxw();s.Q6J("src",s.xi3(1,1,null==n.appSettings?null:n.appSettings.clientAppImage,"300x300"))}}function g(e,t){1&e&&(s.TgZ(0,"a",7),s._UZ(1,"app-image-shell",8),s.qZA())}function y(e,t){1&e&&(s.TgZ(0,"div",9),s.TgZ(1,"h1",10),s._uU(2,"Account Suspended"),s.qZA(),s.TgZ(3,"p",11),s._uU(4,"If you're the account holder, login to your fieldd account to resolve."),s.qZA(),s.qZA())}function b(e,t){1&e&&(s.TgZ(0,"h1",14),s._uU(1,"404 Not Found."),s.qZA())}function k(e,t){if(1&e){var n=s.EpF();s.TgZ(0,"p",15),s._uU(1,"Please check the URL and "),s.TgZ(2,"a",16),s.NdJ("click",function(){return s.CHM(n),s.oxw(2).refreshPage()}),s._uU(3,"try again"),s.qZA(),s._uU(4,"."),s.qZA()}}function w(e,t){if(1&e){var n=s.EpF();s.TgZ(0,"p",15),s._uU(1,"Please check your internet connection and "),s.TgZ(2,"a",16),s.NdJ("click",function(){return s.CHM(n),s.oxw(2).refreshPage()}),s._uU(3,"try again"),s.qZA(),s._uU(4,"."),s.qZA()}}function A(e,t){if(1&e&&(s.TgZ(0,"div"),s.YNc(1,b,2,0,"h1",12),s.YNc(2,k,5,0,"p",13),s.YNc(3,w,5,0,"p",13),s.qZA()),2&e){var n=s.oxw();s.xp6(1),s.Q6J("ngIf",n.isBrowser),s.xp6(1),s.Q6J("ngIf",n.isBrowser),s.xp6(1),s.Q6J("ngIf",!n.isBrowser)}}function S(e,t){1&e&&(s.TgZ(0,"div"),s.TgZ(1,"h1",14),s._uU(2,"Account Restricted"),s.qZA(),s.TgZ(3,"p",15),s._uU(4,"If you're the account holder, login to your fieldd account to resolve."),s.qZA(),s.qZA())}var C=function(){var e=function(){return d(function e(t,n){h(this,e),this.authService=t,this.route=n,this.isBrowser=!1,this.extras={isPaymentRequired:!1,isDisabled:!1,isNotFound:!1,serverError:!1,noAccess:!1},this.authService.showAppRoot(),this.isBrowser=this.authService.isBrowser(),this.appSettings=this.authService.getAppSettings(),this.company=this.authService.getCurrentUserCompanyInfo()},[{key:"ngOnInit",value:function(){var e,t=this;(null===(e=this.company)||void 0===e?void 0:e.hasOnlinePortalAccess)?this.extras.isDisabled=!0:this.extras.noAccess=!0,this.route.paramMap.subscribe(function(e){window.history.state&&(t.extras=Object.assign(Object.assign({},t.extras),window.history.state))})}},{key:"refreshPage",value:function(){window.location.reload()}}])}();return e.\u0275fac=function(t){return new(t||e)(s.Y36(c._),s.Y36(l.gz))},e.\u0275cmp=s.Xpm({type:e,selectors:[["app-not-found"]],decls:9,vars:5,consts:[[1,"header-v2"],[1,"with-image"],[3,"src",4,"ngIf"],["href","https://fieldd.co/","target","_blank",4,"ngIf"],["class","text-center",4,"ngIf"],[4,"ngIf"],[3,"src"],["href","https://fieldd.co/","target","_blank"],["src","/assets/img/fieldd-logo.svg"],[1,"text-center"],[1,"cancel-title"],[2,"color","#8898aa"],["class","text-center cancel-title",4,"ngIf"],["class","text-center","style","color: #8898aa;",4,"ngIf"],[1,"text-center","cancel-title"],[1,"text-center",2,"color","#8898aa"],[3,"click"]],template:function(e,t){1&e&&(s.TgZ(0,"ion-header",0),s.TgZ(1,"ion-toolbar"),s.TgZ(2,"ion-title",1),s.YNc(3,f,2,4,"app-image-shell",2),s.YNc(4,g,2,0,"a",3),s.qZA(),s.qZA(),s.qZA(),s.TgZ(5,"ion-content"),s.YNc(6,y,5,0,"div",4),s.YNc(7,A,4,3,"div",5),s.YNc(8,S,5,0,"div",5),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngIf",!t.isBrowser&&t.appSettings),s.xp6(1),s.Q6J("ngIf",t.isBrowser||!t.appSettings),s.xp6(2),s.Q6J("ngIf",t.extras.isPaymentRequired||t.extras.isDisabled),s.xp6(1),s.Q6J("ngIf",t.extras.serverError||t.extras.isNotFound),s.xp6(1),s.Q6J("ngIf",t.extras.noAccess))},directives:[u.Gu,u.sr,u.wd,p.O5,u.W2,v.U],pipes:[m.E],styles:["ion-header.header-v2[_ngcontent-%COMP%]   ion-toolbar[_ngcontent-%COMP%]{--min-height: -webkit-calc(41px + var(--spacing));--min-height: calc(41px + var(--spacing))}ion-content[_ngcontent-%COMP%]{--overflow: hidden}ion-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;padding-bottom:-webkit-calc(41px + var(--spacing));padding-bottom:calc(41px + var(--spacing))}h1[_ngcontent-%COMP%]{font-size:2.5rem;color:var(--main-black-color)}h1[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{text-align:center;margin:0}p[_ngcontent-%COMP%]{font-size:.8rem;color:#8898aa}a[_ngcontent-%COMP%]{color:#b22330;cursor:pointer}"]}),e}(),T=i(4200),U=function(){var e=d(function e(t,n){var o=this;h(this,e),this.commonHelper=t,this.authService=n,this.selectedGateway="Pin",this.companyChanged$=this.authService.companyChanged$.subscribe(function(e){e&&(o.company=o.authService.getCurrentUserCompanyInfo(),o.appSettings=o.authService.getAppSettings(),o.selectedGateway=o.authService.getPaymentGateway(o.company),o.domainUrl=o.commonHelper.getCompanyDomainUrl(o.company))})});return e.\u0275fac=function(t){return new(t||e)(s.Y36(T.$),s.Y36(c._))},e.\u0275cmp=s.Xpm({type:e,selectors:[["app-privacy"]],decls:227,vars:21,consts:[[1,"header-v2"],["slot","start"],[1,"with-image"],[3,"src"],["fullscreen","true"],[1,"past-title-v2","text-left"],[1,"login-con"],[1,"login-con__title"],[1,"privacy-con"],["target","_blank",3,"href"],[2,"letter-spacing","0px"],[1,"ion-no-border","footer-v2"],["href","https://fieldd.co/","target","_blank"],["src","./assets/svg/fieldd-logo.svg",2,"max-height","30px"]],template:function(e,t){1&e&&(s.TgZ(0,"ion-header",0),s.TgZ(1,"ion-toolbar"),s.TgZ(2,"ion-buttons",1),s._UZ(3,"ion-button"),s.qZA(),s.TgZ(4,"ion-title",2),s._UZ(5,"app-image-shell",3),s.ALo(6,"imageResize"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"ion-content",4),s.TgZ(8,"ion-header"),s.TgZ(9,"ion-toolbar"),s.TgZ(10,"ion-title",5),s._uU(11),s.qZA(),s.qZA(),s.qZA(),s.TgZ(12,"div",6),s.ynx(13),s.TgZ(14,"div",7),s._uU(15),s.qZA(),s.BQk(),s.ynx(16),s.TgZ(17,"div",8),s.TgZ(18,"h3"),s._uU(19,"1. Information we collect"),s.qZA(),s.TgZ(20,"div"),s.TgZ(21,"p"),s._uU(22,"When you visit our website and mobile apps, our servers may automatically log the standard data provided by your web browser. It may include your computer's Internet Protocol (IP) address, your browser type and version, the pages you visit, the time and date of your visit, the time spent on each page, and other details."),s.qZA(),s.TgZ(23,"p"),s._uU(24,"We may also collect data about the device you're using to access our website. This data may include the device type, operating system, unique device identifiers, device settings, and geo-location data. What we collect can depend on the individual settings of your device and software. We recommend checking the policies of your device manufacturer or software provider to learn what information they make available to us."),s.qZA(),s.TgZ(25,"p"),s._uU(26,"Our apps & websites collect data that is processed ephemerally (it is stored in the memory for no longer than necessary to service requests in real-time for the sole purpose of app functionality)."),s.qZA(),s.qZA(),s.TgZ(27,"h3"),s._uU(28,"2. Personal information"),s.qZA(),s.TgZ(29,"div"),s.TgZ(30,"p"),s._uU(31,"Users can choose if they want the following data collected or not:"),s.qZA(),s.TgZ(32,"p"),s._uU(33,"a. User payment info"),s._UZ(34,"br"),s._uU(35,"b. Approximate location"),s._UZ(36,"br"),s._uU(37,"c. Precise location"),s._UZ(38,"br"),s._uU(39,"d. Photos & videos"),s._UZ(40,"br"),s._uU(41,"e. Files & docs"),s._UZ(42,"br"),s._uU(43,"f. Biometric face and fingerprints for faster login"),s.qZA(),s.TgZ(44,"p"),s._uU(45,"To use certain functions of the app and websites the following data is required:"),s.qZA(),s.TgZ(46,"p"),s._uU(47,"a. Name"),s._UZ(48,"br"),s._uU(49,"b. Email"),s._UZ(50,"br"),s._uU(51,"c. Street address"),s._UZ(52,"br"),s._uU(53,"d. Phone number"),s.qZA(),s.qZA(),s.TgZ(54,"h4"),s._uU(55,"Biometric Data Usage"),s.qZA(),s.TgZ(56,"div"),s.TgZ(57,"p"),s._uU(58),s.qZA(),s.qZA(),s.TgZ(59,"h4"),s._uU(60,"Data Deletion"),s.qZA(),s.TgZ(61,"div"),s.TgZ(62,"p"),s._uU(63),s.qZA(),s.TgZ(64,"p"),s._uU(65,"To delete data, please follow the below steps:"),s.qZA(),s.TgZ(66,"p"),s._uU(67," a. Open the online booking page at "),s.TgZ(68,"a",9),s._uU(69),s.qZA(),s._UZ(70,"br"),s._uU(71," b. Login, and click on your name/profile picture in the side menu"),s._UZ(72,"br"),s._uU(73," c. Scroll to bottom of your profile page"),s._UZ(74,"br"),s._uU(75," d. Click delete"),s._UZ(76,"br"),s.qZA(),s.TgZ(77,"p"),s._uU(78),s.qZA(),s.qZA(),s.TgZ(79,"h3"),s._uU(80,"3. Legal bases for processing"),s.qZA(),s.TgZ(81,"div"),s.TgZ(82,"p"),s._uU(83,"We will process your personal information lawfully, fairly and in a transparent manner. We collect and process information about you only where we have legal bases for doing so."),s.qZA(),s.TgZ(84,"p"),s._uU(85,"These legal bases depend on the services you use and how you use them, meaning we collect and use your information only where:"),s.qZA(),s.TgZ(86,"p"),s._uU(87,"a. it's necessary for the performance of a contract to which you are a party or to take steps at your request before entering into such a contract (for example, when we provide a service you request from us);"),s._UZ(88,"br"),s._uU(89,"b. it satisfies a legitimate interest (which is not overridden by your data protection interests), such as for research and development, to market and promote our services, and to protect our legal rights and interests;"),s._UZ(90,"br"),s._uU(91,"c. you give us consent to do so for a specific purpose (for example, you might consent to us sending you our newsletter); or"),s._UZ(92,"br"),s._uU(93,"we need to process your data to comply with a legal obligation."),s.qZA(),s.TgZ(94,"p"),s.TgZ(95,"span",10),s._uU(96,"Where you consent to our use of information about you for a specific purpose, you have the right to change your mind at any time (but this will not affect any processing that has already taken place)."),s.qZA(),s.qZA(),s.TgZ(97,"p"),s._uU(98,"We don't keep personal information for longer than is necessary. While we retain this information, we will protect it within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification. That said, we advise that no method of electronic transmission or storage is 100% secure and cannot guarantee absolute data security. If necessary, we may retain your personal information for our compliance with a legal obligation or in order to protect your vital interests or the vital interests of another natural person."),s.qZA(),s.qZA(),s.TgZ(99,"h3"),s._uU(100,"4. Collection and use of information"),s.qZA(),s.TgZ(101,"div"),s.TgZ(102,"p"),s._uU(103,"We may collect, hold, use and disclose information for the following purposes and personal information will not be further processed in a manner that is incompatible with these purposes:"),s.qZA(),s.TgZ(104,"p"),s._uU(105,"a. to enable you to customize or personalize your experience of our website or mobile apps;"),s._UZ(106,"br"),s._uU(107,"b. to enable you to access and use our website, associated apps and associated social media platforms;"),s._UZ(108,"br"),s._uU(109,"c. to contact and communicate with you;"),s._UZ(110,"br"),s._uU(111,"d. for internal record keeping and administrative purposes;"),s._UZ(112,"br"),s._uU(113,"e. for analytics, market research and business development, including to operate and improve our website, associated apps and associated social media platforms;"),s._UZ(114,"br"),s._uU(115,"f. to run competitions and/or offer additional benefits to you;"),s._UZ(116,"br"),s._uU(117,"g. for advertising and marketing, including to send you promotional information about our products and services and information about third parties that we consider may be of interest to you;"),s._UZ(118,"br"),s._uU(119,"h. to comply with our legal obligations and resolve any disputes that we may have."),s.qZA(),s.qZA(),s.TgZ(120,"h3"),s._uU(121,"5. SMS Messages"),s.qZA(),s.TgZ(122,"div"),s.TgZ(123,"p"),s.TgZ(124,"span",10),s._uU(125),s.qZA(),s.qZA(),s.TgZ(126,"p"),s._uU(127),s.TgZ(128,"span",10),s._UZ(129,"br"),s.qZA(),s.qZA(),s.TgZ(130,"p"),s._uU(131,"a. Transactional SMS Messages"),s.qZA(),s.TgZ(132,"p"),s.TgZ(133,"span",10),s._uU(134,"Transactional, service-related"),s.qZA(),s.TgZ(135,"span",10),s._uU(136,"\xa0"),s.qZA(),s.TgZ(137,"span",10),s._uU(138),s.qZA(),s.qZA(),s.TgZ(139,"p"),s.TgZ(140,"span",10),s._uU(141,"b. Marketing SMS Messages"),s.qZA(),s.qZA(),s.TgZ(142,"p"),s.TgZ(143,"span",10),s._uU(144,"Marketing SMS messages are sent containing info on services that may or may not be of interest to you. If you do not want to receive such email messages, you will be given the option to opt out at any time."),s.qZA(),s.qZA(),s.qZA(),s.TgZ(145,"h3"),s._uU(146,"6. Disclosure of personal information to third parties"),s.qZA(),s.TgZ(147,"div"),s.TgZ(148,"p"),s._uU(149,"a. We may disclose personal information to:"),s.qZA(),s.TgZ(150,"p"),s._uU(151,"i. third party service providers for the purpose of enabling them to provide their services, including (without limitation) IT service providers, data storage, hosting and server providers, ad networks, analytics, error loggers, debt collectors, maintenance or problem-solving providers, marketing or advertising providers, professional advisors and payment systems operators;"),s._UZ(152,"br"),s._uU(153," ii. our employees, contractors and/or related entities;"),s._UZ(154,"br"),s._uU(155," iii. sponsors or promoters of any competition we run;"),s._UZ(156,"br"),s._uU(157," iv. credit reporting agencies, courts, tribunals and regulatory authorities, in the event you fail to pay for goods or services we have provided to you;"),s._UZ(158,"br"),s._uU(159," v. courts, tribunals, regulatory authorities and law enforcement officers, as required by law, in connection with any actual or prospective legal proceedings, or in order to establish, exercise or defend our legal rights;"),s._UZ(160,"br"),s._uU(161," vi. third parties, including agents or sub-contractors, who assist us in providing information, products, services or direct marketing to you; and"),s._UZ(162,"br"),s._uU(163,"third parties to collect and process data. "),s.qZA(),s.TgZ(164,"p"),s._uU(165),s.qZA(),s.TgZ(166,"p"),s.TgZ(167,"span",10),s._uU(168,"i. The username & Oauth2 credentials that we request will not be collected by us and will be used as described in this privacy policy.\xa0"),s.qZA(),s.TgZ(169,"span",10),s._uU(170,"Your credentials will be collected by Google and their privacy policy for this sign-in can be found here:\xa0"),s.qZA(),s.TgZ(171,"span",10),s._uU(172,"Google Sign-In for Calendar syncing"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(173,"h3"),s._uU(174,"7. International transfers of personal information"),s.qZA(),s.TgZ(175,"div"),s._uU(176),s.qZA(),s.TgZ(177,"h3"),s._uU(178,"8. Your rights and controlling your personal information"),s.qZA(),s.TgZ(179,"div"),s.TgZ(180,"p"),s._uU(181,"a. Choice and consent:\xa0"),s.TgZ(182,"span",10),s._uU(183,"By providing personal information to us, you consent to us collecting, holding, using and disclosing your personal information in accordance with this privacy policy. If you are under 16 years of age, you must have, and warrant to the extent permitted by law to us, that you have your parent or legal guardian's permission to access and use the website and they (your parents or guardian) have consented to you providing us with your personal information. You do not have to provide personal information to us, however, if you do not, it may affect your use of this website or the products and/or services offered on or through it."),s.qZA(),s.qZA(),s.TgZ(184,"p"),s._uU(185,"b. Information from third parties:\xa0"),s.TgZ(186,"span",10),s._uU(187,"If we receive personal information about you from a third party, we will protect it as set out in this privacy policy. If you are a third party providing personal information about somebody else, you represent and warrant that you have such person's consent to provide the personal information to us."),s.qZA(),s.qZA(),s.TgZ(188,"p"),s._uU(189,"c. Restrict: You may choose to restrict the collection or use of your personal information. If you have previously agreed to us using your personal information for direct marketing purposes, you may change your mind at any time by contacting us using the details below. If you ask us to restrict or limit how we process your personal information, we will let you know how the restriction affects your use of our website or products and services."),s.qZA(),s.TgZ(190,"p"),s._uU(191,"d. Access and data portability: You may request details of the personal information that we hold about you. You may request a copy of the personal information we hold about you. Where possible, we will provide this information in CSV format or other easily readable machine format. You may request that we erase the personal information we hold about you at any time. You may also request that we transfer this personal information to another third party."),s.qZA(),s.TgZ(192,"p"),s._uU(193,"e. Correction: If you believe that any information we hold about you is inaccurate, out of date, incomplete, irrelevant or misleading, please contact us using the details below. We will take reasonable steps to correct any information found to be inaccurate, incomplete, misleading or out of date."),s.qZA(),s.TgZ(194,"p"),s._uU(195,"f. Notification of data breaches: We will comply laws applicable to us in respect of any data breach."),s.qZA(),s.TgZ(196,"p"),s._uU(197,"g. Complaints: If you believe that we have breached a relevant data protection law and wish to make a complaint, please contact us using the details below and provide us with full details of the alleged breach. We will promptly investigate your complaint and respond to you, in writing, setting out the outcome of our investigation and the steps we will take to deal with your complaint. You also have the right to contact a regulatory body or data protection authority in relation to your complaint."),s.qZA(),s.TgZ(198,"p"),s._uU(199,"h. Unsubscribe: To unsubscribe from our e-mail database or opt-out of communications (including marketing communications), please contact us using the details below or opt-out using the opt-out facilities provided in the communication."),s.qZA(),s.qZA(),s.TgZ(200,"h3"),s._uU(201,"9. Cookies"),s.qZA(),s.TgZ(202,"div"),s.TgZ(203,"p"),s._uU(204,"We use \u201ccookies\u201d to collect information about you and your activity across our site. A cookie is a small piece of data that our website stores on your computer, and accesses each time you visit, so we can understand how you use our site. This helps us serve you content based on preferences you have specified."),s.qZA(),s.qZA(),s.TgZ(205,"h3"),s._uU(206,"10. Limits of our policy"),s.qZA(),s.TgZ(207,"div"),s.TgZ(208,"p"),s._uU(209,"Our website may link to external sites that are not operated by us. Please be aware that we have no control over the content and policies of those sites, and cannot accept responsibility or liability for their respective privacy practices."),s.qZA(),s.qZA(),s.TgZ(210,"h3"),s._uU(211,"12. Changes to this policy"),s.qZA(),s.TgZ(212,"div"),s.TgZ(213,"p"),s._uU(214,"At our discretion, we may change our privacy policy to reflect current acceptable practices. We will take reasonable steps to let users know about changes via our website. Your continued use of this site after any changes to this policy will be regarded as acceptance of our practices around privacy and personal information. "),s.qZA(),s.TgZ(215,"p"),s._uU(216,"If we make a significant change to this privacy policy, for example changing a lawful basis on which we process your personal information, we will ask you to re-consent to the amended privacy policy."),s.qZA(),s.qZA(),s.TgZ(217,"h3"),s._uU(218),s.qZA(),s.TgZ(219,"div"),s.TgZ(220,"p"),s._uU(221),s.qZA(),s.qZA(),s.qZA(),s.BQk(),s.qZA(),s.qZA(),s.TgZ(222,"ion-footer",11),s.TgZ(223,"ion-toolbar"),s.TgZ(224,"ion-title",2),s.TgZ(225,"a",12),s._UZ(226,"img",13),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(5),s.Q6J("src",s.xi3(6,18,null==t.appSettings?null:t.appSettings.clientAppImage,"300x300")),s.xp6(6),s.hij(" Review ",null==t.company?null:t.company.name,"'s privacy policy here"),s.xp6(4),s.hij(" Your privacy is important to us. It is ",null==t.company?null:t.company.name,"'s policy to respect your privacy regarding any information we collect across our website and mobile apps. "),s.xp6(43),s.AsE(" ",null==t.company?null:t.company.name," utilizes biometric data (face and fingerprints) solely for the purpose of authenticating the current user, ensuring a quicker login/sign-up process. Providing biometric data is entirely optional and choosing not to provide this data will not impact any features of the application. ",null==t.company?null:t.company.name," does not store biometric data; only authentication data is obtained from the underlying application layer. It is essential to understand that biometric data is neither transmitted over the network to our servers nor shared with any third-party service. "),s.xp6(5),s.hij("",null==t.company?null:t.company.name," allows users to delete their data from the system."),s.xp6(5),s.Q6J("href",t.domainUrl,s.LSH),s.xp6(1),s.Oqu(t.domainUrl),s.xp6(9),s.hij(" Your profile including all future jobs will be cancelled and deleted. Personal data including name, email and phone number will be retained by the system only if the user has previously booked a job with ",null==t.company?null:t.company.name,". In all other cases, all the data regarding the user will be deleted. "),s.xp6(47),s.AsE("Companies subscribed to ",null==t.company?null:t.company.name,", and/or ",null==t.appSettings?null:t.appSettings.appIconName," will use the Personal Information we collect or receive to communicate directly with you via SMS."),s.xp6(2),s.hij("",null==t.company?null:t.company.name," sends two types of SMS messages to its users:"),s.xp6(11),s.hij("SMS messages are sent to update and communicate with you about products and services you have ordered and/or subscribed to.\xa0 These messages include alerts such as \u201cThe company is en-route to your location\u201d,\xa0 upcoming service reminders, and replies to direct messages regarding jobs booked on ",null==t.company?null:t.company.name,". Since these are important updates, initiated by you, these cannot be unsubscribed or opted out from."),s.xp6(27),s.AsE("b. For a better experience and in order to provide our service, we may required you to provide to us either directly, or indirectly, with certain personally identifiable information, including but not limited to your username and Auth credentials. This is for the purpose of syncing your Google Calendar with ",null==t.company?null:t.company.name,", and ",null==t.company?null:t.company.name," into your google calendar. This is achieved via: console.developers.google.com"),s.xp6(11),s.hij(" The personal information we collect is stored and processed in the United States, or where we or our partners, affiliates and third-party providers maintain facilities. By providing us with your personal information, you consent to the disclosure to these overseas third parties. These third parties may include Amazon Web Services for cloud infrastructure and data hosting, Google for GPS mapping and routing, ",t.selectedGateway," for credit card processing, Sendgrid for transactional emails, and Twilio for SMS messaging. We will ensure that any transfer of personal information from countries in the European Economic Area (EEA) to countries outside the EEA will be protected by appropriate safeguards, for example by using standard data protection clauses approved by the European Commission, or the use of binding corporate rules or other legally accepted means. Where we transfer personal information from a non-EEA country to another country, you acknowledge that third parties in other jurisdictions may not be subject to similar data protection laws to the ones in our jurisdiction. There are risks if any such third party engages in any act or practice that would contravene the data privacy laws in our jurisdiction and this might mean that you will not be able to seek redress under our jurisdiction's privacy laws. "),s.xp6(42),s.hij("13. ",null==t.company?null:t.company.name," Data Controller & Protection Officer"),s.xp6(3),s.hij("Admin - ",null==t.company?null:t.company.customerServiceEmail,""))},directives:[u.Gu,u.sr,u.Sm,u.YG,u.wd,v.U,u.W2,u.fr],pipes:[m.E],styles:["[_nghost-%COMP%]{--max-booking-con-width: min(800px, 100vw);--min-con-padding: max(-webkit-calc((100% - (var(--max-booking-con-width) - var(--spacing))) / 2), var(--spacing));--min-con-padding: max(calc((100% - (var(--max-booking-con-width) - var(--spacing))) / 2), var(--spacing));text-align:justify;-webkit-user-select:text;-moz-user-select:text;user-select:text}.footer-v2[_ngcontent-%COMP%]{background-color:#fff}"]}),e}(),I=function(){var e=function(){return d(function e(t,n){h(this,e),this.authService=t,this.router=n},[{key:"ngOnInit",value:function(){var e=this.getMobileOperatingSystem();e?this.redirectToAppStore(e):this.router.navigate(["/"])}},{key:"redirectToAppStore",value:function(e){var t,n,o=this,i=!0;(null===(n=null===(t=this.router)||void 0===t?void 0:t.url)||void 0===n?void 0:n.includes("service"))&&(i=!1),this.authService.getRedirectionURL({os:e,forClient:i}).subscribe(function(e){e&&e.url?window.location.href=e.url:o.router.navigate(["/"])})}},{key:"getMobileOperatingSystem",value:function(){var e=navigator.userAgent||navigator.vendor;return/windows phone/i.test(e)?"windows":/android/i.test(e)?"android":/iPad|iPhone|iPod|Macintosh/.test(e)?"ios":"other"}}])}();return e.\u0275fac=function(t){return new(t||e)(s.Y36(c._),s.Y36(l.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["app-redirect"]],decls:2,vars:0,template:function(e,t){1&e&&(s.TgZ(0,"div"),s._uU(1,"Redirecting.."),s.qZA())},encapsulation:2}),e}(),P=i(96146),x=i(22655),D=[{path:"",canActivate:[x.s],loadChildren:function(){return Promise.all([i.e(7062),i.e(5438),i.e(1425),i.e(6818),i.e(3012),i.e(5844)]).then(i.bind(i,3012)).then(function(e){return e.BookingModule})}},{path:"booking/create/:id",redirectTo:"quote/:id",pathMatch:"full"},{path:"user",canActivate:[x.s,P.a],loadChildren:function(){return Promise.all([i.e(7062),i.e(6818),i.e(9307),i.e(2014),i.e(5993),i.e(3061)]).then(i.bind(i,29321)).then(function(e){return e.UserModule})}},{path:"bookinghistory",loadChildren:function(){return Promise.all([i.e(7062),i.e(5438),i.e(4080),i.e(1425),i.e(6818),i.e(5996),i.e(9307),i.e(1634),i.e(3012),i.e(8592),i.e(7337)]).then(i.bind(i,37337)).then(function(e){return e.BookingHistoryModule})}},{path:"bookingHistory",redirectTo:"bookinghistory"},{path:"",canActivate:[x.s],loadChildren:function(){return Promise.all([i.e(9955),i.e(3992)]).then(i.bind(i,23992)).then(function(e){return e.AuthModule})}},{path:"404",component:C},{path:"app",component:I},{path:"serviceapp",component:I},{path:"privacy",component:U},{path:"**",redirectTo:""}],_=function(){var e=d(function e(){h(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[l.Bz.forRoot(D,{relativeLinkResolution:"legacy"})],l.Bz]}),e}(),M=i(42321),L=i(15433),O=i(4084),Z=i(73588),E=i(64967),N=i(92340),R=i(41839),q=i(39754),j=i(25344),F=i(40108),B=i(18459),G=i(81984),z=i(18752),Y=i(57215),V=i(52134),H=function(e){return[e]},Q=function(){return{redirectTo:"/user/assets"}};function J(e,t){if(1&e&&(s.TgZ(0,"ion-item",28),s.TgZ(1,"div"),s._UZ(2,"span",29),s.TgZ(3,"span"),s._uU(4),s.ALo(5,"async"),s.ALo(6,"bookingConstant"),s.qZA(),s.qZA(),s.qZA()),2&e){var n=s.oxw(2);s.Q6J("routerLink",s.VKq(9,H,n.userLoggedIn?"/user/assets":"/login"))("state",s.DdM(11,Q)),s.xp6(2),s.Q6J("lazyLoad",!1)("src","./assets/svg/side-menu-"+((null==n.company||null==n.company.customerAssets?null:n.company.customerAssets.icon)||"home")+".svg"),s.xp6(2),s.Oqu(s.lcZ(5,5,s.lcZ(6,7,"customerAssets.title")))}}function W(e,t){if(1&e&&(s.TgZ(0,"div",30),s._uU(1),s.qZA()),2&e){var n=s.oxw(2);s.xp6(1),s.Oqu((null==n.user||null==n.user.firstName?null:n.user.firstName.charAt(0))||"G")}}function K(e,t){if(1&e&&(s._UZ(0,"app-image-shell",31),s.ALo(1,"imageResize")),2&e){var n=s.oxw(2);s.Q6J("lazyLoad",!1)("src",s.xi3(1,2,n.user.image,"120x120"))}}function $(e,t){1&e&&(s.TgZ(0,"div",32),s._UZ(1,"a",33),s.qZA()),2&e&&(s.xp6(1),s.Q6J("lazyLoad",!1))}var X=function(){return["/"]};function ee(e,t){if(1&e){var n=s.EpF();s.TgZ(0,"ion-menu",7),s.TgZ(1,"ion-content"),s.TgZ(2,"ion-header"),s.TgZ(3,"ion-toolbar"),s.TgZ(4,"ion-menu-toggle",8),s.TgZ(5,"div"),s.TgZ(6,"div",9),s.NdJ("click",function(){return s.CHM(n),s.oxw().visitWebsite()}),s._UZ(7,"app-image-shell",10),s.ALo(8,"imageResize"),s.qZA(),s.TgZ(9,"div"),s.TgZ(10,"button",11),s._uU(11),s.ALo(12,"async"),s.ALo(13,"dynamicText"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(14,"ion-list"),s.TgZ(15,"ion-menu-toggle",12),s.TgZ(16,"ion-item",13),s.TgZ(17,"div"),s._UZ(18,"span",14),s.TgZ(19,"span"),s._uU(20),s.ALo(21,"async"),s.ALo(22,"dynamicText"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(23,"ion-item",13),s.TgZ(24,"div"),s._UZ(25,"span",15),s.TgZ(26,"span"),s._uU(27),s.ALo(28,"async"),s.ALo(29,"dynamicText"),s.qZA(),s.qZA(),s.qZA(),s.YNc(30,J,7,12,"ion-item",16),s.TgZ(31,"ion-item",13),s.TgZ(32,"div"),s._UZ(33,"span",17),s.TgZ(34,"span"),s._uU(35),s.ALo(36,"async"),s.ALo(37,"dynamicText"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(38,"ion-item",18),s.TgZ(39,"div"),s._UZ(40,"span",19),s.TgZ(41,"span"),s._uU(42),s.ALo(43,"async"),s.ALo(44,"dynamicText"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(45,"ion-menu-toggle",12),s.TgZ(46,"ion-item",18),s.TgZ(47,"div"),s._UZ(48,"span",20),s.TgZ(49,"span"),s._uU(50),s.ALo(51,"async"),s.ALo(52,"dynamicText"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(53,"ion-item",18),s.TgZ(54,"div"),s._UZ(55,"span",21),s.TgZ(56,"span"),s._uU(57),s.ALo(58,"async"),s.ALo(59,"dynamicText"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(60,"ion-footer",22),s.TgZ(61,"ion-menu-toggle",12),s.TgZ(62,"div",23),s.TgZ(63,"div",24),s.YNc(64,W,2,1,"div",25),s.YNc(65,K,2,5,"app-image-shell",26),s.qZA(),s.TgZ(66,"div"),s.TgZ(67,"div",24),s._uU(68),s.ALo(69,"async"),s.ALo(70,"dynamicText"),s.qZA(),s.TgZ(71,"div",24),s._uU(72),s.ALo(73,"async"),s.ALo(74,"dynamicText"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(75,$,2,1,"div",27),s.qZA(),s.qZA()}if(2&e){var o=s.oxw();s.Q6J("swipeGesture",!1),s.xp6(7),s.Q6J("lazyLoad",!1)("src",s.xi3(8,35,null==o.appSettings?null:o.appSettings.clientAppImage,"300x300")),s.xp6(3),s.Q6J("routerLink",s.DdM(74,X)),s.xp6(1),s.Oqu(s.lcZ(12,38,s.lcZ(13,40,"newBookingBtn"))),s.xp6(5),s.Q6J("routerLink",s.VKq(75,H,o.userLoggedIn?"/bookinghistory/list":"/login")),s.xp6(2),s.Q6J("lazyLoad",!1),s.xp6(2),s.Oqu(s.lcZ(21,42,s.lcZ(22,44,"bookingsBtn"))),s.xp6(3),s.Q6J("routerLink",s.VKq(77,H,o.userLoggedIn?"/user/profile":"/login")),s.xp6(2),s.Q6J("lazyLoad",!1),s.xp6(2),s.Oqu(s.lcZ(28,46,s.lcZ(29,48,"profileBtn"))),s.xp6(3),s.Q6J("ngIf",null==o.company||null==o.company.customerAssets?null:o.company.customerAssets.isEnabled),s.xp6(1),s.Q6J("routerLink",s.VKq(79,H,o.userLoggedIn?"/user/paymentmethods":"/login")),s.xp6(2),s.Q6J("lazyLoad",!1),s.xp6(2),s.Oqu(s.lcZ(36,50,s.lcZ(37,52,"paymentsBtn"))),s.xp6(3),s.Q6J("routerLink",s.VKq(81,H,o.userLoggedIn?"/user/freecredits":"/login"))("hidden",!(null!=o.company&&o.company.shareCodeEnabled)&&!o.isBrowser||o.isBrowser),s.xp6(2),s.Q6J("lazyLoad",!1),s.xp6(2),s.Oqu(s.lcZ(43,54,s.lcZ(44,56,"referralBtn"))),s.xp6(4),s.Q6J("routerLink",s.VKq(83,H,o.userLoggedIn?"/user/helpline":"/login"))("hidden",o.isBrowser),s.xp6(2),s.Q6J("lazyLoad",!1),s.xp6(2),s.Oqu(s.lcZ(51,58,s.lcZ(52,60,"helpBtn"))),s.xp6(3),s.Q6J("routerLink",s.VKq(85,H,o.userLoggedIn?"/user/notifications":"/login"))("hidden",o.isBrowser),s.xp6(2),s.Q6J("lazyLoad",!1),s.xp6(2),s.Oqu(s.lcZ(58,62,s.lcZ(59,64,"notificationsBtn"))),s.xp6(6),s.Q6J("routerLink",s.VKq(87,H,o.userLoggedIn?"/user/profile":"/login")),s.xp6(1),s.Q6J("ngIf",!(null!=o.user&&o.user.image)),s.xp6(1),s.Q6J("ngIf",!(null==o.user||!o.user.image)),s.xp6(2),s.Q6J("routerLink",s.VKq(89,H,o.userLoggedIn?"/user/profile":"/login")),s.xp6(1),s.Oqu(o.userLoggedIn?o.user.firstName:s.lcZ(69,66,s.lcZ(70,68,"guestTitle"))),s.xp6(3),s.Q6J("routerLink",s.VKq(91,H,o.userLoggedIn?"/user/profile":"/login")),s.xp6(1),s.Oqu(o.userLoggedIn?o.user.lastName||"":s.lcZ(73,70,s.lcZ(74,72,"loginOrSignUp"))),s.xp6(3),s.Q6J("ngIf",!o.isWhiteLabel)}}var te=function(){var e=function(){return d(function e(t,n,o,i,r,a,s,l,u,c,d){h(this,e),this.router=t,this.fcm=n,this.storage=o,this.location=i,this.platform=r,this.splashScreen=a,this.statusBar=s,this.modalService=l,this.loadingService=u,this.authService=c,this.localStorageService=d,this.textDir="ltr",this.isBrowser=!0,this.isWhiteLabel=!0,this.requestedJobDetail={},this.isNavigationLoaderAdd=!1,this.isDemoApp=!1,this.isCompanyInitialized=!1,this.isAppInitialized=!1,this.hasBiometricCalled=!1,this.crmEvents$=this.authService.crmEvents$.subscribe(this.handleCRMEvents.bind(this)),this.userLoggedIn=!1,this.platformReady()},[{key:"platformReady",value:function(){return(0,M.mG)(this,void 0,void 0,a().mark(function e(){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.platform.ready();case 2:return e.next=4,this.setupStatusBar();case 4:this.checkForDemoApp()?(this.authService.setDemoAppSettings(),this.changeDemoCompany(!1)):this.postPlatformReadyOperations();case 5:case"end":return e.stop()}},e,this)}))}},{key:"postPlatformReadyOperations",value:function(){var e=this;this.initializeApp().then(function(){e.isAppInitialized=!0,e.showBiometricLogin()}),this.authService.refreshCompanyDetailsFromServer(!0),this.authService.isBrowser()||(this.isBrowser=!1),this.companyChanged$=this.authService.companyChanged$.subscribe(function(t){var n,o;t&&(e.appSettings=e.authService.getAppSettings(),e.company=e.authService.getCurrentUserCompanyInfo(),(null===(n=e.company)||void 0===n?void 0:n.faviconImage)&&e.authService.setFavIconImg(null===(o=e.company)||void 0===o?void 0:o.faviconImage),e.isWhiteLabel=e.authService.isWhiteLabel,e.isCompanyInitialized=!0,e.showBiometricLogin())}),this.userChanged$=this.authService.userChanged$.subscribe(function(t){e.authService.isUserLoggedIn()?(e.userLoggedIn=!0,e.user=e.authService.getCurrentUserInfo(),e.checkAppPermission(),e.updateRequestedJobDetail()):(e.userLoggedIn=!1,e.requestedJobDetail={},e.resetUserObj())}),this.platform.pause.subscribe(function(){e.cleanUpMemory()})}},{key:"checkAppPermission",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L.r3.NOTIFICATION;return(0,M.mG)(this,void 0,void 0,a().mark(function n(){var o,i;return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(null===(e=this.authService)||void 0===e?void 0:e.isBrowser()){n.next=16;break}if(o=!1,n.prev=2,n.t0=t===L.r3.NOTIFICATION,!n.t0){n.next=8;break}return n.next=7,this.fcm.hasPermission();case 7:o=n.sent;case 8:n.next=12;break;case 10:n.prev=10,n.t1=n.catch(2);case 12:if(!o){n.next=14;break}return n.abrupt("return",this.authService.updatePermission(t,L.g1.GRANTED));case 14:return i=this.authService.getAppPermissions(),n.abrupt("return",i&&(null==i?void 0:i[t])!==L.g1.NOT_ASKED?this.authService.updatePermission(t,L.g1.DENIED):this.authService.requestPermission(t));case 16:case"end":return n.stop()}},n,this,[[2,10]])}))}},{key:"checkForDemoApp",value:function(){return!this.authService.isBrowser()&&N.N.companyID===N.N.demoAppId}},{key:"changeDemoCompany",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.modalService.openComponentModal("AppDemoComponent",{isBackAllowed:t},t?"":"full-modal",function(n){var o;(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.selectedProfile)&&(N.N.companyID=n.data.selectedProfile.id,e.isDemoApp=!0,e.demoAppName=n.data.selectedProfile.name,t||e.authService.resetAllData(),e.postPlatformReadyOperations())},t)}},{key:"handleCRMEvents",value:function(e){var t=e.eventType,n=e.data;if(t===L.I6.changeCompany){var o=n.companyId;o&&(N.N.companyID=o,this.authService.resetAllData(!1),this.postPlatformReadyOperations())}}},{key:"ngOnInit",value:function(){if(this.authService.openRatingModalCb=this.openRatingModal.bind(this),this.authService.isUserLoggedIn()){this.userLoggedIn=!0,this.user=this.authService.getCurrentUserInfo();var e=this.location.path(),t=e.substring(e.lastIndexOf("?")+1);(null==t?void 0:t.includes("rating=true"))||this.authService.checkForPendingRating(),this.updateRequestedJobDetail(),this.authService.setUserInLogRocket()}else this.resetUserObj();this.showLoaderOnRouteChange()}},{key:"showLoaderOnRouteChange",value:function(){var e=this;this.router.events.pipe((0,q.h)(function(e){return e instanceof l.OD||e instanceof l.m2})).subscribe(function(t){t instanceof l.OD&&!e.isNavigationLoaderAdd?(e.loadingService.showLoader(!0),e.isNavigationLoaderAdd=!0):t instanceof l.m2&&e.isNavigationLoaderAdd&&(e.loadingService.hideLoader(),e.isNavigationLoaderAdd=!1)})}},{key:"openRatingModal",value:function(e){this.modalService.openComponentModal("BookingRatingComponent",{booking:e,modalService:this.modalService})}},{key:"openShareRatingModal",value:function(e){this.modalService.openComponentModal("ShareBookingRatingComponent",{booking:e})}},{key:"updateRequestedJobDetail",value:function(){var e=this,t=null;this.authService.getHasRequestedJob(this.user._id).then(function(e){(null==e?void 0:e.success)&&e.hasRequestedJob&&e.jobId&&(t={hasRequestedJob:!0,jobId:e.jobId})}).catch(function(){}).finally(function(){e.requestedJobDetail=t||{},e.authService.setLocalHasRequestedJob(t||!1)})}},{key:"showRequestOrder",value:function(){var e="bookingHistory/detail/".concat(this.requestedJobDetail.jobId);e!==this.router.url&&this.router.navigate([e])}},{key:"resetUserObj",value:function(){this.user={firstName:"",lastName:"",emailID:"",phone:"",id:"",cardDetails:[],image:"",defaultPaymentMethod:""}}},{key:"ngOnDestroy",value:function(){var e,t,n;null===(e=this.userChanged$)||void 0===e||e.unsubscribe(),null===(t=this.companyChanged$)||void 0===t||t.unsubscribe(),null===(n=this.crmEvents$)||void 0===n||n.unsubscribe(),this.platform.pause.unsubscribe(),this.platform.resume.unsubscribe()}},{key:"cleanUpMemory",value:function(){var e=this,t=Date.now()-2592e6;this.storage.forEach(function(n,o){(null==n?void 0:n.lastUsed)&&n.lastUsed<t&&e.storage.remove(o)})}},{key:"showBiometricLogin",value:function(){var e=this;this.hasBiometricCalled||!this.isCompanyInitialized||!this.isAppInitialized||(this.hasBiometricCalled=!0,this.authService.hasRedirectedFromFirebase||setTimeout(function(){e.authService.isUserLoggedIn()||e.authService.biometricAuthenticateService(!1,!0,function(){return e.router.navigate(["/"])})},1e3))}},{key:"setupStatusBar",value:function(){var e,t,n;return(0,M.mG)(this,void 0,void 0,a().mark(function o(){return a().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,B._v)(300);case 2:if(o.t0=!this.authService.isBrowser()&&!this.platform.is("mobileweb"),!o.t0){o.next=8;break}return this.platform.is("android")||"android"===(null===(e=null==window?void 0:window.cordova)||void 0===e?void 0:e.platformId)?(this.statusBar.backgroundColorByHexString("#FFFFFFFF"),this.statusBar.styleDefault()):(this.platform.is("ios")||"ios"===(null===(t=null==window?void 0:window.cordova)||void 0===t?void 0:t.platformId))&&this.statusBar.styleDefault(),o.next=7,(0,B._v)(1500);case 7:null===(n=this.splashScreen)||void 0===n||n.hide();case 8:case"end":return o.stop()}},o,this)}))}},{key:"initializeApp",value:function(){return(0,M.mG)(this,void 0,void 0,a().mark(function e(){var t,n=this;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.authService.isBrowser()&&!this.platform.is("mobileweb")){e.next=2;break}return e.abrupt("return");case 2:return this.checkAppPermission(),this.setBadgeNumber(0),document.addEventListener("resume",function(){return n.setBadgeNumber(0)},!1),t=this.authService.getFirebaseToken(),this.fcm.onTokenRefresh().subscribe(function(e){var t,o,i,r=n.localStorageService.retrieve("deviceDetails");if(!(null===(t=null==r?void 0:r.device)||void 0===t?void 0:t.deviceId)||e!==(null===(o=null==r?void 0:r.device)||void 0===o?void 0:o.deviceId)){var a={device:{deviceId:e,deviceType:n.platform.is("ios")||"ios"===(null===(i=null==window?void 0:window.cordova)||void 0===i?void 0:i.platformId)?"iOS":"Android"}};n.authService.storeFirebaseToken(a),n.authService.registerToken(a),n.authService.updateBiometricLogin()}}),this.fcm.onMessageReceived().subscribe(function(e){var t=n.authService.isUserLoggedIn();if(n.updateBadgeNumber(),(null==e?void 0:e.tap)&&(null==e?void 0:e.click_action))switch(e.click_action){case L.kA.order_status_changed:case L.kA.booking_confirmation:case L.kA.ondemand_confirmation:case L.kA.partner_enroute:case L.kA.new_message:var o="bookingHistory/detail/".concat(e.orderId);o!==n.router.url&&n.router.navigate([o]);break;case L.kA.open_notification:e.notificationId&&n.authService.updateMarketingClick(e.notificationId);var i="/user/notifications";i!==n.router.url&&t&&n.router.navigate([i]);break;case L.kA.help_line_msg:var r="/user/helpline";r!==n.router.url&&t&&n.router.navigate([r])}}),e.next=8,t;case 8:case"end":return e.stop()}},e,this)}))}},{key:"updateBadgeNumber",value:function(){var e=this;return Promise.resolve(this.fcm.getBadgeNumber()).then(function(t){return e.setBadgeNumber(t||0)})}},{key:"setBadgeNumber",value:function(e){return Promise.resolve(this.fcm.setBadgeNumber(e))}},{key:"visitWebsite",value:function(){this.authService.visitCompanyWebsite(!1)}}])}();return e.\u0275fac=function(t){return new(t||e)(s.Y36(l.F0),s.Y36(O.L),s.Y36(G.Ke),s.Y36(p.Ye),s.Y36(u.t4),s.Y36(E.c),s.Y36(Z.A),s.Y36(F.Z),s.Y36(j.A),s.Y36(c._),s.Y36(R.Z))},e.\u0275cmp=s.Xpm({type:e,selectors:[["app-root"]],decls:10,vars:9,consts:[[3,"dir"],["contentId","menu-content","when","false"],["contentId","menu-content","class","app-sidemenu",3,"swipeGesture",4,"ngIf"],[1,"top-bar","demo",3,"hidden","click"],["svg-shell","","src","./assets/svg/fi-rr-exit.svg"],[1,"top-bar","requested",3,"hidden","click"],["id","menu-content"],["contentId","menu-content",1,"app-sidemenu",3,"swipeGesture"],["autoHide","false"],[3,"click"],["animation","spinner",1,"menu-logo",3,"lazyLoad","src"],[1,"flat-btn","next-btn",3,"routerLink"],["auto-hide","false"],["detail","false",3,"routerLink"],["svg-shell","","src","./assets/svg/far-calendar-alt.svg",3,"lazyLoad"],["svg-shell","","src","./assets/svg/far-user-v6.svg",3,"lazyLoad"],["detail","false",3,"routerLink","state",4,"ngIf"],["svg-shell","","src","./assets/svg/far-credit-card.svg",3,"lazyLoad"],["detail","false",3,"routerLink","hidden"],["svg-shell","","src","./assets/svg/far-thumbs-up.svg",3,"lazyLoad"],["svg-shell","","src","./assets/svg/far-comment-v6.svg",3,"lazyLoad"],["svg-shell","","src","./assets/svg/fi-rr-bell.svg",3,"lazyLoad"],[1,"ion-no-border","footer-v2"],[1,"logged-user"],[3,"routerLink"],["class","customer-initial",4,"ngIf"],["class","user-avatar menu-logo","animation","spinner",3,"lazyLoad","src",4,"ngIf"],["class","fieldd-link",4,"ngIf"],["detail","false",3,"routerLink","state"],["svg-shell","",3,"lazyLoad","src"],[1,"customer-initial"],["animation","spinner",1,"user-avatar","menu-logo",3,"lazyLoad","src"],[1,"fieldd-link"],["href","https://fieldd.co/","target","_blank","svg-shell","","src","./assets/svg/fieldd-logo.svg",3,"lazyLoad"]],template:function(e,t){1&e&&(s.TgZ(0,"ion-app",0),s.TgZ(1,"ion-split-pane",1),s.YNc(2,ee,76,93,"ion-menu",2),s.TgZ(3,"div",3),s.NdJ("click",function(){return t.changeDemoCompany()}),s.TgZ(4,"span"),s._uU(5),s.qZA(),s._UZ(6,"span",4),s.qZA(),s.TgZ(7,"div",5),s.NdJ("click",function(){return t.showRequestOrder()}),s._uU(8," Job Requested "),s.qZA(),s._UZ(9,"ion-router-outlet",6),s.qZA(),s.qZA()),2&e&&(s.ekj("is-white-label",t.isWhiteLabel),s.Q6J("dir",t.textDir),s.xp6(2),s.Q6J("ngIf",null==t.company?null:t.company._id),s.xp6(1),s.Q6J("hidden",!t.isDemoApp),s.xp6(2),s.hij("Demo for ",t.demoAppName,""),s.xp6(2),s.Q6J("hidden",!(null!=t.requestedJobDetail&&t.requestedJobDetail.hasRequestedJob&&!t.isDemoApp)),s.xp6(2),s.ekj("has-top-bar",(null==t.requestedJobDetail?null:t.requestedJobDetail.hasRequestedJob)||t.isDemoApp))},directives:[u.dr,u.jI,p.O5,z.D,u.jP,u.z0,u.W2,u.Gu,u.sr,u.zc,v.U,u.YI,l.rH,u.q_,u.Ie,u.fr],pipes:[m.E,p.Ov,Y.X,V.E],styles:["[_nghost-%COMP%]     .app-sidemenu{--max-width: 100vw}[_nghost-%COMP%]     .app-sidemenu ion-header ion-toolbar{--padding-top: 0;--padding-end: 0;--padding-bottom: 0;--padding-start: 0}[_nghost-%COMP%]     .app-sidemenu ion-header ion-menu-toggle>div{padding:-webkit-calc(var(--spacing) * 2) -webkit-calc(var(--secondary-spacing) * 2);padding:calc(var(--spacing) * 2) calc(var(--secondary-spacing) * 2);cursor:pointer}[_nghost-%COMP%]     .app-sidemenu ion-header ion-menu-toggle>div [svg-shell]{display:-webkit-box;display:-webkit-flex;display:flex}[_nghost-%COMP%]     .app-sidemenu ion-header ion-menu-toggle>div [svg-shell] svg{height:50px;border-radius:8px}[_nghost-%COMP%]     .app-sidemenu ion-header ion-menu-toggle>div app-image-shell.menu-logo{--image-shell-border-radius: 8px;height:50px;width:100%}[_nghost-%COMP%]     .app-sidemenu ion-header ion-menu-toggle>div app-image-shell.menu-logo img{padding:0px var(--secondary-spacing)}[_nghost-%COMP%]     .app-sidemenu ion-header ion-menu-toggle>div>div:last-child{margin-top:-webkit-calc(var(--spacing) * 1.5);margin-top:calc(var(--spacing) * 1.5)}[_nghost-%COMP%]     .app-sidemenu ion-header ion-menu-toggle>div>div:last-child button{width:100%;font-size:var(--large-font);font-weight:var(--bolder-font);padding:10px}[_nghost-%COMP%]     .app-sidemenu ion-list{padding:0 -webkit-calc(var(--secondary-spacing) * 2) var(--spacing);padding:0 calc(var(--secondary-spacing) * 2) var(--spacing)}[_nghost-%COMP%]     .app-sidemenu ion-list ion-list-header{min-height:auto;font-weight:var(--bold-font);font-size:var(--medium-font);margin:var(--spacing) 0 -webkit-calc(var(--spacing) / 2);margin:var(--spacing) 0 calc(var(--spacing) / 2);padding:0 0 0 10px;color:var(--main-grey-color)}[_nghost-%COMP%]     .app-sidemenu ion-list ion-menu-toggle{display:block}[_nghost-%COMP%]     .app-sidemenu ion-list ion-menu-toggle+ion-menu-toggle{margin-top:var(--spacing)}[_nghost-%COMP%]     .app-sidemenu ion-list ion-item{--background-hover: var(--ion-color-primary);--background-hover-opacity: .08;--color-hover: var(--ion-color-primary);--min-height: unset;--padding-top: var(--secondary-spacing);--padding-bottom: var(--secondary-spacing);--padding-start: var(--secondary-spacing) !important;--padding-end: var(--secondary-spacing) !important;border-radius:16px;font-size:var(--page-title);font-weight:var(--normal-font);cursor:pointer;margin:1px 0;width:100%;-webkit-box-shadow:none;box-shadow:none;max-width:unset}[_nghost-%COMP%]     .app-sidemenu ion-list ion-item>div{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}[_nghost-%COMP%]     .app-sidemenu ion-list ion-item>div>span[svg-shell]{margin-right:-webkit-calc(var(--secondary-spacing) / 2);margin-right:calc(var(--secondary-spacing) / 2);display:-webkit-box;display:-webkit-flex;display:flex}[_nghost-%COMP%]     .app-sidemenu ion-list ion-item>div>span[svg-shell] svg{width:20px;height:20px}[_nghost-%COMP%]     .app-sidemenu ion-list ion-item>div>app-image-shell{--image-shell-object-fit: contain;--image-shell-border-radius: 2px;margin-right:-webkit-calc(var(--secondary-spacing) / 2);margin-right:calc(var(--secondary-spacing) / 2);height:20px;width:20px}[_nghost-%COMP%]     .app-sidemenu ion-list ion-item.item-disabled>div>span[svg-shell] svg{--fill-color: var(--main-grey-color)}[_nghost-%COMP%]     .app-sidemenu ion-list ion-item:not(.item-disabled):hover>div>span[svg-shell] svg{--fill-color: var(--ion-color-primary)}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2{background-color:var(--main-btn-grey-color);padding:-webkit-calc(var(--secondary-spacing) * 2);padding:calc(var(--secondary-spacing) * 2);padding-bottom:-webkit-calc((var(--secondary-spacing) * 2) + 0);padding-bottom:calc((var(--secondary-spacing) * 2) + 0);padding-bottom:-webkit-calc((var(--secondary-spacing) * 2) + var(--ion-safe-area-bottom, 0));padding-bottom:calc((var(--secondary-spacing) * 2) + var(--ion-safe-area-bottom, 0));border-radius:16px 16px 0 0;pointer-events:all}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div{cursor:pointer;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div:hover{opacity:.8}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div:first-child{width:50px;margin-right:var(--secondary-spacing)}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div:first-child>*{height:50px;width:50px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div:first-child .customer-initial{border-radius:16px;background-color:var(--ion-color-primary);color:#fff;display:-webkit-box;display:-webkit-flex;display:flex;font-size:var(--largest-title-font);font-weight:var(--bolder-font)}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div:first-child app-image-shell{--image-shell-border-radius: 16px}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div:last-child{color:var(--main-font-color)}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div:last-child>div:first-child{font-size:var(--larg-font);font-weight:var(--normal-font)}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .logged-user>div:last-child>div:last-child{font-size:var(--medium-font);color:var(--main-grey-color)}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .fieldd-link{text-align:center;padding-top:var(--spacing);border-top:var(--main-border);margin-top:var(--spacing);display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}[_nghost-%COMP%]     .app-sidemenu ion-footer.footer-v2 .fieldd-link svg{height:18px}"]}),e}(),ne=i(45642),oe=i(53882),ie=i(88355),re=i(5332),ae=i(7964),se=i(19073),le=i(82426),ue=i(20766),ce=i(34138),de=function(){var e=function(){return d(function e(t,n,o){h(this,e),this.navController=t,this.alertService=n,this.authService=o},[{key:"intercept",value:function(e,t){var n,o,i=this,r=this.authService.isBrowser(),a=null===(n=this.authService.getCurrentUserInfo())||void 0===n?void 0:n._id,s=null===(o=this.authService.getCurrentUserAuthInfo())||void 0===o?void 0:o.authToken,l=this.authService.getSessionToken();return(0,ie.D)(this.getCaptchaToken(e.headers)).pipe((0,se.z)(function(n){var o={api_key:N.N.apiKey,source:r?"ONLINE":"CLIENTAPP",companyId:N.N.companyID,redirect_s3:"true"},u=i.authService.appVersion$.getValue();return!r&&(null==u?void 0:u.length)&&(o.app_version=u),s&&(o.auth_token=s,o.customerId=a),l&&(o["Session-Token"]=l),e.headers.has("ignore-version-check")&&(o["ignore-version-check"]="true"),e.headers.has("captcha-token")&&e.headers.get("captcha-token")&&(o["captcha-token"]=n),e=e.clone({headers:new oe.WM(o)}),t.handle(e).pipe((0,le.K)(function(e){var t,n,o;switch(e.error&&427!==e.status&&((null===(t=e.error)||void 0===t?void 0:t.message)?(0,ue.Tb)(new Error(e.error.message)):(null===(n=e.error)||void 0===n?void 0:n.description)?(0,ue.Tb)(new Error(e.error.description)):(0,ue.Tb)(e.error)),e.status){case 0:return i.alertService.showToastMessage("Please check your internet connection",ce.N.Error),re.E;case 401:return i.authService.resetAppAndCompanySettings(!1),i.authService.showAppRoot(),i.navController.navigateRoot("/login",{animationDirection:"forward"}),re.E;case 403:return"ACCOUNT_DISABLED"===(null===(o=e.error)||void 0===o?void 0:o.errorCode)&&i.alertService.showAlert("Warning","Your account has been disabled","alert-disable"),re.E;case 420:return i.alertService.showAppUpdateError("Important App Update","Please visit iTunes or Google Play to update your app ASAP"),re.E;default:return(0,ae._)(function(){return e})}}))}))}},{key:"getCaptchaToken",value:function(e){return(0,M.mG)(this,void 0,void 0,a().mark(function t(){var n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n="",t.prev=1,e.has("captcha-token")&&e.get("captcha-token")){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,this.authService.getCaptcha(e.get("captcha-token"));case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0="";case 9:n=t.t0,t.next=14;break;case 12:t.prev=12,t.t1=t.catch(1);case 14:return t.prev=14,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this,[[1,12,14,17]])}))}}])}();return e.\u0275fac=function(t){return new(t||e)(s.LFG(u.SH),s.LFG(ce.H),s.LFG(c._))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),pe=i(96289),he=i(67197),ve=i(22373),me=i(45718),fe=i(47731),ge=i(73039),ye=i(89131),be=i(34483),ke=i(5511),we=i(75908),Ae=i(30247),Se=i(16664),Ce=i(21788),Te=i(65232),Ue=i(55160),Ie=i(19759),Pe=i(6469),xe=i(15435),De=i.n(xe),_e=i(77224),Me=[],Le=(0,he.Lq)({});function Oe(e,t){return Le(e,t)}var Ze=i(76645),Ee=function(){var e=function(){return d(function e(){h(this,e)},[{key:"handleError",value:function(e){if(!(0,B.zZ)(e)&&!/google is not defined/gi.test(e.message)){if(!N.N.production)return console.error(e);(0,ue.Tb)(e)}}}])}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac}),e}(),Ne=i(32609),Re=i(20099),qe=(0,_e.Z)(xe,xe.reduxMiddleware());function je(){return Me.concat([qe])}var Fe=function(){var t,n=function(t){function n(){var t;return h(this,n),(t=e(this,n,arguments)).overrides={pinch:{enable:!1},rotate:{enable:!1}},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(n,t),d(n)}(r.hm);return n.\u0275fac=function(e){return(t||(t=s.n5z(n)))(e||n)},n.\u0275prov=s.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n}(),Be=function(){var e=d(function e(){h(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e,bootstrap:[te]}),e.\u0275inj=s.cJS({providers:[ge.k,ye.b,be.V1,Ce.b,fe.a,O.L,Re.Q,Se.B,Z.A,E.c,Te.S,Pe.h,Ue.I,Ze.C,Ne.s,{provide:l.wN,useClass:u.r4},{provide:oe.TP,useClass:de,multi:!0},{provide:s.qLn,useClass:Ee},{provide:Ie.aN,deps:[l.F0]},{provide:s.ip1,useFactory:function(){return function(){}},deps:[Ie.aN],multi:!0},{provide:he.su,useFactory:je},{provide:r.ok,useClass:Fe}],imports:[[r.b2,u.Pc.forRoot({mode:"ios",swipeBackEnabled:!1}),_,ne.K,pe.m,oe.JF,r.t6,ke.ww,we.hO.initializeApp(N.N.firebaseConfig),he.Aw.forRoot(Oe),ve.FT.instrument({name:"APM Demo App DevTools",maxAge:25,logOnly:N.N.production}),me.sQ.forRoot([]),G.Fw.forRoot(),Ae.yI.forRoot()]]}),e}(),Ge=i(76817),ze=(i(58256),i(80454));try{window.isSecureContext&&navigator.serviceWorker&&navigator.serviceWorker.getRegistrations().then(function(e){e.forEach(function(e){return e.unregister()})}).catch(function(){})}catch(Ye){}if(N.N.production&&((0,s.G48)(),!N.N.companyID)){(0,Ie.S1)({dsn:"https://c1f223da25bd41c599ee5f495fb9f6e7@o931180.ingest.sentry.io/5880066",integrations:[new ze.gE({tracingOrigins:["localhost:4202",/^\//],routingInstrumentation:Ie.$q})],environment:N.N.production?"production":"development",tracesSampleRate:1});var Ye=window.location.href.toLowerCase();window.logrocketInitialized=!!["book.junkcare.uk","junkcare.fieldd.co","aquaforcecarpetupholsterycleaning.fieldd.co"].find(function(e){return Ye.includes(e)}),window.logrocketInitialized&&De().init("nu5nih/online-bookings",{mergeIframes:!0,console:{shouldAggregateConsoleErrors:!0}})}r.q6().bootstrapModule(Be).catch(function(e){return console.log(e)}),(0,Ge.q4)(window)},50863:function(e,t,n){var o={"./ion-action-sheet.entry.js":[90733,8592,733],"./ion-alert.entry.js":[20985,8592,985],"./ion-app_8.entry.js":[93899,8592,3899],"./ion-avatar_3.entry.js":[5121,8592,5121],"./ion-back-button.entry.js":[52960,8592,2960],"./ion-backdrop.entry.js":[45473,5473],"./ion-button_2.entry.js":[19787,8592,9787],"./ion-card_5.entry.js":[66165,8592,6165],"./ion-checkbox.entry.js":[69569,8592,9569],"./ion-chip.entry.js":[35119,8592,5119],"./ion-col_3.entry.js":[90799,799],"./ion-datetime_3.entry.js":[68918,8592,8918],"./ion-fab_3.entry.js":[94028,8592,4028],"./ion-img.entry.js":[98107,8107],"./ion-infinite-scroll_2.entry.js":[72178,8592,2178],"./ion-input.entry.js":[42868,8592,123],"./ion-item-option_3.entry.js":[18706,8592,8706],"./ion-item_8.entry.js":[12099,8592,2099],"./ion-loading.entry.js":[84868,8592,4868],"./ion-menu_3.entry.js":[54377,8592,4377],"./ion-modal.entry.js":[15678,8592,5678],"./ion-nav_2.entry.js":[16735,8592,6735],"./ion-popover.entry.js":[87686,8592,7686],"./ion-progress-bar.entry.js":[48555,8592,8555],"./ion-radio_2.entry.js":[30568,8592,568],"./ion-range.entry.js":[6231,8592,6231],"./ion-refresher_2.entry.js":[45772,8592,5772],"./ion-reorder_2.entry.js":[14977,8592,4977],"./ion-ripple-effect.entry.js":[42886,2886],"./ion-route_4.entry.js":[54990,8592,4990],"./ion-searchbar.entry.js":[13810,8592,3810],"./ion-segment_2.entry.js":[2446,8592,2446],"./ion-select_3.entry.js":[47619,8592,7619],"./ion-slide_2.entry.js":[28393,8393],"./ion-spinner.entry.js":[56281,8592,6281],"./ion-split-pane.entry.js":[35932,5932],"./ion-tab-bar_2.entry.js":[57970,8592,7970],"./ion-tab_2.entry.js":[80298,8592,298],"./ion-text.entry.js":[71006,8592,1006],"./ion-textarea.entry.js":[74783,8592,4783],"./ion-toast.entry.js":[62749,8592,2749],"./ion-toggle.entry.js":[55404,8592,5404],"./ion-virtual-scroll.entry.js":[39043,9043]};function i(e){if(!n.o(o,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=o[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then(function(){return n(i)})}i.keys=function(){return Object.keys(o)},i.id=50863,e.exports=i},55899:function(e,t,n){var o={"./pwa-action-sheet.entry.js":[15883,5883],"./pwa-camera-modal-instance.entry.js":[84091,4091],"./pwa-camera-modal.entry.js":[51225,1225],"./pwa-camera.entry.js":[67614,7614],"./pwa-toast.entry.js":[45512,5512]};function i(e){if(!n.o(o,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=o[e],i=t[0];return n.e(t[1]).then(function(){return n(i)})}i.keys=function(){return Object.keys(o)},i.id=55899,e.exports=i},77961:function(e,t,n){var o={"./af.js":[62275,2275],"./ar-dz.js":[11218,1218],"./ar-kw.js":[14754,4754],"./ar-ly.js":[66680,6680],"./ar-ma.js":[92178,8262],"./ar-ps.js":[42060,2060],"./ar-sa.js":[56522,6522],"./ar-tn.js":[95682,5682],"./ar.js":[90857,857],"./az.js":[70164,164],"./be.js":[79774,9774],"./bg.js":[60947,947],"./bm.js":[21832,1832],"./bn-bd.js":[74477,4477],"./bn.js":[89650,9650],"./bo.js":[66005,6005],"./br.js":[98492,8492],"./bs.js":[70534,534],"./ca.js":[52061,2061],"./cs.js":[84737,4737],"./cv.js":[61167,1167],"./cy.js":[77996,7996],"./da.js":[9528,9528],"./de-at.js":[49430,9430],"./de-ch.js":[67978,7978],"./de.js":[14540,4540],"./dv.js":[83426,3426],"./el.js":[6616,6616],"./en-au.js":[63816,1961],"./en-ca.js":[32162,2162],"./en-gb.js":[83305,3305],"./en-ie.js":[61954,1954],"./en-il.js":[43060,3060],"./en-in.js":[59923,9923],"./en-nz.js":[13540,3540],"./en-sg.js":[16505,6505],"./eo.js":[41907,1907],"./es-do.js":[41246,1246],"./es-mx.js":[56131,6131],"./es-us.js":[36430,6430],"./es.js":[86640,6640],"./et.js":[62551,2551],"./eu.js":[32711,2711],"./fa.js":[54572,4572],"./fi.js":[33390,3390],"./fil.js":[87860,7860],"./fo.js":[48216,8216],"./fr-ca.js":[98527,8527],"./fr-ch.js":[58407,8407],"./fr.js":[99291,9291],"./fy.js":[47054,7054],"./ga.js":[49540,9540],"./gd.js":[73917,3917],"./gl.js":[51486,1486],"./gom-deva.js":[56245,6245],"./gom-latn.js":[48868,8868],"./gu.js":[59652,9652],"./he.js":[89019,9019],"./hi.js":[42040,2040],"./hr.js":[63402,3402],"./hu.js":[79322,9322],"./hy-am.js":[27609,7609],"./id.js":[57942,7942],"./is.js":[98275,8275],"./it-ch.js":[4378,4378],"./it.js":[73053,3053],"./ja.js":[46176,6176],"./jv.js":[679,679],"./ka.js":[92726,2726],"./kk.js":[72953,2953],"./km.js":[86957,6957],"./kn.js":[59181,9181],"./ko.js":[47148,7148],"./ku-kmr.js":[63898,3898],"./ku.js":[27752,7752],"./ky.js":[65675,5675],"./lb.js":[41263,1263],"./lo.js":[65746,5746],"./lt.js":[11143,1143],"./lv.js":[38753,8753],"./me.js":[44054,4054],"./mi.js":[31573,1573],"./mk.js":[30202,202],"./ml.js":[68523,8523],"./mn.js":[79794,9794],"./mr.js":[3165,6681],"./ms-my.js":[39859,9859],"./ms.js":[56975,6975],"./mt.js":[3691,3691],"./my.js":[5152,5152],"./nb.js":[7607,7607],"./ne.js":[21526,1526],"./nl-be.js":[40076,76],"./nl.js":[86368,6368],"./nn.js":[68420,8420],"./oc-lnc.js":[51906,1906],"./pa-in.js":[94504,4504],"./pl.js":[54721,4721],"./pt-br.js":[54548,4548],"./pt.js":[74645,4645],"./ro.js":[71977,1977],"./ru.js":[26042,6042],"./sd.js":[78849,8849],"./se.js":[27739,7739],"./si.js":[50084,84],"./sk.js":[92449,2449],"./sl.js":[23086,3086],"./sq.js":[33139,3139],"./sr-cyrl.js":[30063,63],"./sr.js":[30607,607],"./ss.js":[40131,131],"./sv.js":[21665,1665],"./sw.js":[5642,5642],"./ta.js":[33622,3622],"./te.js":[74825,4825],"./tet.js":[48336,8336],"./tg.js":[39238,9238],"./th.js":[99463,9463],"./tk.js":[39986,9986],"./tl-ph.js":[29672,9672],"./tlh.js":[40043,43],"./tr.js":[51212,1212],"./tzl.js":[50110,110],"./tzm-latn.js":[38309,8309],"./tzm.js":[80482,482],"./ug-cn.js":[42495,2495],"./uk.js":[54157,4157],"./ur.js":[80984,984],"./uz-latn.js":[43662,3662],"./uz.js":[64141,4141],"./vi.js":[12607,2607],"./x-pseudo.js":[66460,6460],"./yo.js":[92948,2948],"./zh-cn.js":[62658,2658],"./zh-hk.js":[39352,9352],"./zh-mo.js":[38274,8274],"./zh-tw.js":[98451,8451]};function i(e){if(!n.o(o,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=o[e],i=t[0];return n.e(t[1]).then(function(){return n.t(i,23)})}i.keys=function(){return Object.keys(o)},i.id=77961,e.exports=i},77020:function(){}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[4736],function(){return t(36546),t(5359)}),e.O()}])}();