PageSourceSearch

https://app.waitwhile.com/chunk-F543K4XY.js

js waitwhile.com collected 2026-09-24 08:48:28 UTC 89,579 bytes, 6 lines download raw bytes

1import{$c as jn,Aa as ye,Ba as xn,C as wn,Ca as Dn,Da as Gn,E as yn,Ea as It,Fa as Bn,I as me,Ia as zn,J as An,K as bn,L as Rn,N as Ne,O as Pn,R as Mn,Sc as qn,Wa as kn,Xa as Un,Za as Yn,fb as Xn,hd as Hn,i as On,id as Jn,jd as Qn,k as fn,kd as Kn,l as En,la as $n,m as Ln,mc as Vn,nd as Zn,od as ea,p as hn,pa as K,pd as ta,r as In,ra as we,ta as vn,u as ve,v as he,w as Ie,y as Nn,ya as Fn,ye as oa,za as Wn}from"./chunk-6QDVQ5WV.js";import{$a as T,$c as Do,$t as Ei,$u as Ni,$w as gt,Ac as Xe,Aw as lt,Ax as nn,Ay as Lt,Ba as B,Bb as ge,Bc as Po,Bn as ri,Bp as _i,Bw as vi,Bx as an,By as ht,Ca as W,Cc as ce,Cn as Ze,Cw as rt,Cx as sn,D as Co,Db as ke,Dx as ln,Eb as _e,Ec as Mo,Ed as N,Em as Ke,Ex as rn,Fc as $o,Fh as qo,Fu as Fa,Fx as cn,Gu as Le,Gx as _n,Ha as y,Hc as vo,Hd as ko,Hi as $t,Hx as un,Ia as ho,Ib as h,Ii as vt,Il as Zo,Ix as pn,Ja as A,Jb as I,Jx as mn,K as wt,Kh as jo,Kt as Ci,Kw as ct,Kx as Sn,La as Io,Lp as ui,Lv as it,Lw as _t,Lx as dn,M as ie,Ma as xe,Mb as ne,Mq as mi,Mv as nt,Mw as ut,N as q,Na as De,Nc as Fo,Nv as at,Nw as pt,O as x,Oa as _,Oq as Si,Ov as Wa,Ow as mt,Pa as r,Pc as te,Pe as Rt,Pw as St,Qa as s,Qc as Ve,Qe as Uo,Qv as yi,Qw as dt,Ra as S,Re as Pt,Rv as Ai,Rw as Ct,S as go,Sb as Ue,Sc as Wo,Se as je,Sl as J,Sn as Ee,Sw as xa,Ue as Mt,Um as ni,Up as et,Uu as tt,Uv as bi,Uw as Fi,V as Ce,Va as Ge,Vm as ai,Vt as gi,Vu as ot,Vw as Wi,W as To,Wa as Be,Wb as H,We as Yo,Ya as z,Yk as Qo,Yt as Ti,Yw as xi,Z as a,Zt as Oi,_b as yo,_c as xo,_l as ei,_t as fi,ac as Ao,am as Qe,as as Ft,au as Li,ax as Tt,bx as Ot,c as Me,ca as D,cm as Te,cn as si,ct as Wt,da as G,dm as Oe,dp as ci,dx as Da,ea as Oo,eb as M,ev as Q,fb as O,fm as ti,fx as Di,gd as Go,gl as oe,gx as Gi,he as At,hl as He,hs as di,i as re,jn as li,ju as pe,jx as Bi,k as w,ka as fo,kk as Ho,kq as pi,kx as zi,l as E,la as Eo,lf as Xo,lx as ki,m as V,md as qe,me as bt,mx as Ui,nd as ae,nl as ue,ns as se,nx as Yi,ob as j,ox as Xi,pm as oi,px as Vi,qd as yt,qx as qi,r as So,rc as bo,rm as fe,ru as hi,rx as ji,sa as c,sl as Je,sv as wi,sx as Hi,t as de,tb as $e,tc as ee,tl as Ko,tw as Ri,tx as Ji,ub as ze,uc as Ye,um as ii,uw as Pi,ux as Qi,uy as ft,v as Nt,vb as No,vc as Ro,vd as Bo,vk as Jo,vx as Ki,vy as Et,wd as zo,ww as st,wx as Zi,wy as Cn,xb as wo,xg as Vo,xu as Ii,xw as Mi,xx as en,ya as v,yc as g,yx as tn,yy as gn,za as Lo,zw as $i,zx as on,zy as Tn}from"./chunk-6VDOBKBI.js";import"./chunk-UNNH6OJB.js";import{a as k,b as X,f as We,h as $}from"./chunk-HE2D45TV.js";function ia(i){return Math.trunc(i*Xo)}var xt=(()=>{class i extends oe{constructor(){super(...arguments),this.locationCollectionItem$=this.observe("locationCollectionItem"),this.locationActions=a(Fn),this.actions$=this.locationCollectionItem$.pipe(q(e=>e?this.locationActions.getActions(e.id,{omit:e.isActive?["activate"]:["deactivate"]}):re([])))}static{this.\u0275fac=(()=>{let e;return function(t){return(e||(e=Eo(i)))(t||i)}})()}static{this.\u0275cmp=v({type:i,selectors:[["ww-locations-actions"]],hostAttrs:[1,"ww-locations-actions"],inputs:{locationCollectionItem:"locationCollectionItem"},standalone:!1,features:[B],decls:2,vars:4,consts:[[3,"actions","label"]],template:function(o,t){o&1&&(S(0,"ww-model-action-menu",0),h(1,"async")),o&2&&_("actions",I(1,2,t.actions$))("label",t.locationCollectionItem.name)},dependencies:[yn,H],encapsulation:2,changeDetection:0})}}return i})();function ka(i,m){if(i&1&&(r(0,"ww-label-layout")(1,"ww-label")(2,"span"),T(3,0),s(),r(4,"ww-sublabel"),T(5,1),s()(),S(6,"ww-copy-location-properties",13),h(7,"async"),h(8,"async"),s()),i&2){let e=m,o=O();c(6),_("locationName",I(7,6,o.selectedLocationName$))("withDataFields",e.hasDataFields)("withLabels",I(8,8,o.labelRx.hasLabels$))("withResources",e.hasResources)("withServices",e.hasServices)("withUsers",e.hasMultipleUsers)}}function Ua(i,m){if(i&1&&(r(0,"ww-label-layout")(1,"ww-label")(2,"span"),T(3,2),s(),r(4,"ww-sublabel"),T(5,3),s()(),S(6,"ww-label-form",14),h(7,"async"),s()),i&2){let e=O();c(6),_("size",I(7,2,e.breakpoints.isAboveMobile$)?"large":"full")("disableAutoFocus",!0)}}function Ya(i,m){if(i&1){let e=z();r(0,"button",15),M("click",function(){D(e);
1let t=O();return G(t.add())}),T(1,4),s()}}var la=(()=>{class i extends oe{constructor(){super(),this.accountRx=a(gi),this.changeDetectorRef=a(Ue),this.commonValidators=a(bn),this.coreDataFieldRx=a(Et),this.coreResourceRx=a(Lt),this.coreServiceRx=a(ht),this.layout=a(Q),this.locationApiRx=a(hi),this.parentPath="account/locations",this.router=a(te),this.userRx=a(Ti),this.addLocationWrite=a(Mi),this.breakpoints=a(Ko),this.labelRx=a(pe),this.shortNameReadonly=!1,this.copyLocationFormControl=new g(null),this.form=new Ro({name:new g("",{validators:[bo.required],nonNullable:!0}),displayName:new g("",{validators:[],nonNullable:!0}),shortName:new g("",{nonNullable:!0,updateOn:"blur",asyncValidators:[e=>this.commonValidators.shortNameAvailabilityValidator(e)],validators:[Vo.patternWithMessage(Qo,$localize`Must contain 3-20 lowercase letters, numbers or hyphens.`)]}),copyLocationId:this.copyLocationFormControl,labels:new g([]),properties:new g({})}),this.locations$=this.locationApiRx.listLocations().pipe(wt({bufferSize:1,refCount:!0})),this.pluckLocationName$=this.locations$.pipe(E(e=>o=>e.find(t=>t.id===o)?.name??"")),this.locationIds$=this.locations$.pipe(E(e=>e.sort(Yo("name")).map(o=>o.id))),this.selectedLocationId$=this.copyLocationFormControl.valueChanges.pipe(Co(),wt({bufferSize:1,refCount:!0})),this.selectedLocation$=V([this.selectedLocationId$,this.locations$]).pipe(E(([e,o])=>o.find(t=>t.id===e)),ie(void 0)),this.selectedLocationName$=this.selectedLocation$.pipe(E(e=>e?.name??null)),this.selectedLocationHasResources$=this.selectedLocationId$.pipe(q(e=>e?this.coreResourceRx.collectionCount(Ft(se([e]),{where:[["isCategory","==",!1]]})).pipe(E(o=>o>0)):re(!1))),this.selectedLocationHasServices$=this.selectedLocationId$.pipe(q(e=>e?this.coreServiceRx.collectionCount(Ft(se([e]),{where:[["isCategory","==",!1]]})).pipe(E(o=>o>0)):re(!1))),this.selectedLocationHasDataFields$=this.selectedLocationId$.pipe(q(e=>e?this.coreDataFieldRx.collectionCount(se([e])).pipe(E(o=>o>0)):re(!1))),this.selectedLocationHasUsers$=this.selectedLocationId$.pipe(q(e=>e?this.userRx.getUsersCount(Ci([e])).pipe(E(o=>o>0)):re(!1))),this.selectedLocationInfo$=V([this.selectedLocationHasUsers$,this.selectedLocationHasResources$,this.selectedLocationHasServices$,this.selectedLocationHasDataFields$]).pipe(E(([e,o,t,n])=>({hasMultipleUsers:e,hasResources:o,hasServices:t,hasDataFields:n})),E(e=>!e.hasMultipleUsers&&!e.hasResources&&!e.hasServices&&!e.hasDataFields?null:e)),this.layout.setFeatureContext({name:$localize`Add location`,parentPath:this.parentPath}),this.subscribe()}add(){return $(this,null,function*(){if(this.form.invalid)return;let e=this.form.getRawValue(),o=yield w(this.selectedLocation$,{defaultValue:void 0}),t=k({name:e.name,displayName:e.displayName&&e.displayName.length>0?e.displayName:e.name,shortName:e.shortName&&e.shortName.length>0?e.shortName:void 0,labels:e.labels,copyLocationId:e.copyLocationId??void 0,businessType:o?.businessType},e.properties);this.addLocationWrite.payload.next(t),this.form.markAsPristine(),this.form.updateValueAndValidity()})}subscribe(){this.selectedLocationInfo$.pipe(x(this.ngOnDestroy$)).subscribe(e=>{let o={includeUsers:!!e?.hasMultipleUsers,includeResourcesEnabled:!!e?.hasResources,includeResources:e?.hasResources?"ASSIGN":"NONE",includeServicesEnabled:!!e?.hasServices,includeServices:e?.hasServices?"ASSIGN":"NONE",includeDataFieldsEnabled:!!e?.hasDataFields,includeDataFields:e?.hasDataFields?"ASSIGN":"NONE"};this.form.patchValue({properties:o})}),this.addLocationWrite.response$.pipe(x(this.ngOnDestroy$)).subscribe(()=>{this.router.navigateByUrl(this.parentPath)})}setInitialShortName(){return $(this,null,function*(){if(this.form.value.shortName||!this.form.value.name)return;this.shortNameReadonly=!0;let e=yield this.accountRx.createShortName(this.form.value.name,4);this.shortNameReadonly=!1,this.changeDetectorRef.markForCheck(),e&&(this.form.controls.shortName.setValue(e),this.form.controls.shortName.markAsTouched(),this.form.controls.shortName.markAsDirty())})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ww-locations-add"]],hostAttrs:[1,"ww-locations-add"],inputs:{labelLayout:"labelLayout"},standalone:!1,features:[ge([we,...An()]),B],decls:12,vars:15,consts:()=>{let e;e=$localize`Location name`;let o;o=$localize`Your location name is displayed across many areas, including your public pages and customer messages.`;let t;t=$localize`Location display name`;let n;n=$localize`Display a different location name on your public pages.`;let p;p=$localize`Location short name`;let C;C=$localize`Your business name as used in URLs.`;let u;u=$localize`Copy location settings from`;let F;F=$localize`Optionally select a location to copy settings from. You can change these settings later.`;let l;l=$localize`Select location settings to copy`;let d;d=$localize` Select which settings you want to copy from the selected location. You can change these settings later. `;let R;R=$localize`Labels`;let P;P=$localize` Use labels to organize and group your locations. `;let Y;return Y=$localize` Add location `,[l,d,R,P,Y,["wwLayoutPadding","",1,"flex","flex-col","items-start","gap-6","max-w-full","min-w-0",3,"wwTrackPendingChanges","wwTrackPendingChangesUntil"],[3,"formGroup"],["wwForm","",1,"flex","flex-col","gap-y-4","
1items-stretch",3,"wwFormSeparator"],["formControlName","name","label",e,"sublabel",o,3,"focusout","autoFocus"],["formControlName","displayName","label",t,"sublabel",n],["formControlName","shortName","label",p,"sublabel",C,3,"readonly"],["label",u,"sublabel",F,"formControlName","copyLocationId",3,"placeholder","selection"],["wwButton","",3,"click",4,"wwPermission"],["formControlName","properties",3,"locationName","withDataFields","withLabels","withResources","withServices","withUsers"],["formControlName","labels",3,"size","disableAutoFocus"],["wwButton","",3,"click"]]},template:function(o,t){if(o&1&&(r(0,"div",5),Ge(1,6),r(2,"form",7)(3,"ww-input",8),M("focusout",function(){return t.setInitialShortName()}),s(),S(4,"ww-input",9)(5,"ww-input",10)(6,"ww-location-select",11),y(7,ka,9,10,"ww-label-layout"),h(8,"async"),s(),y(9,Ua,8,4,"ww-label-layout"),h(10,"async"),Be(),W(11,Ya,2,0,"button",12),s()),o&2){let n;_("wwTrackPendingChanges",t.form)("wwTrackPendingChangesUntil",t.addLocationWrite.response$),c(),_("formGroup",t.form),c(),_("wwFormSeparator","both"),c(),_("autoFocus",!0),c(2),_("readonly",t.shortNameReadonly),c(),_("placeholder","Default settings")("selection","single"),c(),A((n=I(8,11,t.selectedLocationInfo$))?7:-1,n),c(2),A(I(10,13,t.labelRx.enabled$)&&!(t.form.value.properties!=null&&t.form.value.properties.includeLabels)?9:-1),c(2),_("wwPermission","locations.create")}},dependencies:[Xe,ee,Ye,$o,Mo,Ne,K,ye,Ie,me,It,J,Qe,Oe,Te,ti,ii,H],encapsulation:2,changeDetection:0})}}return i})();function Xa(i,m){if(i&1){let e=z();r(0,"button",5),M("click",function(){D(e),O();let t=j(2);return G(t.copy())}),T(1,1),s()}}var ra=(()=>{class i extends oe{constructor(){super(),this.copyLocationWrite=a(vi),this.layout=a(Q),this.router=a(te),this.parentPath="account/locations",this.layout.setFeatureContext({name:$localize`Duplicate location`,parentPath:this.parentPath}),this.subscribe()}subscribe(){this.copyLocationWrite.response$.pipe(x(this.ngOnDestroy$)).subscribe(()=>{this.router.navigateByUrl(this.parentPath)})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ww-locations-copy"]],hostAttrs:[1,"ww-locations-copy"],standalone:!1,features:[B],decls:5,vars:3,consts:()=>{let e;return e=$localize` Duplicate `,[["copyLocation",""],e,["wwLayoutPadding","",1,"flex","flex-col","items-start","gap-6","max-w-full","min-w-0"],[1,"max-w-full",3,"wwTrackPendingChanges","wwTrackPendingChangesUntil"],["wwButton","",3,"click",4,"wwPermission"],["wwButton","",3,"click"]]},template:function(o,t){if(o&1&&(r(0,"div",2),S(1,"ww-copy-location",3,0),r(3,"div"),W(4,Xa,2,0,"button",4),s()()),o&2){let n=j(2);c(),_("wwTrackPendingChanges",n.form)("wwTrackPendingChangesUntil",t.copyLocationWrite.response$),c(3),_("wwPermission","locations.create")}},dependencies:[Bn,K,Ie,me,J],encapsulation:2,changeDetection:0})}}return i})();var Pe={address:$localize`Address`,allowIncomingMessages:$localize`Allow incoming messages`,allowMultipleServices:$localize`Allow selecting multiple services`,allowPublicAccountSignup:$localize`Show in Location directory`,allowPublicAccountView:$localize`Include in Waitlist overview`,allowSMSSignup:$localize`Allow SMS registration`,appAwayTimeout:$localize`Prompt staff to clear Away status`,autoCompleteServing:$localize`Autocomplete visits after serving`,bookingAllowCancel:$localize`Allow customers to cancel their booking`,bookingAllowConfirm:$localize`Allow customers to confirm their booking`,bookingAllowManualDuration:$localize`Allow staff to set a manual booking duration`,bookingAllowManualStartTime:$localize`Enable flexible booking start times`,bookingAllowOverbooking:$localize`Allow staff to override availability`,bookingAllowReschedule:$localize`Allow customers to reschedule booking`,bookingCalendarStartDay:$localize`Week start day`,bookingCheckinToWaitlist:$localize`Move bookings to waitlist on check-in`,bookingCountPartiesAsMultipleSpots:$localize`Count every customer in a party as one spot each`,bookingHours:$localize`Booking hours`,bookingHoursByDate:$localize`Booking hours by date`,bookingManualConfirmation:$localize`Booking approval`,bookingMaxNotice:$localize`Max notice`,bookingMinNotice:$localize`Min notice`,bookingRejectUnknownCustomers:$localize`Allow only existing customers to register`,bookingShowFirstAvailableDate:$localize`Jump to first available date`,bookingShowOnlyToday:$localize`Display only today's date`,bookingSpotsPerSlot:$localize`Spots per slot`,bookingSyncWaiting:$localize`When to move booking`,bookingSyncWaitingEnabled:$localize`Add bookings to waitlist`,bookingTimeSlotIncr:$localize`Slot size`,bookingUseResourceSpots:$localize`Resources have individual spots per time slot`,bookingWaitlistOrder:$localize`Move to position`,businessName:$localize`Business name`,closeWaitlistOnceFull:$localize`Close waitlist once full`,coordinates:$localize`Coordinates`,currency:$localize`Currency`,defaultVisitOrderValue:$localize`Fallback revenue per visit`,displayName:$localize`Location display name`,email:$localize`Email`,enableBookingGeofence:$localize`Show geofence for bookings`,enablePendingVisitsBooking:$localize`Booking time hold`,enableResourceAutoAway:$localize`Set resources as away at the end of the day`,enableWaitlistGeofence:$localize`Show geofence for waitlist`,expiryRules:$localize`Expiration rules`,externalCalendars:$localize`External calendars`,externalCustomerIdValidation:$localize`Validation pattern`,geofenceMaxDistance:$localize`Max distance from location`,googleTagManager:$localize`Google Tag Manager`,guestPageProgressIndicatorType:$localize`Status indicator while waiting`,hideCancelGuestPage:$localize`Allow customer to leave the line`,hideCheckinNumWaiting:$localize`Show number of waiting customers`,hideEstWaitCheckin:$localize`Show current estimated wait time`,hidePartiesPublic:$localize`Show total number of people waiting`,hideWaitTimePublic:$localize`Show time waited`,hours:$localize`Location hours`,hoursByDate:$localize`Location hours by date`,i18n:$localize`Business terms`,isBookingActive:$localize`Bookings enabled`,isCustomerIdPublic:$localize`Customer ID visibility`,isEmailPublic:$localize`Email visibility`,isGoogleWaitlist:$localize`Google waitlist`,isMaxCapacityActive:$localize`Capacity management`,isNamePublic:$localize`Name visibility`,isPartySizePublic:$localize`Party size visibility`,isPhonePublic:$localize`Phone visibility`,isPublicBooking:$localize`Public booking enabled`,isPublicCheckIn:$localize`Public waitlist enabled`,isPublicIndexed:$localize`Discoverable for search engines`,isPublicSearch:$localize`Discoverable on waitwhile.com`,isPublicSignin:$localize`Allow arrival from registration flow`,isPublicWaitlist:$localize`Enable public displays`,isQuotePublic:$localize`Estimated wait visibility`,isWaitlistActive:$localize`Waitlist enabled`,labels:$localize`Labels`,logoUrl:$localize`Location icon`,maxBookedCustomerVisits:$localize`Booking limit`,maxBookedCustomerVisitsPeriod:$localize`Time period`,maxPartySize:$localize`Max party size for waitlist`,maxPartySizeBookings:$localize`Max party size for bookings`,maxServing:$localize`Serving capacity limit`,maxServingActive:$localize`Serving capacity limit enabled`,maxWaiting:$localize`Waitlist capacity limit`,maxWaitingActive:$localize`Waitlist capacity limit enabled`,maxWaitingCustomerVisits:$localize`Allow customers to register multiple times`,messagesArrivalPage:$localize`Web arrival page message`,messagesBookingConfirmationInfo:$localize`Status page`,messagesBookingPageConfirmation:$localize`Kiosk redirect message`,messagesCheckinWelcome:$localize`General pages in registration flow`,messagesGuestPageInfo:$localize`Status page message`,messagesWaitlistWelcome:$localize`Waitlist welcome message`,messagesWelcomePage:$localize`First page in the registration flow message`,metadata:$localize`Metadata`,name:$localize`Location name`,nextLocations:$localize`Next locations after visit`,openWaitlistOnlyAtMaxCapacity:$localize`Enable waitlist only when serve capacity is full`,phone:$localize`Phone`,playSoundAddGuest:$localize`When a customer is added`,playSoundPublicWaitlistGuestAlerted:$localize`Play sound when alerted`,publicAccountSignupContent:$localize`Custom content`,publicBo
1okingRedirectLink:$localize`Booking redirect link`,publicBookingShowNumSpots:$localize`Show available spots`,publicBookingUseLocalTimezone:$localize`Display time in customer's time zone`,publicConfirmationResetTime:$localize`Confirmation refresh time`,publicLocales:$localize`Languages`,publicLogoUrl:$localize`Location logo`,publicPageResetTime:$localize`Idle refresh time`,publicTheme:$localize`Custom theme`,publicWaitlistRedirectLink:$localize`Waitlist redirect link`,qrServeBookingPostDurationLimit:$localize`Max time after booking has started`,qrServeBookingPreDurationLimit:$localize`Max time before booking has started`,qrServeWaitlistMaxPosition:$localize`Max allowed position in line to be served`,quickVisitRules:$localize`Quick serve rules`,quotedWaitIncrement:$localize`Estimated wait increment`,recaptchaMinScore:$localize`Captcha bot protection`,rejectFlaggedCustomers:$localize`Allow flagged customers`,requireCustomerId:$localize`Customer ID required for staff`,requireCustomerIdPublic:$localize`Customer ID required for guests`,requiredServiceCategoryIds:$localize`Required service categories`,requireEmail:$localize`Email required for staff`,requireEmailPublic:$localize`Email required for guests`,requireName:$localize`Name required for staff`,requireNamePublic:$localize`Name required for guests`,requireNotes:$localize`Notes required for staff`,requirePartySize:$localize`Party size required for staff`,requirePartySizePublic:$localize`Party size required for guests`,requirePhone:$localize`Phone required for staff`,requirePhonePublic:$localize`Phone required for guests`,requireQuote:$localize`Estimated wait required for staff`,requireService:$localize`Service required for staff`,requireServicePublic:$localize`Service required for guests`,resourceAssignOnAlert:$localize`Assign resources on alert`,resourceCategoryDisplay:$localize`Resource category display`,resourceIsAwayReasonPresets:$localize`Away status presets`,savedReplies:$localize`Saved replies`,serviceCategoryDisplay:$localize`Service category display`,shortName:$localize`Location short name`,showBranding:$localize`Hide Waitwhile branding`,showCheckInWelcome:$localize`Show Welcome page`,showEmailConfirmationLink:$localize`Show email confirmation link`,showEmailQrCode:$localize`Show QR code in email`,showFirstLastName:$localize`Separate first and last name`,showGuestFieldsPublic:$localize`Show custom input field values`,showPublicBookingEndTime:$localize`Show booking start and end time in confirmation`,showPublicBookingStatusArrived:$localize`Allow customer to mark themselves as Arrived`,showPublicBookingStatusDelayed:$localize`Allow customer to mark themselves as Delayed`,showPublicBookingStatusQR:$localize`Enabled for bookings`,showPublicBookingUnavailableNotice:$localize`Show notice if no times are available within 30 days`,showPublicCheckInResourceEstWait:$localize`Show resource wait time`,showPublicConvertBooking:$localize`Allow customer to convert their visit to a booking`,showPublicGuestEstWaitTime:$localize`Show estimated wait time`,showPublicKioskRegistrationQR:$localize`Show QR code`,showPublicNameAs:$localize`Customer identifier`,showPublicRegistrationModeSelector:$localize`Show waitlist and bookings separated`,showPublicResourcesAsSeparateSteps:$localize`Display resources as separate steps`,showPublicServiceDuration:$localize`Show service duration`,showPublicServiceEstWait:$localize`Show service wait time`,showPublicServicePrice:$localize`Show service price`,showPublicStatusArrived:$localize`Allow customer to mark themselves as Arrived`,showPublicStatusDelayed:$localize`Allow customer to mark themselves as Delayed`,showPublicWaitlistJoinButton:$localize`Show "Join waitlist" button`,showPublicWaitlistPartySize:$localize`Show party size`,showPublicWaitlistResources:$localize`Show selected resources`,showPublicWaitlistServices:$localize`Show selected services`,showPublicWaitlistStatusQR:$localize`Enabled for waitlist`,showResources:$localize`Enable resources`,showServices:$localize`Enable services`,showStatusPageEditDetailsBooking:$localize`Allow customers to edit their details`,showStatusPageEditDetailsWaitlist:$localize`Allow customers to edit their details`,showStatusPageTicketBooking:$localize`Show Ticket-style confirmation for bookings on mobile`,showStatusPageTicketWaitlist:$localize`Show Ticket-style confirmation for waitlist on mobile`,showWaitlistTicket:$localize`Enable ticket IDs`,smsSignupAction:$localize`SMS signup action`,smsSignupText:$localize`SMS signup message text`,theme:$localize`Theme`,timezone:$localize`Time zone`,useAccountTheme:$localize`Use account theme`,useAddressCoordinates:$localize`Manually set coordinates`,visitQrCodeAction:$localize`Action when scanning`,visitTagRules:$localize`Prioritize customers where`,waitEstimationMethod:$localize`Wait time estimation`,waitlistAllowConfirm:$localize`Allow alerted customer to confirm their visit`,waitlistHours:$localize`Waitlist hours`,waitlistHoursByDate:$localize`Waitlist hours by date`,waitlistRejectUnknownCustomers:$localize`Allow only existing customers to join`,website:$localize`Website`},Va=new Set(Mt(jo).filter(([i,m])=>m).map(([i])=>i)),ca=["userId"],_a=["sessions"],ua=Object.entries($t).filter(([i,m])=>m==="INDIVIDUAL").map(([i])=>i),pa=Object.entries($t).filter(([i,m])=>m==="CATEGORY").map(([i])=>i),ma=Object.entries(vt).filter(([i,m])=>m==="INDIVIDUAL").map(([i])=>i),Sa=Object.entries(vt).filter(([i,m])=>m==="CATEGORY").map(([i])=>i),da={location:$localize`Location`,file:$localize`File`},Ca={locations:$localize`Locations`,file:$localize`File`},ga={all:$localize`All settings`,selected:$localize`Selected settings`,none:$localize`None`}
1,qa={address:"location-details",allowIncomingMessages:"messages",allowMultipleServices:"service-options",allowPublicAccountSignup:"registration",allowPublicAccountView:"public-display",allowSMSSignup:"registration",appAwayTimeout:"resource-options",autoCompleteServing:"automation",bookingAllowCancel:"bookings",bookingAllowConfirm:"bookings",bookingAllowManualDuration:"bookings",bookingAllowManualStartTime:"bookings",bookingAllowOverbooking:"bookings",bookingAllowReschedule:"bookings",bookingCalendarStartDay:"bookings",bookingCheckinToWaitlist:"automation",bookingCountPartiesAsMultipleSpots:"bookings",bookingHours:"hours",bookingHoursByDate:"hours",bookingManualConfirmation:"bookings",bookingMaxNotice:"bookings",bookingMinNotice:"bookings",bookingRejectUnknownCustomers:"bookings",bookingShowFirstAvailableDate:"public-display",bookingShowOnlyToday:"bookings",bookingSpotsPerSlot:"bookings",bookingSyncWaiting:"automation",bookingSyncWaitingEnabled:"automation",bookingTimeSlotIncr:"bookings",bookingUseResourceSpots:"bookings",bookingWaitlistOrder:"automation",businessName:"location-details",closeWaitlistOnceFull:"automation",coordinates:"location-details",currency:"localization",defaultVisitOrderValue:"service-options",displayName:"location-details",email:"location-details",enableBookingGeofence:"bookings",enablePendingVisitsBooking:"bookings",enableResourceAutoAway:"resource-options",enableWaitlistGeofence:"waitlist",expiryRules:"automation",externalCalendars:"integrations",externalCustomerIdValidation:"registration",geofenceMaxDistance:"customer-arrival",googleTagManager:"integrations",guestPageProgressIndicatorType:"public-display",hideCancelGuestPage:"waitlist",hideCheckinNumWaiting:"public-display",hideEstWaitCheckin:"waitlist",hidePartiesPublic:"public-display",hideWaitTimePublic:"public-display",hours:"hours",hoursByDate:"hours",i18n:"localization",isBookingActive:"bookings",isCustomerIdPublic:"registration",isEmailPublic:"registration",isGoogleWaitlist:"registration",isMaxCapacityActive:"waitlist",isNamePublic:"registration",isPartySizePublic:"registration",isPhonePublic:"registration",isPublicBooking:"registration",isPublicCheckIn:"registration",isPublicIndexed:"registration",isPublicSearch:"registration",isPublicSignin:"registration",isPublicWaitlist:"public-display",isQuotePublic:"public-display",isWaitlistActive:"waitlist",labels:"labels",logoUrl:"location-details",maxBookedCustomerVisits:"bookings",maxBookedCustomerVisitsPeriod:"bookings",maxPartySize:"waitlist",maxPartySizeBookings:"bookings",maxServing:"waitlist",maxServingActive:"waitlist",maxWaiting:"waitlist",maxWaitingActive:"waitlist",maxWaitingCustomerVisits:"waitlist",messagesArrivalPage:"custom-design",messagesBookingConfirmationInfo:"custom-design",messagesBookingPageConfirmation:"custom-design",messagesCheckinWelcome:"custom-design",messagesGuestPageInfo:"custom-design",messagesWaitlistWelcome:"custom-design",messagesWelcomePage:"custom-design",metadata:"location-details",name:"location-details",nextLocations:"automation",openWaitlistOnlyAtMaxCapacity:"waitlist",phone:"location-details",playSoundAddGuest:"messages",playSoundPublicWaitlistGuestAlerted:"public-display",publicAccountSignupContent:"custom-design",publicBookingRedirectLink:"registration",publicBookingShowNumSpots:"public-display",publicBookingUseLocalTimezone:"public-display",publicConfirmationResetTime:"registration",publicLocales:"localization",publicLogoUrl:"location-details",publicPageResetTime:"registration",publicTheme:"custom-design",publicWaitlistRedirectLink:"registration",qrServeBookingPostDurationLimit:"customer-arrival",qrServeBookingPreDurationLimit:"customer-arrival",qrServeWaitlistMaxPosition:"customer-arrival",quickVisitRules:"registration",quotedWaitIncrement:"waitlist",recaptchaMinScore:"registration",rejectFlaggedCustomers:"registration",requireCustomerId:"registration",requireCustomerIdPublic:"registration",requiredServiceCategoryIds:"service-options",requireEmail:"registration",requireEmailPublic:"registration",requireName:"registration",requireNamePublic:"registration",requireNotes:"registration",requirePartySize:"registration",requirePartySizePublic:"registration",requirePhone:"registration",requirePhonePublic:"registration",requireQuote:"waitlist",requireService:"service-options",requireServicePublic:"service-options",resourceAssignOnAlert:"automation",resourceCategoryDisplay:"resource-options",resourceIsAwayReasonPresets:"resource-options",savedReplies:"saved-replies",serviceCategoryDisplay:"service-options",shortName:"location-detail
1s",showBranding:"custom-design",showCheckInWelcome:"registration",showEmailConfirmationLink:"registration",showEmailQrCode:"registration",showFirstLastName:"registration",showGuestFieldsPublic:"public-display",showPublicBookingEndTime:"public-display",showPublicBookingStatusArrived:"bookings",showPublicBookingStatusDelayed:"bookings",showPublicBookingStatusQR:"customer-arrival",showPublicBookingUnavailableNotice:"public-display",showPublicCheckInResourceEstWait:"resource-options",showPublicConvertBooking:"waitlist",showPublicGuestEstWaitTime:"public-display",showPublicKioskRegistrationQR:"registration",showPublicNameAs:"public-display",showPublicRegistrationModeSelector:"registration",showPublicResourcesAsSeparateSteps:"resource-options",showPublicServiceDuration:"service-options",showPublicServiceEstWait:"service-options",showPublicServicePrice:"service-options",showPublicStatusArrived:"waitlist",showPublicStatusDelayed:"waitlist",showPublicWaitlistJoinButton:"public-display",showPublicWaitlistPartySize:"public-display",showPublicWaitlistResources:"public-display",showPublicWaitlistServices:"public-display",showPublicWaitlistStatusQR:"customer-arrival",showResources:"resource-options",showServices:"service-options",showStatusPageEditDetailsBooking:"bookings",showStatusPageEditDetailsWaitlist:"waitlist",showStatusPageTicketBooking:"public-display",showStatusPageTicketWaitlist:"public-display",showWaitlistTicket:"registration",smsSignupAction:"registration",smsSignupText:"registration",theme:"custom-design",timezone:"localization",useAccountTheme:"custom-design",useAddressCoordinates:"location-details",visitQrCodeAction:"customer-arrival",visitTagRules:"automation",waitEstimationMethod:"waitlist",waitlistAllowConfirm:"waitlist",waitlistHours:"hours",waitlistHoursByDate:"hours",waitlistRejectUnknownCustomers:"waitlist",website:"location-details"},Ta={automation:{category:{label:$localize`Automation`,description:$localize`Settings for automated operations`},properties:U("automation")},bookings:{category:{label:$localize`Bookings`,description:$localize`Booking options and rules`},properties:U("bookings")},"custom-design":{category:{label:$localize`Custom design`,description:$localize`Custom theme and content`},properties:U("custom-design")},"customer-arrival":{category:{label:$localize`Customer arrival`,description:$localize`Settings related to the customer arrival experience`},properties:U("customer-arrival")},integrations:{category:{label:$localize`Integrations`,description:$localize`Settings for integrating third-party apps`},properties:U("integrations")},labels:{category:{label:$localize`Labels`,description:$localize`Labels for organizing your locations`},properties:U("labels")},localization:{category:{label:$localize`Localization`,description:$localize`Languages, time zone, currency, and business terms`},properties:U("localization")},"location-details":{category:{label:$localize`Location details`,description:$localize`General details and contact information`},properties:U("location-details")},messages:{category:{label:$localize`Messages`,description:$localize`Properties related to customer communication`},properties:U("messages")},hours:{category:{label:$localize`Location opening hours`,description:$localize`Location opening hours in local time zone`},properties:U("hours")},"public-display":{category:{label:$localize`Public displays`,description:$localize`Settings for public-facing displays`},properties:U("public-display")},registration:{category:{label:$localize`Public registration`,description:$localize`General settings for your public customers registration`},properties:U("registration")},"resource-options":{category:{label:$localize`Resource options`,description:$localize`Settings for how resources are displayed and assigned`},properties:U("resource-options")},"saved-replies":{category:{label:$localize`Saved replies`,description:$localize`Saved replies for two-way customer communication`},properties:U("saved-replies")},"service-options":{category:{label:$localize`Service options`,description:$localize`Settings for how services are displayed and assigned`},properties:U("service-options")}
1,waitlist:{category:{label:$localize`Waitlist`,description:$localize`Waitlist options and rules`},properties:U("waitlist")}};function U(i){return Mt(qa).filter(([m,e])=>e===i).map(([m])=>m).filter(m=>Va.has(m)).sort((m,e)=>Pe[m].localeCompare(Pe[e]))}var fa=i=>({type:"location",locationId:i}),Qa=(i,m)=>m.id;function Ka(i,m){if(i&1&&S(0,"ww-icon",43),i&2){let e=O(2).$implicit;_("wwTooltip",e.category.description)}}function Za(i,m){if(i&1&&(r(0,"div",42)(1,"span"),$e(2),s(),y(3,Ka,1,1,"ww-icon",43),s()),i&2){let e=O().$implicit;c(2),ze(e.category.label),c(),A(e.category.description?3:-1)}}function es(i,m){if(i&1&&(r(0,"div",39),S(1,"ww-checkbox",41),W(2,Za,4,2,"ng-template",null,0,ne),s()),i&2){let e=m.$implicit,o=j(3);c(),_("label",o)("formControl",e.formControl)("layout","vertical")}}function ts(i,m){if(i&1&&(r(0,"div",37)(1,"h5"),T(2,14),s(),r(3,"div",38),xe(4,es,4,3,"div",39,Qa),s()(),S(6,"ww-select",40)),i&2){let e=O();c(4),De(e.locationPropertyPresets),c(2),_("selection","multiple")("data",e.locationProperties)("groupBy",e.groupLocationPropertiesByCategory)("pluckLabel",e.pluckPropertyLabel)("layout","vertical")("withSelectAllOption",!0)("formControl",e.locationPropertiesFormControl)}}function os(i,m){i&1&&(r(0,"div",42)(1,"span"),T(2,15),s(),S(3,"ww-icon",45),s())}function is(i,m){if(i&1&&(S(0,"ww-checkbox",41),W(1,os,4,0,"ng-template",null,1,ne),S(3,"ww-checkbox",44)),i&2){let e=j(2),o=O();_("label",e)("formControl",o.dataFieldCreateLocalCopyFormControl)("layout","vertical"),c(3),_("formControl",o.deleteDataFieldsFormControl)("layout","vertical")}}function ns(i,m){i&1&&(r(0,"div",42)(1,"span"),T(2,16),s(),S(3,"ww-icon",48),s())}function as(i,m){if(i&1&&S(0,"ww-resource-select",47),i&2){let e=O(2);_("formControl",e.resourceIdsFormControl)("selection","multiple")("layout","vertical")("type","children")("source",_e(5,fa,e.sourceLocationId))}}function ss(i,m){if(i&1&&(S(0,"ww-checkbox",41),W(1,ns,4,0,"ng-template",null,2,ne),S(3,"ww-checkbox",46),y(4,as,1,7,"ww-resource-select",47)),i&2){let e=j(2),o=O();_("label",e)("formControl",o.resourceCreateLocalCopyFormControl)("layout","vertical"),c(3),_("formControl",o.deleteResourcesFormControl)("layout","vertical"),c(),A(o.sourceLocationId?4:-1)}}function ls(i,m){i&1&&(r(0,"div",42)(1,"span"),T(2,17),s(),S(3,"ww-icon",51),s())}function rs(i,m){if(i&1&&S(0,"ww-service-select",50),i&2){let e=O(2);_("formControl",e.serviceIdsFormControl)("selection","multiple")("layout","vertical")("type","children")("source",_e(5,fa,e.sourceLocationId))}}function cs(i,m){if(i&1&&(S(0,"ww-checkbox",41),W(1,ls,4,0,"ng-template",null,3,ne),S(3,"ww-checkbox",49),y(4,rs,1,7,"ww-service-select",50)),i&2){let e=j(2),o=O();_("label",e)("formControl",o.serviceCreateLocalCopyFormControl)("layout","vertical"),c(3),_("formControl",o.deleteServicesFormControl)("layout","vertical"),c(),A(o.sourceLocationId?4:-1)}}function _s(i,m){i&1&&(r(0,"div",42)(1,"span"),T(2,18),s(),S(3,"ww-icon",52),s())}function us(i,m){i&1&&(r(0,"div",42)(1,"span"),T(2,19),s(),S(3,"ww-icon",53),s())}function ps(i,m){if(i&1&&(r(0,"div",33),S(1,"ww-checkbox",41),W(2,_s,4,0,"ng-template",null,4,ne),S(4,"ww-checkbox",41),W(5,us,4,0,"ng-template",null,5,ne),s()),i&2){let e=j(3),o=j(6),t=O();c(),_("label",e)("formControl",t.includeMessageTemplatesFormControl)("layout","vertical"),c(3),_("label",o)("formControl",t.includeMessageConfigsFormControl)("layout","vertical")}}function ms(i,m){i&1&&(r(0,"div",42)(1,"span"),T(2,20),s(),S(3,"ww-icon",55),s())}function Ss(i,m){if(i&1&&(S(0,"ww-select",54),W(1,ms,4,0,"ng-template",null,6,ne)),i&2){let e=j(2),o=O();_("label",e)("layout","vertical")("selection","multiple")("formControl",o.customerMessagesTypeFormControl)("data",o.customerMessagesTypes)("pluckLabel",o.pluckCustomerMessagesTypeLabel)("groupBy",o.groupMessageTypesByCategory)}}function ds(i,m){if(i&1&&(S(0,"ww-checkbox",56)(1,"ww-select",57),h(2,"async"),r(3,"ww-info-bubble"),T(4,21),s()),i&2){let e=O();_("formControl",e.deleteMessageTemplatesFormControl)("layout","vertical"),c(),_("layout","vertical")("selection","multiple")("formControl",e.messageTemplateLanguagesFormControl)("data",I(2,7,e.messageTemplateLanguages$))("pluckLabel",e.pluckMessageTemplateLanguageLabel)}}function Cs(i,m){if(i&1&&S(0,"ww-checkbox",35),i&2){let e=O();_("formControl",e.deleteDisplaySettingsFormControl)("layout","vertical")}}function gs(i,m){if(i&1&&(S(0,"ww-select",58),h(1,"async"),r(2,"ww-info-bubble"),T(3,22),s()),i&2){let e=O();_("layout","vertical")("withSelectAllOption",!0)("data",I(1,7,e.publicLocales$))("pluckLabel",e.pluckPublicLocaleLabel)("formControl",e.customerJourneyLocalesFormControl)("openDisabled",e.customerJourneyLocalesFormControl.disabled)("readonly",e.customerJourneyLocalesFormControl.disabled)}}var Gt=(()=>{class i extends oe{constructor(){super(),this.sourceLocationId=null,this.publicLocales=null,this.publicLocales$=this.observe("publicLocales"),this.scopeLocationPropertiesFormControl=new g("none",{nonNullable:!0}),this.locationPropertiesFormControl=new g([],{nonNullable:!0}),this.locationPropertyPresets=Object.entries(Ta).filter(([e,o])=>o.properties.length>0).map(([e,o])=>X(k({},o),{id:e,formControl:new g(!1,{nonNullable:!0})}
1)).sort((e,o)=>e.category.label.localeCompare(o.category.label)),this.locationProperties=this.locationPropertyPresets.flatMap(e=>e.properties).sort((e,o)=>Pe[e].localeCompare(Pe[o])),this.includeCustomerJourneyLocalizationFormControl=new g(!1,{nonNullable:!0}),this.includeDataFieldsFormControl=new g(!1,{nonNullable:!0}),this.includeResourcesFormControl=new g(!1,{nonNullable:!0}),this.includeServicesFormControl=new g(!1,{nonNullable:!0}),this.includeCustomerMessagesFormControl=new g(!1,{nonNullable:!0}),this.includeMessageConfigsFormControl=new g(!1,{nonNullable:!0}),this.includeMessageTemplatesFormControl=new g(!1,{nonNullable:!0}),this.includeDisplaySettingsFormControl=new g(!1,{nonNullable:!0}),this.deleteDataFieldsFormControl=new g(!1,{nonNullable:!0}),this.deleteResourcesFormControl=new g(!1,{nonNullable:!0}),this.deleteServicesFormControl=new g(!1,{nonNullable:!0}),this.deleteMessageTemplatesFormControl=new g(!1,{nonNullable:!0}),this.deleteDisplaySettingsFormControl=new g(!1,{nonNullable:!0}),this.dataFieldCreateLocalCopyFormControl=new g(!0,{nonNullable:!0}),this.resourceCreateLocalCopyFormControl=new g(!0,{nonNullable:!0}),this.serviceCreateLocalCopyFormControl=new g(!0,{nonNullable:!0}),this.customerJourneyLocalesFormControl=new g([],{nonNullable:!0}),this.dataFieldIdsFormControl=new g([]),this.messageTemplateLanguagesFormControl=new g([]),this.customerMessagesTypeFormControl=new g([]),this.resourceIdsFormControl=new g([]),this.serviceIdsFormControl=new g([]),this.propertyScopes=zo()(["all","selected","none"]),this.messageTemplateLanguages$=this.publicLocales$.pipe(E(e=>e?bt(e.map(o=>di(o))):[])),this.customerMessagesTypes=Si,this.groupMessageTypesByCategory=e=>mi.includes(e)?{id:"customer",index:0,label:$localize`Customer messages`}:{id:"team",index:1,label:$localize`Team notifications`},this.pluckMessageTemplateLanguageLabel=e=>Do(e)?.languageName??e,this.pluckCustomerMessagesTypeLabel=e=>Jo[e],this.pluckScopePropertiesLabel=e=>ga[e],this.pluckPropertyLabel=e=>Pe[e]??e,this.groupLocationPropertiesByCategory=e=>{let o=this.locationPropertyPresets.findIndex(n=>n.properties.includes(e)),t=this.locationPropertyPresets[o];return t?{id:t.id,index:o,label:t.category.label}:{id:"",label:$localize`Other`}},this.pluckPublicLocaleLabel=e=>{let o=xo(e);return o?`${o.languageName} (${o.countryCode})`:e},this.options$=V({deleteDataFields:N(this.deleteDataFieldsFormControl),deleteResources:N(this.deleteResourcesFormControl),deleteServices:N(this.deleteServicesFormControl),deleteMessageTemplates:N(this.deleteMessageTemplatesFormControl),deleteDisplaySettings:N(this.deleteDisplaySettingsFormControl),includeCustomerJourneyLocalizations:N(this.includeCustomerJourneyLocalizationFormControl),includeDataFields:N(this.includeDataFieldsFormControl),includeResources:N(this.includeResourcesFormControl),includeServices:N(this.includeServicesFormControl),includeCustomerMessages:N(this.includeCustomerMessagesFormControl),includeMessageConfigs:N(this.includeMessageConfigsFormControl),includeMessageTemplates:N(this.includeMessageTemplatesFormControl),includeDisplaySettings:N(this.includeDisplaySettingsFormControl),dataFieldCreateLocalCopy:N(this.dataFieldCreateLocalCopyFormControl),resourceCreateLocalCopy:N(this.resourceCreateLocalCopyFormControl),serviceCreateLocalCopy:N(this.serviceCreateLocalCopyFormControl),locationProperties:V([N(this.locationPropertiesFormControl),N(this.scopeLocationPropertiesFormControl)]).pipe(E(([e,o])=>o==="selected"?e:o==="none"?[]:this.locationProperties)),customerJourneyLocales:N(this.customerJourneyLocalesFormControl),dataFieldIds:N(this.dataFieldIdsFormControl),messageConfigTypes:V([N(this.includeMessageConfigsFormControl),N(this.customerMessagesTypeFormControl)]).pipe(E(([e,o])=>e?o:null)),messageTemplateLanguages:N(this.messageTemplateLanguagesFormControl),messageTemplateTypes:V([N(this.includeMessageTemplatesFormControl),N(this.customerMessagesTypeFormControl)]).pipe(E(([e,o])=>e?o:null)),resourceIds:N(this.resourceIdsFormControl),serviceIds:N(this.serviceIdsFormControl)}),this.subscribe()}subscribe(){for(let e of this.locationPropertyPresets)e.formControl.valueChanges.pipe(x(this.ngOnDestroy$)).subscribe(o=>{o?this.locationPropertiesFormControl.setValue(bt([...this.locationPropertiesFormControl.value,...e.properties])):this.locationPropertiesFormControl.setValue(this.locationPropertiesFormControl.value.filter(t=>!e.properties.includes(t)))});this.locationPropertiesFormControl.valueChanges.pipe(x(this.ngOnDestroy$)).subscribe(()=>{for(let e of this.locationPropertyPresets)e.formControl.setValue(e.properties.every(o=>this.locationPropertiesFormControl.value.includes(o)),{emitEvent:!1})}),this.includeCustomerJourneyLocalizationFormControl.valueChanges.pipe(ie(!1),x(this.ngOnDestroy$)).subscribe(e=>{e?(this.customerJourneyLocalesFormControl.enable(),this.customerJourneyLocalesFormControl.setValue(this.publicLocales??[])):(this.customerJourneyLocalesFormControl.disable(),this.customerJourneyLocalesFormControl.setValue([]))})}ngOnChanges(e){e.sourceLocationId&&(this.resourceIdsFormControl.setValue([],{emitEvent:!1}),this.serviceIdsFormControl.setValue([],{emitEvent:!1}))}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ww-locations-copy-settings-options-form"]],hostAttrs:[1,"ww-locations-copy-settings-options-form"],inputs:{sourceLocationId:"sourceLocationId",publicLocales:"publicLocales"},outputs:{options$:"optionsChanged"},standalone:!1,features:[B,fo],decls:46,vars:26,consts:()=>{let e;e=$localize`Include input fields`;let o;o=$localize`Include resources`;let t;t=$localize`Include services`;let n;n=$localize`Include customer messages`;let p;p=$localize`Include display settings`;let C;C=$localize`Delete existing display settings on target location`;let u;u=$localize`Include customer journey localization`;let F;F=$localize`Location settings`;let l;l=$localize`Input fields`;let d;d=$localize`Resources`;let R;R=$localize`Services`;let P;P=$localize`Customer messages`;let Y;Y=$localize`Display settings`;let b;b=$localize`Customer journey localization`;let L;L=$localize`Properties`;let le;le=$localize`Select settings`;let Se;Se=$localize`Delete existing input fields on target location`;let Ut;Ut=$localize`When unchecked, input fields will be shared across locations`;let Yt;Yt=$localize`Create local copies of input fields`;let Xt;Xt=$localize`Delete existing resources on target location`;let Vt;Vt=$localize`Select resources`;let qt;qt=$localize`All resources`;let jt;jt=$localize`When unchecked, resources will be shared across locations`;let Ht;Ht=$localize`Create local copies of resources`;let Jt;Jt=$localize`Delete existing services on target location`;let Qt;Qt=$localize`Select services`;let Kt;Kt=$localize`All services`;let Zt;Zt=$localize`When unchecked, services will be shared across locations`;let eo;eo=$localize`Create local copies of services`;let to;to=$localize`When checked, message content will be copied`;let oo;oo=$localize`Include message content`;let io;io=$localize`When checked, message settings will be copied`;let no;no=$localize`Include message settings`;let ao;ao=$localize`All messages`;let so;so=$localize`Select which message types content and settings are copied for`;let lo;lo=$localize`Select message types`;let ro;ro=$localize`Delete existing message content on target location`;let co;co=$localize`Select message content languages`;let _o;_o=$localize`All languages`;let uo;uo=$localize` Only templates for languages available on the target location will be included. `;let po;po=$localize`Languages`;let mo;
1return mo=$localize` This will overwrite existing customer journey localizations. `,[["locationPropertyPresetLabel",""],["dataFieldCreateLocalCopiesLabel",""],["resourcesCreateLocalCopiesLabel",""],["servicesCreateLocalCopiesLabel",""],["messageContentLabel",""],["messageSettingsLabel",""],["messageTypesLabel",""],F,l,d,R,P,Y,b,le,Yt,Ht,eo,oo,no,lo,uo,mo,[1,"flex","flex-col","gap-6"],[1,"flex","flex-col","gap-4","max-w-full"],[3,"ariaLabel","formControl","data","pluckLabel","layout"],[1,"flex","flex-col","gap-2"],["label",e,3,"formControl","layout"],["label",o,3,"formControl","layout"],["label",t,3,"formControl","layout"],[1,"flex","flex-col","gap-2","max-w-full"],[1,"flex","flex-col","gap-1"],["label",n,3,"formControl","layout"],[1,"flex","flex-col","gap-1","pl-8"],["label",p,3,"formControl","layout"],["label",C,3,"formControl","layout"],["label",u,3,"formControl","layout"],[1,"flex","flex-col"],[1,"ww-locations-copy-settings-options-form-location-property-presets"],[1,"flex","flex-row","items-center","gap-2"],["label",L,3,"selection","data","groupBy","pluckLabel","layout","withSelectAllOption","formControl"],[3,"label","formControl","layout"],[1,"flex","items-center","gap-2"],["icon","bx-info-circle","size","x-small","wwColor","darkerGrey",3,"wwTooltip"],["label",Se,3,"formControl","layout"],["icon","bx-info-circle","wwColor","darkerGrey","size","x-small","wwTooltip",Ut],["label",Xt,3,"formControl","layout"],["label",Vt,"emptySelectionTrigger",qt,3,"formControl","selection","layout","type","source"],["icon","bx-info-circle","wwColor","darkerGrey","size","x-small","wwTooltip",jt],["label",Jt,3,"formControl","layout"],["label",Qt,"emptySelectionTrigger",Kt,3,"formControl","selection","layout","type","source"],["icon","bx-info-circle","wwColor","darkerGrey","size","x-small","wwTooltip",Zt],["icon","bx-info-circle","wwColor","darkerGrey","size","x-small","wwTooltip",to],["icon","bx-info-circle","wwColor","darkerGrey","size","x-small","wwTooltip",io],["emptySelectionTrigger",ao,3,"label","layout","selection","formControl","data","pluckLabel","groupBy"],["icon","bx-info-circle","wwColor","darkerGrey","size","x-small","wwTooltip",so],["label",ro,3,"formControl","layout"],["label",co,"emptySelectionTrigger",_o,3,"layout","selection","formControl","data","pluckLabel"],["label",po,"selection","multiple",3,"layout","withSelectAllOption","data","pluckLabel","formControl","openDisabled","readonly"]]},template:function(o,t){o&1&&(r(0,"div",23)(1,"ww-label-layout")(2,"ww-label"),T(3,7),s(),r(4,"div",24),S(5,"ww-radio",25),y(6,ts,7,7),s()(),r(7,"ww-label-layout")(8,"ww-label"),T(9,8),s(),r(10,"div",26),S(11,"ww-checkbox",27),y(12,is,4,5),s()(),r(13,"ww-label-layout")(14,"ww-label"),T(15,9),s(),r(16,"div",26),S(17,"ww-checkbox",28),y(18,ss,5,6),s()(),r(19,"ww-label-layout")(20,"ww-label"),T(21,10),s(),r(22,"div",26),S(23,"ww-checkbox",29),y(24,cs,5,6),s()(),r(25,"ww-label-layout")(26,"ww-label"),T(27,11),s(),r(28,"div",30)(29,"div",31),S(30,"ww-checkbox",32),y(31,ps,7,6,"div",33),s(),y(32,Ss,3,7),y(33,ds,5,9),s()(),r(34,"ww-label-layout")(35,"ww-label"),T(36,12),s(),r(37,"div",30),S(38,"ww-checkbox",34),y(39,Cs,1,2,"ww-checkbox",35),s()(),r(40,"ww-label-layout")(41,"ww-label"),T(42,13),s(),r(43,"div",30),S(44,"ww-checkbox",36),y(45,gs,4,9),s()()()),o&2&&(c(5),_("ariaLabel","Location settings")("formControl",t.scopeLocationPropertiesFormControl)("data",t.propertyScopes)("pluckLabel",t.pluckScopePropertiesLabel)("layout","vertical"),c(),A(t.scopeLocationPropertiesFormControl.value==="selected"?6:-1),c(5),_("formControl",t.includeDataFieldsFormControl)("layout","vertical"),c(),A(t.includeDataFieldsFormControl.value?12:-1),c(5),_("formControl",t.includeResourcesFormControl)("layout","vertical"),c(),A(t.includeResourcesFormControl.value?18:-1),c(5),_("formControl",t.includeServicesFormControl)("layout","vertical"),c(),A(t.includeServicesFormControl.value?24:-1),c(6),_("formControl",t.includeCustomerMessagesFormControl)("layout","vertical"),c(),A(t.includeCustomerMessagesFormControl.value?31:-1),c(),A(t.includeCustomerMessagesFormControl.value&&(t.includeMessageConfigsFormControl.value||t.includeMessageTemplatesFormControl.value)?32:-1),c(),A(t.includeMessageTemplatesFormControl.value?33:-1),c(5),_("formControl",t.includeDisplaySettingsFormControl)("layout","vertical"),c(),A(t.includeDisplaySettingsFormControl.value?39:-1),c(5),_("formControl",t.includeCustomerJourneyLocalizationFormControl)("layout","vertical"),c(),A(t.includeCustomerJourneyLocalizationFormControl.value?45:-1))},dependencies:[ee,ce,Xn,Vn,si,oi,Oe,Te,fe,ri,et,Ee,Ke,H],styles:[`.ww-locations-copy-settings-options-form-location-property-presets{display:grid;grid-template-columns:1fr 1fr}.ww-breakpoints-below-mobile .ww-locations-copy-settings-options-form-location-property-presets{grid-template-columns:1fr}
2/*nooplocations-copy-settings-options-form.component-STSP3U47.css.map */
3`],encapsulation:2,changeDetection:0})}}return i})();var Ea=We(Wa()),La=We(Fa()),ha=We(xa()),Ia=We(Da());var Bt=(()=>{class i{constructor(){this.assetRx=a(Li),this.batchCreateDataFieldsWrite=a(it),this.batchCreateResourcesWrite=a(St),this.batchCreateServicesWrite=a(gt),this.batchDeleteDataFieldsWrite=a(nt),this.batchDeleteResourcesWrite=a(dt),this.batchDeleteServicesWrite=a(Tt),this.batchUpdateDataFieldsWrite=a(at),this.batchUpdateResourcesWrite=a(Ct),this.batchUpdateServicesWrite=a(Ot),this.copyLocationSettingsWrite=a(rt),this.coreDataFieldRx=a(Et),this.coreFileRx=a(Cn),this.coreLocationRx=a(ft),this.coreMessageConfigRx=a(gn),this.coreMessageTemplateRx=a(Tn),this.coreResourceRx=a(Lt),this.coreServiceRx=a(ht),this.createAssetWrite=a(tt),this.deleteAssetWrite=a(ot),this.deleteMessageTemplateWrite=a(_t),this.deleteTranslatedMessageTemplateWrite=a(ut),this.dialog=a(Ze),this.updateLocationWrite=a(Le),this.updateMessageConfigWrite=a(ct),this.updateMessageTemplateWrite=a(pt),this.updatePublicPagesI18nWr
3ite=a(st),this.updateTranslatedMessageTemplateWrite=a(mt),this.byChildrenFirst=(e,o)=>e.isCategory&&!o.isCategory?1:!e.isCategory&&o.isCategory?-1:0}copyToFile(e){Go(JSON.stringify(e,null,2),`settings-${e.location.id}.json`)}confirmCopy(){return $(this,null,function*(){return w(this.dialog.openConfirm({title:$localize`Copy settings`,message:$localize`Are you sure you want to copy these settings? This will overwrite settings and delete or unassign fields used by the target location.`,confirmLabel:$localize`Copy`,cancelLabel:$localize`Cancel`,confirmColor:"warning"}).afterClosed$)})}copyToLocation(e,o,t){return $(this,null,function*(){return this.copyLocationSettingsWrite.call(this.copySettingsOptionsToCopyLocationSettingsPayload(e,o,t))})}copyContentToLocation(e,o,t){return $(this,null,function*(){let n=o.dataFields.filter(l=>!t.dataFieldIds||t.dataFieldIds.length===0?!0:t.dataFieldIds.includes(l.id));n.length>0&&t.includeDataFields&&(t.dataFieldCreateLocalCopy?yield this.batchCreateDataFieldsWrite.call({items:n.map(l=>this.applySchema(l,Ea.PAYLOAD_SCHEMA)).map(l=>X(k({},l),{locationIds:[e]}))},!0):yield this.batchUpdateDataFieldsWrite.call({ids:n.map(l=>l.id),item:{addLocationIds:[e]}},!0));let p=o.resources.filter(l=>!t.resourceIds||t.resourceIds.length===0?!0:t.resourceIds.includes(l.id));if(p.length>0&&t.includeResources)if(t.resourceCreateLocalCopy){let l=p.map(L=>this.applySchema(L,ha.PAYLOAD_SCHEMA)).map(L=>{let le=L.isCategory?ua:pa,Se=[...ca,...le];return Pt(L,Se)}),d=l.filter(L=>L.isCategory),R=yield this.batchCreateResourcesWrite.call({items:d.map(L=>X(k({},L),{locationIds:[e]}),!0)}),P=At(R.results).map(L=>L.item).filter(ae),Y=l.filter(L=>!L.isCategory),b=[];for(let L of Y)b.push(X(k({},L),{locationIds:[e],parentId:P.find(le=>L.name&&le.name===o.resourceRelations[L.name])?.id}));yield this.batchCreateResourcesWrite.call({items:b},!0)}else{let l=o.resources;yield this.batchUpdateResourcesWrite.call({ids:l.map(d=>d.id),item:{addLocationIds:[e]}},!0)}if(o.services.filter(l=>!t.serviceIds||t.serviceIds.length===0?!0:t.serviceIds.includes(l.id)).length>0&&t.includeServices)if(t.serviceCreateLocalCopy){let l=o.services.map(L=>this.applySchema(L,Ia.PAYLOAD_SCHEMA)).map(L=>{let le=L.isCategory?ma:Sa,Se=[..._a,...le];return Pt(L,Se)}),d=l.filter(L=>L.isCategory),R=yield this.batchCreateServicesWrite.call({items:d.map(L=>X(k({},L),{locationIds:[e]}))},!0),P=At(R.results).map(L=>L.item).filter(ae),Y=l.filter(L=>!L.isCategory),b=[];for(let L of Y)b.push(X(k({},L),{locationIds:[e],parentId:P.find(le=>L.name&&le.name===o.serviceRelations[L.name])?.id}));yield this.batchCreateServicesWrite.call({items:b},!0)}else{let l=o.services;yield this.batchUpdateServicesWrite.call({ids:l.map(d=>d.id),item:{addLocationIds:[e]}},!0)}if(o.location&&t.locationProperties.length>0){let l=this.applySchema(o.location,La.PAYLOAD_SCHEMA);yield this.updateLocationWrite.call({locationId:e,updates:Uo(l,t.locationProperties)},!0)}let u=(o.messageConfigs??[]).filter(l=>!t.messageConfigTypes||t.messageConfigTypes.length===0?!0:t.messageConfigTypes.includes(l.type));if(u.length>0&&t.includeMessageConfigs)for(let l of u){let d=qo(l)?{channels:l.channels.filter(P=>P!=="CALL"),scheduleTimes:l.scheduleTimes,smsCondition:l.smsCondition,trigger:l.trigger,conditions:l.conditions}:{trigger:l.trigger,conditions:l.conditions},R=Rt(d,qe);yield this.updateMessageConfigWrite.call({locationId:e,messageType:l.type,updates:R},!0)}let F=o.messageTemplates.filter(l=>!t.messageTemplateTypes||t.messageTemplateTypes.length===0?!0:t.messageTemplateTypes.includes(l.messageType));if(F.length>0&&t.includeMessageTemplates){let l={locationId:e,updates:{}};for(let d of F){let R={locationId:e,messageType:d.messageType,updates:Wt(d.messageType)?Rt({channels:d.channels,scheduleTimes:d.scheduleTimes},qe):{}};(ae(d.subject)||ae(d.body)||ae(d.short)||ae(d.push))&&(d.language?yield this.updateTranslatedMessageTemplateWrite.call({locationId:e,language:d.language,messageType:d.messageType,updates:{body:d.body,subject:d.subject,push:d.push,short:d.short,whiteLabel:d.whiteLabel}},!0):yield this.updateMessageTemplateWrite.call({locationId:e,messageType:d.messageType,updates:{body:d.body,subject:d.subject,push:d.push,short:d.short,whiteLabel:d.whiteLabel}},!0));let P=[["WAITLIST-NEXT","emailNextTriggerPosition"],["WAITLIST-NEXT","smsNextTriggerPosition"],["WAITLIST-NEXT","nextTextPositionRelativeToResource"],["WAITLIST-NEXT","nextTextConfirm"]];for(let[Y,b]of P)d.messageType!==Y||qe(d[b])||(l.updates=X(k({},l.updates),{[b]:d[b]}));je(R.updates)||(yield this.updateMessageConfigWrite.call(R))}je(l.updates)||(yield this.updateLocationWrite.call(l))}if(o.displaySettings&&o.displaySettings.length>0&&t.includeDisplaySettings)for(let l of o.displaySettings)l.qualifier.locationId==="*"||l.qualifier.userId!=="*"||l.qualifier.namespace!=="fo"||(yield this.createAssetWrite.call({key:l.key,value:l.value,qualifier:X(k({},l.qualifier),{locationId:e})},!0));if(t.includeCustomerJourneyLocalizations)for(let[l,d]of Object.entries(o.customerJourneyLocalizations))t.customerJourneyLocales.includes(l)&&(yield this.updatePublicPagesI18nWr
3ite.call({locationId:e,locale:l,translations:d},!0))})}getContent(e){return $(this,null,function*(){let o=yield w(this.coreLocationRx.doc(e,[]));if(!o)return null;let t=yield w(this.coreServiceRx.collection(se([e]))),n=yield w(this.coreResourceRx.collection(se([e]))),p=yield w(this.coreDataFieldRx.collection(se([e]))),C=yield w(this.coreMessageConfigRx.collection(e)),u=yield w(this.coreMessageTemplateRx.collection(e)),F=yield w(this.assetRx.queryAssets({locationId:e,namespace:"fo"})),l={};for(let R of o.publicLocales){let P=yield w(this.coreFileRx.getGuestExperienceLocale(e,R));P&&!je(P)&&(l[R]=P)}let d={location:o,dataFields:p,resources:n,services:t,resourceRelations:{},serviceRelations:{},messageConfigs:C,messageTemplates:u,displaySettings:F,customerJourneyLocalizations:l};for(let R of n){let P=n.find(Y=>Y.id===R.parentId);P&&(d.resourceRelations[R.name]=P.name)}for(let R of t){let P=t.find(Y=>Y.id===R.parentId);P&&(d.serviceRelations[R.name]=P.name)}return d})}removeContent(e,o){return $(this,null,function*(){if(o.deleteDataFields&&o.includeDataFields){let t=yield w(this.coreDataFieldRx.collection(se([e]))),n=t.filter(C=>C.locationIds.length===1).map(C=>C.id);n.length>0&&(yield this.batchDeleteDataFieldsWrite.call(n,!0));let p=t.filter(C=>C.locationIds.length>1).map(C=>C.id);p.length>0&&(yield this.batchUpdateDataFieldsWrite.call({ids:p,item:{removeLocationIds:[e]}},!0))}if(o.deleteResources&&o.includeResources){let n=(yield w(this.coreResourceRx.collection(se([e])))).sort(this.byChildrenFirst),p=n.filter(u=>u.locationIds.length===1).map(u=>u.id);p.length>0&&(yield this.batchDeleteResourcesWrite.call(p));let C=n.filter(u=>u.locationIds.length>1).map(u=>u.id);C.length>0&&(yield this.batchUpdateResourcesWrite.call({ids:C,item:{removeLocationIds:[e]}}))}if(o.deleteServices&&o.includeServices){let n=(yield w(this.coreServiceRx.collection(se([e])))).sort(this.byChildrenFirst),p=n.filter(u=>u.locationIds.length===1).map(u=>u.id);p.length>0&&(yield this.batchDeleteServicesWrite.call(p,!0));let C=n.filter(u=>u.locationIds.length>1).map(u=>u.id);C.length>0&&(yield this.batchUpdateServicesWrite.call({ids:C,item:{removeLocationIds:[e]}},!0))}if(o.deleteMessageTemplates&&o.includeMessageTemplates){let t=yield w(this.coreMessageTemplateRx.collection(e));for(let n of t)(ae(n.subject)||ae(n.body)||ae(n.push)||ae(n.short))&&(n.language?yield this.deleteTranslatedMessageTemplateWrite.call({locationId:e,language:n.language,messageType:n.messageType},!0):yield this.deleteMessageTemplateWrite.call({locationId:e,messageType:n.messageType},!0)),n.channels.length>0&&Wt(n.messageType)&&(yield this.updateMessageConfigWrite.call({locationId:e,messageType:n.messageType,updates:{channels:[]}},!0))}if(o.deleteDisplaySettings&&o.includeDisplaySettings){let t=yield w(this.assetRx.queryAssets({locationId:e,namespace:"fo"}));for(let n of t)yield this.deleteAssetWrite.call({id:n.id,key:n.key,scope:"location"},!0)}if(o.includeCustomerJourneyLocalizations)for(let t of o.customerJourneyLocales)yield this.updatePublicPagesI18nWr
3ite.call({locationId:e,locale:t,translations:{}},!0)})}applySchema(e,o){if(!e)return null;let t={};if(!o.keys)return t;for(let[n,p]of Object.entries(e)){let C=o.keys[n];if(C&&!(p===null&&!C.allow?.includes(null))&&!(p===""&&Yn(C,"uri"))&&(typeof p=="object"&&kn(C)?t[n]=this.applySchema(p,C):!p&&Un(C)?t[n]=[]:t[n]=p,o.dependencies))for(let u of o.dependencies){if(u.rel==="xor"&&u.peers&&u.peers.filter(l=>l in t).length>1)for(let l=1;l<u.peers.length;l++)delete t[u.peers[l]];if(u.rel==="oxor"&&u.peers&&u.peers.filter(l=>l in t).length>1)for(let l=1;l<u.peers.length;l++)delete t[u.peers[l]]}}return t}copySettingsOptionsToCopyLocationSettingsPayload(e,o,t){return{locationId:e,payload:{copyAssets:t.includeDisplaySettings,copyDataFields:this.getCopyOperation(t.includeDataFields,t.dataFieldCreateLocalCopy),copyI18nLocales:t.customerJourneyLocales,copyMessageConfigs:this.getCopyMessageConfigsOperation(t.includeMessageConfigs,t.messageConfigTypes),copyMessageTemplates:t.includeMessageTemplates,copyResources:this.getCopyOperation(t.includeResources,t.resourceCreateLocalCopy),copyServices:this.getCopyOperation(t.includeServices,t.serviceCreateLocalCopy),copySettings:t.locationProperties.length>0?t.locationProperties:void 0,dataFields:t.dataFieldIds&&t.dataFieldIds.length>0?t.dataFieldIds:void 0,excludeI18nFiles:!t.includeCustomerJourneyLocalizations,messageTemplateLanguages:t.messageTemplateLanguages&&t.messageTemplateLanguages.length>0?t.messageTemplateLanguages:void 0,messageTemplateTypes:t.messageTemplateTypes&&t.messageTemplateTypes.length>0?t.messageTemplateTypes:void 0,resources:t.resourceIds&&t.resourceIds.length>0?t.resourceIds:void 0,services:t.serviceIds&&t.serviceIds.length>0?t.serviceIds:void 0,sourceLocationId:o}}}getCopyOperation(e,o){return e?o?"COPY":"ASSIGN":!1}getCopyMessageConfigsOperation(e,o){return e?o&&o.length>0?o:!0:!1}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275prov=Ce({token:i,factory:i.\u0275fac})}}return i})();function Os(i,m){if(i&1){let e=z();r(0,"ww-file-picker",14),M("fileSelected",function(t){D(e);let n=O();return G(n.onFileSelected(t))}),s()}}function fs(i,m){if(i&1&&S(0,"ww-location-select",8),i&2){let e=O();_("layout","vertical")("formControl",e.sourceLocationIdFormControl)("selection","single")("label",null)("placeholder","Select location")}}function Es(i,m){if(i&1&&S(0,"ww-location-advanced-select",11),i&2){let e=O();_("selection","multiple")("layout","vertical")("placeholder","Select locations")("formControl",e.targetLocationIdsFormControl)}}function Ls(i,m){if(i&1){let e=z();r(0,"ww-locations-copy-settings-options-form",15),h(1,"async"),h(2,"async"),M("optionsChanged",function(t){D(e);let n=O();return G(n.onOptionsChanged(t))}),s()}if(i&2){let e=O();_("sourceLocationId",I(1,2,e.sourceLocationId$))("publicLocales",I(2,4,e.sourcePublicLocales$))}}var Na=(()=>{class i extends oe{constructor(){super(),this.layout=a(Q),this.coreLocationRx=a(ft),this.changeDetectorRef=a(Ue),this.eventLogger=a(Ni),this.locationsCopySettingsService=a(Bt),this.router=a(te),this.snackBar=a(li),this.copyingSub=new Me(!1),this.copying$=this.copyingSub.asObservable(),this.optionsSub=new Me(null),this.options$=this.optionsSub.asObservable(),this.fileContentSub=new Me(null),this.fileContent$=this.fileContentSub.asObservable(),this.sources=["location","file"],this.targets=["locations","file"],this.sourceFormControl=new g("location",{nonNullable:!0}),this.sourceLocationIdFormControl=new g(null),this.targetFormControl=new g("locations",{nonNullable:!0}),this.targetLocationIdsFormControl=new g([],{nonNullable:!0}),this.trackPendingChangesArray=new Po([this.sourceFormControl,this.sourceLocationIdFormControl,this.targetFormControl,this.targetLocationIdsFormControl]),this.source$=N(this.sourceFormControl),this.sourceLocationId$=N(this.sourceLocationIdFormControl),this.target$=N(this.targetFormControl),this.targetLocationIds$=N(this.targetLocationIdsFormControl),this.sourcePublicLocales$=this.source$.pipe(q(e=>e==="file"?this.fileContent$.pipe(E(o=>o?.location.publicLocales??null)):e==="location"?this.sourceLocationId$.pipe(q(o=>o?this.coreLocationRx.doc(o,["publicLocales"]).pipe(E(t=>t?.publicLocales??null)):re(null))):re(null))),this.pluckSourceLabel=e=>da[e],this.pluckTargetLabel=e=>Ca[e],this.queryParams$=ko(),this.queryParamSourceLocationId$=this.queryParams$.pipe(E(e=>e.sourceLocationId),Nt(yt),ie(null),this.shareReplay()),this.queryParamTargetLocationIds$=this.queryParams$.pipe(E(e=>e.targetLocationIds),Nt(yt),E(e=>e.split(",")),ie([]),this.shareReplay()),this.copyDisabled$=V([this.copying$,this.source$,this.sourceLocationId$,this.target$,this.targetL
3ocationIds$,this.fileContentSub,this.options$]).pipe(E(([e,o,t,n,p,C,u])=>e||o==="location"&&!t||o==="file"&&!C?!0:n==="file"?!1:p.length===0||!u?!0:!(u.locationProperties.length>0||u.includeDataFields||u.includeDisplaySettings||u.includeCustomerJourneyLocalizations||u.includeMessageConfigs||u.includeMessageTemplates||u.includeResources||u.includeServices)),ie(!0)),this.layout.setFeatureContext({name:$localize`Copy settings`,parentPath:"/account"}),this.subscribe()}onOptionsChanged(e){this.optionsSub.next(e)}onFileSelected(e){let o=new FileReader;o.onload=()=>$(this,null,function*(){let{result:t}=o;Bo(t)?(this.fileContentSub.next(JSON.parse(t)),this.changeDetectorRef.markForCheck()):(this.fileContentSub.next(null),this.snackBar.open({message:$localize`Invalid file format`}))}),o.readAsText(e)}copy(){return $(this,null,function*(){if(this.targetFormControl.value==="file"){let n=yield this.getContent();if(!n)return;this.copyingSub.next(!0),this.locationsCopySettingsService.copyToFile(n),this.eventLogger.log("account_location.copy_btn.copy_clicked",{params:{ww_custom_target:"file"}}),this.copyingSub.next(!1),this.snackBar.open({message:$localize`Settings successfully copied to file`});return}let e=yield w(this.options$);if(!e||!(yield this.locationsCopySettingsService.confirmCopy()))return;let t=new Me(1);this.snackBar.open({message:ue(Zo,{$rx:{component:t.pipe(E(n=>$localize`Copying settings to location ${n} of ${this.targetLocationIdsFormControl.value.length}...`))}}),duration:ia(1)}),this.copyingSub.next(!0);try{for(let n of this.targetLocationIdsFormControl.value)if(this.sourceFormControl.value==="file"){let p=yield this.getContent();if(!p){this.copyingSub.next(!1);return}yield this.locationsCopySettingsService.removeContent(n,e),yield this.locationsCopySettingsService.copyContentToLocation(n,p,e),t.next(Math.min(t.value+1,this.targetLocationIdsFormControl.value.length))}else{let p=this.sourceLocationIdFormControl.value;if(!p){this.copyingSub.next(!1);return}yield this.locationsCopySettingsService.removeContent(n,e),yield this.locationsCopySettingsService.copyToLocation(n,p,e),t.next(Math.min(t.value+1,this.targetLocationIdsFormControl.value.length))}this.eventLogger.log("account_location.copy_btn.copy_clicked",{params:{ww_custom_target:"location",ww_custom_target_count:this.targetLocationIdsFormControl.value.length}}),this.snackBar.open({message:$localize`Settings successfully copied`}),this.router.navigate(["/account/locations"])}finally{this.copyingSub.next(!1)}})}getContent(){return $(this,null,function*(){return this.sourceFormControl.value==="file"?this.fileContentSub.value:this.sourceFormControl.value==="location"&&this.sourceLocationIdFormControl.value?this.locationsCopySettingsService.getContent(this.sourceLocationIdFormControl.value):null})}subscribe(){this.queryParamSourceLocationId$.pipe(x(this.ngOnDestroy$)).subscribe(e=>{this.sourceLocationIdFormControl.setValue(e)}),this.queryParamTargetLocationIds$.pipe(x(this.ngOnDestroy$)).subscribe(e=>{this.targetLocationIdsFormControl.setValue(e)})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ng-component"]],hostAttrs:[1,"ww-locations-copy-settings"],standalone:!1,features:[ge([Bt,{provide:yi,useClass:zi},{provide:Fi,useClass:ki},{provide:Di,useClass:Ui},{provide:it,useClass:Zi},{provide:St,useClass:on},{provide:gt,useClass:sn},{provide:Ai,useClass:Yi},{provide:Wi,useClass:Xi},{provide:Gi,useClass:Vi},{provide:_t,useClass:qi},{provide:ut,useClass:ji},{provide:bi,useClass:Hi},{provide:Le,useClass:Ji},{provide:xi,useClass:Qi},{provide:Bi,useClass:Ki},{provide:ct,useClass:_n},{provide:pt,useClass:un},{provide:mt,useClass:pn},{provide:at,useClass:en},{provide:lt,useClass:tn},{provide:Ct,useClass:an},{provide:Ot,useClass:rn},{provide:nt,useClass:cn},{provide:dt,useClass:nn},{provide:Tt,useClass:ln},{provide:tt,useClass:mn},{provide:ot,useClass:Sn},{provide:st,useClass:dn}]),B],decls:20,vars:18,consts:()=>{let e;e=$localize`From location`;let o;o=$localize`To location`;let t;t=$localize` Easily apply settings from one location to others. You can copy location settings, resources, services, input fields, message templates, display settings and localization. `;let n;n=$localize`From`;let p;p=$localize`To`;let C;return C=$localize` Copy `,[t,n,p,C,["wwLayoutPadding","",1,"flex","flex-col","gap-6",3,"wwTrackPendingChanges","wwTrackPendingChangesOnce","wwTrackPendingChangesUntil"],[1,"max-w-3xl"],["wwFormFieldSize","large",1,"flex","flex-col","gap-4"],[3,"formControl","data","layout","pluckLabel"],["ariaLabel",e,3,"layout","formControl","selection","label","placeholder"],[1,"flex","flex-col","gap-4","max-w-full"],[3,"formControl","pluckLabel","data","layout"],["ariaLabel",o,3,"selection","layout","placeholder","formControl"],[3,"sourceLocationId","publicLocales"],["wwButton","primary",1,"self-start",3,"click","disabled"],[3,"fileSelected"],[3,"optionsChanged","sourceLocationId","publicLocales"]]},template:function(o,t){o&1&&(r(0,"div",4)(1,"div",5),T(2,0),s(),r(3,"ww-label-layout")(4,"ww-label"),T(5,1),s(),r(6,"div",6),S(7,"ww-radio",7),y(8,Os,1,0,"ww-file-picker"),y(9,fs,1,5,"ww-location-select",8),s()(),r(10,"ww-label-layout")(11,"ww-label"),T(12,2),s(),r(13,"div",9),S(14,"ww-radio",10),y(15,Es,1,4,"ww-location-advanced-select",11),s()(),y(16,Ls,3,6,"ww-locations-copy-settings-options-form",12),r(17,"button",13),h(18,"async"),M("click",function(){return t.copy()}),T(19,3),s()()),o&2&&(_("wwTrackPendingChanges",t.trackPendingChangesArray)("wwTrackPendingChangesOnce",!0)("wwTrackPendingChangesUntil",t.copying$),c(7),_("formControl",t.sourceFormControl)("data",t.sources)("layout","vertical")("pluckLabel",t.pluckSourceLabel),c(),A(t.sourceFormControl.value==="file"?8:-1),c(),A(t.sourceFormControl.value==="location"?9:-1),c(5),_("formControl",t.targetFormControl)("pluckLabel",t.pluckTargetLabel)("data",t.targets)("layout","vertical"),c(),A(t.targetFormControl.value==="locations"?15:-1),c(),A(t.targetLocationIdsFormControl.value.length>0?16:-1),c(),_("disabled",I(18,16,t.copyDisabled$)))},dependencies:[ee,ce,K,xn,ye,me,J,ci,ei,Oe,Te,et,Gt,H],encapsulation:2,changeDetection:0})}}return i})();function Is(i,m){if(i&1){let e=z();r(0,"div",1)(1,"form",2),M("submit",function(){D(e);
3let t=O();return G(t.save())}),S(2,"ww-label-form",3),s(),r(3,"div")(4,"button",4),M("click",function(){D(e);let t=O();return G(t.save())}),T(5,0),s()()()}if(i&2){let e=O();c(2),_("formControl",e.formControl)("wwTrackPendingChanges",e.formControl),c(2),_("disabled",e.formControl.invalid)}}var Ns=Je(He),wa=(()=>{class i extends Ns{constructor(){super(),this.layout=a(Q),this.locationRx=a(Oi),this.router=a(te),this.updateLocationWrite=a(Le),this.formControl=new g([],{nonNullable:!0}),this._entityIdQueryParamName="locationId",this._entityApi=e=>this.locationRx.getLocation(e,["labels","id","name"]),this.parentPath="account/locations",this.subscribe()}save(){return $(this,null,function*(){this._latestEntityId&&(this.updateLocationWrite.payload.next({locationId:this._latestEntityId,updates:{labels:this.formControl.value}}),yield w(this.updateLocationWrite.response$),yield w(So(200)),this.formControl.markAsPristine(),this.formControl.updateValueAndValidity(),this.router.navigate([this.parentPath]))})}subscribe(){this._loadedEntity$.pipe(x(this.ngOnDestroy$)).subscribe(e=>{if(!e){this.router.navigate([this.parentPath]);return}this.formControl.setValue(e.labels??[]),this.layout.setFeatureContext({name:$localize`${e.name} labels`,parentPath:this.parentPath})})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ww-locations-label-editor"]],hostAttrs:[1,"ww-locations-label-editor"],standalone:!1,features:[ge([we]),B],decls:2,vars:3,consts:()=>{let e;return e=$localize` Save `,[e,["wwLayoutPadding","",1,"flex","flex-col"],["wwForm","",3,"submit"],[3,"formControl","wwTrackPendingChanges"],["wwButton","primary",1,"mt-6",3,"click","disabled"]]},template:function(o,t){o&1&&(y(0,Is,6,3,"div",1),h(1,"async")),o&2&&A(I(1,1,t._entity$)?0:-1)},dependencies:[Xe,ee,Ye,ce,Ne,K,me,J,Qe,H],encapsulation:2,changeDetection:0})}}return i})();function ws(i,m){if(i&1){let e=z();r(0,"button",7),M("click",function(){D(e);let t=O();return G(t.delete())}),T(1,0),s()}}function ys(i,m){if(i&1){let e=z();r(0,"button",8),M("click",function(){D(e);let t=O();return G(t.save())}),T(1,1),s()}}var As=Je(He),ya=(()=>{class i extends As{constructor(){super(),this.deleteLabelWrite=a(Ri),this.labelRx=a(pe),this.layout=a(Q),this.replaceLabelWrite=a(Pi),this.router=a(te),this.formControl=new g(null),this.parentPath="account/locations/labels",this._entityIdQueryParamName="labelName",this._entityApi=e=>this.labelRx.getLabelGroup(e),this.subscribe()}delete(){return $(this,null,function*(){let e=yield w(this._entity$);e&&(this.deleteLabelWrite.payload.next({name:e.name}),yield w(this.deleteLabelWrite.response$),this.router.navigate([this.parentPath]))})}save(){return $(this,null,function*(){let e=yield w(this._entity$),o=this.formControl.value;if(!e||!o)return;e.name!==o.name&&this.replaceLabelWrite.payload.next({name:e.name,newName:o.name});let t=e.values.filter(n=>!o.values.includes(n));t.length>0&&this.deleteLabelWrite.payload.next({name:e.name,values:t}),yield w(de(this.replaceLabelWrite.response$,this.deleteLabelWrite.response$)),this.router.navigate([this.parentPath])})}subscribe(){this._loadedEntity$.pipe(x(this.ngOnDestroy$)).subscribe(e=>{if(!e){this.router.navigate(["account/locations"]);return}this.formControl.setValue(e),this.layout.setFeatureContext({name:$localize`Edit label ${e.name}`,parentPath:this.parentPath})})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ww-locations-label-group-editor"]],hostAttrs:[1,"ww-locations-label-group-editor"],standalone:!1,features:[B],decls:5,vars:3,consts:()=>{let e;e=$localize` Delete `;let o;return o=$localize` Save `,[e,o,["wwLayoutPadding","",1,"flex","flex-col","gap-6"],[3,"formControl"],[1,"flex","gap-3"],["wwButton","secondary",3,"click",4,"wwPermission"],["wwButton","primary",3,"click",4,"wwPermission"],["wwButton","secondary",3,"click"],["wwButton","primary",3,"click"]]},template:function(o,t){o&1&&(r(0,"div",2),S(1,"ww-label-group-form",3),r(2,"div",4),W(3,ws,2,0,"button",5)(4,ys,2,0,"button",6),s()()),o&2&&(c(),_("formControl",t.formControl),c(2),_("wwPermission","labels.delete"),c(),_("wwPermission","labels.update"))},dependencies:[ee,ce,Pn,K,Ie,J],encapsulation:2,changeDetection:0})}}return i})();var bs=i=>({labelName:i});function Rs(i,m){if(i&1){let e=z();r(0,"ww-call-out",9)(1,"ww-call-out-title"),T(2,0),s(),r(3,"ww-call-out-content",10)(4,"p"),T(5,1),s(),r(6,"ww-bullet-list",11)(7,"ww-bullet-list-item"),T(8,2),s(),r(9,"ww-bullet-list-item"),T(10,3),s(),r(11,"ww-bullet-list-item"),T(12,4),s(),r(13,"ww-bullet-list-item"),T(14,5),s(),r(15,"ww-bullet-list-item"),T(16,6),s()()(),r(17,"ww-call-out-actions")(18,"button",12),M("click",function(){D(e);
3let t=O();return G(t.openAddLabel())}),T(19,7),s()()()}i&2&&(_("backgroundColor","primary")("illustration","ww-labels"),c(6),_("icon","bx-check"))}function Ps(i,m){if(i&1&&(r(0,"a",13)(1,"ww-setting-card")(2,"ww-setting-card-header",14)(3,"ww-setting-card-title"),$e(4),s(),r(5,"ww-setting-card-suffix")(6,"div",15),$e(7),s(),S(8,"ww-icon",16),s()()()()),i&2){let e=m.$implicit;_("routerLink","edit")("queryParams",_e(4,bs,e.name)),c(4),ze(e.name),c(3),No(" ",e.summary," ")}}function Ms(i,m){if(i&1&&(r(0,"ww-setting-card")(1,"ww-setting-card-content"),xe(2,Ps,9,6,"a",13,Io),h(4,"async"),s()()),i&2){let e=O();c(2),De(I(4,0,e.items$))}}var ba=(()=>{class i extends oe{constructor(){super(),this.dialog=a(Ze),this.labelRx=a(pe),this.layout=a(Q),this.items$=this.labelRx.labelGroups$.pipe(E(e=>e.map(o=>{let t=o.values.slice(0,3),n=o.values.length>3?o.values.length-3:0,p=t.join(", ");return n>0&&(p=`${p} (+${n})`),X(k({},o),{summary:p})})),this.shareReplay()),this.empty$=this.items$.pipe(E(e=>e.length===0)),this.hasItems$=this.items$.pipe(E(e=>e.length>0)),this.layout.setFeatureContext({name:$localize`Location labels`,parentPath:"account/locations",addActions:[{label:$localize`Add label`,eventLoggerName:"opened_create_label",api:()=>this.openAddLabel()}]})}openAddLabel(){this.dialog.open(ue(Dn),{size:"medium"})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ww-locations-label-overview"]],hostAttrs:[1,"ww-locations-label-overview"],standalone:!1,features:[B],decls:4,vars:3,consts:()=>{let e;e=$localize` Organize your business with labels `;let o;o=$localize` Labels are a great way to organize your locations and segment your data. Some examples of how to use labels include: `;let t;t=$localize` Create your organizational structure (label regions, districts, areas) `;let n;n=$localize` If you use different locations for different types of guest experiences (e.g. events vs ongoing bookings), you can create labels for each experience type `;let p;p=$localize` Filter and segment your data by labels in analytics `;let C;C=$localize` Filter and view locations by labels in your locations overview `;let u;u=$localize` Filter and manage account users by labels `;let F;return F=$localize` Add label `,[e,o,t,n,p,C,u,F,["wwLayoutPadding","",1,"flex","flex-col"],[3,"backgroundColor","illustration"],[1,"flex","flex-col","gap-6"],[3,"icon"],["wwButton","primary",3,"click"],[3,"routerLink","queryParams"],[1,"!p-6"],[1,"min-w-0","overflow-hidden","text-ellipsis","whitespace-nowrap"],["icon","bx-chevron-right"]]},template:function(o,t){o&1&&(r(0,"div",8),y(1,Rs,20,3,"ww-call-out",9),h(2,"async"),ho(3,Ms,5,2,"ww-setting-card"),s()),o&2&&(c(),A(I(2,1,t.empty$)?1:3))},dependencies:[On,fn,En,Ln,K,ta,Kn,Qn,Zn,ea,ni,ai,J,fe,Ve,H],styles:[`.ww-locations-label-overview .ww-setting-card-content .ww-setting-card .ww-setting-card-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
4/*nooplocations-label-overview.component-WBHQAFB7.css.map */
5`],encapsulation:2,changeDetection:0})}}return i})();var Ra="location-active-status",kt="location-label";var Pa=(()=>{class i extends Rn{constructor(){let e=a(Oo);super(e),this.labelRx=a(pe),this.labelFilters$=this.labelRx.labelGroups$.pipe(E(o=>o.map(t=>({id:zn(t.name),name:t.name,categoryId:kt,type:"label",parse:n=>n,stringify:n=>n,pluckLabel:n=>`${t.name}: ${n}`,component:ue(Ee,{label:t.name,data:t.values,selection:"single",placeholder:$localize`Any`,pluckLabel:n=>n})})))),this.filters$=this.labelFilters$,this.labels$=this.state$.pipe(E(o=>o.filter(n=>n.source.categoryId===kt).map(n=>({name:n.source.name,value:n.value})))),this.activeStatus$=this.state$.pipe(E(o=>o.find(n=>n.source.categoryId===Ra)?.value)),this.injector=e}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275prov=Ce({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ma=(()=>{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ng-component"]],hostAttrs:[1,"flex","flex-col","gap-4","min-w-0"],standalone:!1,decls:1,vars:0,template:function(o,t){o&1&&S(0,"router-outlet")},dependencies:[Fo],encapsulation:2,changeDetection:0})}}return i})();var $a=(()=>{class i{constructor(){this.batchDeleteLocationsWrite=a($i),this.batchUpdateLocationsWrite=a(lt),this.copyLocationSettingsWrite=a(rt),this.routingService=a(wi),this.locationIdsFormControl=new g([],{nonNullable:!0}),this.subscribe()}subscribe(){de(this.routingService.featureChanged$,this.batchDeleteLocationsWrite.response$,this.batchUpdateLocationsWrite.response$,this.copyLocationSettingsWrite.response$).subscribe(()=>{this.locationIdsFormControl.setValue([],{emitEvent:!1})})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275prov=Ce({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var $s=()=>["id"],vs=()=>["labels.show"],Fs=i=>
5({permissions:i}),Ws=i=>({enabledConfig:i}),xs=()=>[10,25,50,100];function Ds(i,m){i&1&&(r(0,"a",11),S(1,"ww-icon",12),s()),i&2&&_("routerLink","labels")}function Gs(i,m){i&1&&(r(0,"ww-account-feature-button",13),S(1,"ww-icon",12),s())}function Bs(i,m){if(i&1&&(Ge(0),W(1,Ds,2,1,"a",10)(2,Gs,2,0,"ng-template",null,1,ne),Be()),i&2){let e=j(3);c(),_("wwAccountFeature","enableLabels")("wwAccountFeatureElse",e)}}function zs(i,m){i&1&&W(0,Bs,4,2,"ng-container",9),i&2&&_("wwLayoutTertiaryAction",_e(4,Ws,_e(2,Fs,ke(1,vs))))}function ks(i,m){if(i&1&&S(0,"ww-page-filter-button",6),i&2){let e=O();_("store",e.locationsFilterStore)("title",e.filterTitle)}}function Us(i,m){if(i&1){let e=z();r(0,"ww-page-search",14),M("searchChanged",function(t){D(e);let n=O();return G(n.searchQuerySub.next(t??""))}),s()}i&2&&_("defaultState","expanded")}function Ys(i,m){if(i&1){let e=z();r(0,"ww-paginator",15),h(1,"async"),h(2,"async"),M("page",function(t){D(e);let n=O();return G(n.pageEventSub.next(t))}),s()}if(i&2){let e=O();_("pageIndex",e.pageEventSub.value.pageIndex)("pageSize",e.pageEventSub.value.pageSize)("length",I(1,5,e.pageLength$))("disabled",I(2,7,e.isLoading$))("pageSizeOptions",ke(9,xs))}}function Xs(i,m){i&1&&S(0,"ww-empty-state",16)}function Vs(i,m){if(i&1&&(y(0,Xs,1,0,"ww-empty-state",16),h(1,"async")),i&2){let e=O();A(I(1,1,e.isEmpty$)?0:-1)}}var va=(()=>{class i extends Wn{constructor(){super(),this.layout=a(Q),this.locationsFilterStore=a(Pa),this.locationsService=a($a),this.batchLocationActions=a(Gn),this.commonDisplay=a(wn),this.decimalPipe=a(yo),this.plansRx=a(Ii),this.router=a(te),this.activeStatusFormControl=new g("active"),this.activeStatuses=Mn,this.filterTitle=$localize`Filter locations`,this.displayLocationOptions={badgeSize:"medium"},this.pluckActiveStatusLabel=e=>Ho[e],this.pluckActions$=this.locationItemRecord$.pipe(E(e=>o=>ue(xt,{locationCollectionItem:e[o]}))),this.constantColumns=[{key:"name",label:$localize`Name`,sortable:!0},{key:"numServing",label:$localize`Serving`,sortable:!0},{key:"numWaiting",label:$localize`Waiting`,sortable:!0},{key:"numBooked",label:$localize`Bookings`,sortable:!0},{key:"wait",label:$localize`Wait time`,sortable:!0},{key:"isActive",label:$localize`Status`,sortable:!0}],this.tableOrderBy$=this.orderBySub.pipe(E(e=>e||{property:"name",direction:"asc"})),this.labelColumns$=this.labelRx.labelGroups$.pipe(E(e=>Object.values(e).map(({name:o})=>({key:o,label:o,sortable:!0})))),this.batchActions$=this.locationIds$.pipe(q(e=>this.getBatchActions(e)),this.shareReplay()),this.selection$=this.batchActions$.pipe(E(e=>e.length>0?"multiple":"single")),this.pluckLabelGroupLabel$=V([this.locationItems$,this.locationItemRecord$]).pipe(go(this.orderBySub),E(([[e,o],t])=>t?(n,p)=>{let C=e[p-1];if(!C)return null;let u=C.labels?.find(d=>d.name===t.property);if(!u)return null;let l=o[n].labels?.find(d=>d.name===t.property);return!l||u.value===l.value?null:l.value}:()=>null)),this.columns$=this.labelColumns$.pipe(E(e=>[...this.constantColumns,...e])),this.pluckCellLabel$=V([this.locationItemRecord$,this.labelRx.labelGroups$]).pipe(E(([e,o])=>t=>{let n=e[t],{isOpen:p}=this.getLocationIsOpen(n);return X(k({name:this.commonDisplay.displayLocation(n,{options:{status:{isActive:!!n.isActive,isOpen:p}}}),numServing:n.isActive?this.decimalPipe.transform(n.numServing):"-",numWaiting:n.isActive?this.decimalPipe.transform(n.numWaiting):"-",numBooked:n.isActive?this.decimalPipe.transform(n.numBooked):"-",wait:n.isActive?this.commonDisplay.displayWaitTime(n.wait??void 0):"-"},Object.values(o).reduce((C,{name:u})=>{let F=n.labels?.find(l=>
5l.name===u);return F&&(C[u]=F.value),C},{})),{isActive:this.commonDisplay.displayActiveBadge(!!n.isActive,$localize`To use this location, activate it.`)})})),this.getBatchActions=e=>this.locationItemRecord$.pipe(q(o=>{let t=e.map(p=>o[p]),n=["label","copySettingsTo","activate","deactivate","delete"];return t.every(p=>p)&&(t.some(p=>p.isActive)||n.splice(n.indexOf("deactivate"),1),t.some(p=>!p.isActive)||n.splice(n.indexOf("activate"),1)),this.batchLocationActions.getActions(e,{pick:n})})),this.planInfo$=de(this.deleteLocationWrite.response$,this.batchDeleteLocationsWrite.response$).pipe(ie(null),q(()=>this.plansRx.planInfo$),this.shareReplay()),this.isPlanInfoLoading$=V([this.planInfo$,this.locationItems$]).pipe(E(([e,o])=>!e),ie(!0)),this.layout.setFeatureContext({name:$localize`Locations`,addActions:[{label:$localize`Add location`,eventLoggerName:"opened_create_location",link:"account/locations/add",enabled:{permissions:["users.show","locations.create"]},accountFeatures:["maxLocations"]}],batchActions:{data$:this.locationIds$,formControl:this.locationsService.locationIdsFormControl,pageEvent$:this.pageEventSub,getActions:e=>this.getBatchActions(e),getAll:()=>$(this,null,function*(){let e=yield w(this.query$);return yield w(this.coreLocationRx.listIds(e))})}}),this.activeStatusSub.next("active"),fi(this.searchLabelsSub,this.locationsFilterStore.labels$,this.ngOnDestroy$),Ei(this.activeStatusSub,this.activeStatusFormControl,this.ngOnDestroy$),this.subscribe()}onRowClicked(e){this.locationRx.selectLocation(e),this.router.navigate(["/visits"])}onHeaderClicked(e){!this.orderBySub.value||this.orderBySub.value.property!==e?this.orderBySub.next({property:e,direction:"asc"}):this.orderBySub.value.direction==="asc"?this.orderBySub.next({property:e,direction:"desc"}):this.orderBySub.next({property:"name",direction:"asc"})}subscribe(){this.layout.isMobile$.pipe(x(this.ngOnDestroy$)).subscribe(e=>{e?this.layout.updateFeatureContext({search:{api:o=>{this.searchQuerySub.next(o??"")}}}):this.layout.updateFeatureContext({search:null})})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=v({type:i,selectors:[["ww-locations"]],hostAttrs:[1,"ww-locations"],standalone:!1,features:[B],decls:23,vars:42,consts:()=>{let e;e=$localize`Status filter`;let o;o=$localize`Manage labels`;let t;t=$localize`Manage labels`;let n;n=$localize`Manage labels`;let p;p=$localize`Manage labels`;let C;return C=$localize`No locations found`,[["emptyStateTmpl",""],["featureMissingTmpl",""],[3,"store","title",4,"wwLayoutTertiaryAction"],["wwLayoutPadding","",1,"flex","flex-col","gap-6"],[3,"defaultState"],["ariaLabel",e,3,"data","formControl","pluckLabel"],[3,"store","title"],[3,"rowClicked","headerClicked","selection","columns","data","loading","placeholder","trackByProperty","formControl","orderBy","pluckActions","pluckCellLabel","pluckLabel"],[1,"mt-6",3,"pageIndex","pageSize","length","disabled","pageSizeOptions"],[4,"wwLayoutTertiaryAction"],["wwButton","tertiary","aria-label",o,"wwTooltip",t,3,"routerLink",4,"wwAccountFeature","wwAccountFeatureElse"],["wwButton","tertiary","aria-label",o,"wwTooltip",t,3,"routerLink"],["icon","bx-purchase-tag-alt"],["type","tertiary","aria-label",n,"wwTooltip",p],[3,"searchChanged","defaultState"],[1,"mt-6",3,"page","pageIndex","pageSize","length","disabled","pageSizeOptions"],["icon","ww-empty-state","message",C]]},template:function(o,t){if(o&1&&(wo(0),h(1,"async"),y(2,zs,1,6,"ng-container"),W(3,ks,1,2,"ww-page-filter-button",2),r(4,"div",3)(5,"ww-page-toolbar"),y(6,Us,1,1,"ww-page-search",4),h(7,"async"),S(8,"ww-select",5)(9,"ww-page-filter-chips",6),s(),r(10,"ww-table",7),h(11,"async"),h(12,"async"),h(13,"async"),h(14,"async"),h(15,"async"),h(16,"async"),h(17,"async"),h(18,"async"),M("rowClicked",function(p){return t.onRowClicked(p)})("headerClicked",function(p){return t.onHeaderClicked(p)}),s(),y(19,Ys,3,10,"ww-paginator",8),h(20,"async"),s(),W(21,Vs,2,3,"ng-template",null,0,ne)),o&2){let n=j(22),p=I(1,19,t.isPlanInfoLoading$);c(2),A(p?-1:2),c(4),A(I(7,21,t.layout.isDesktop$)?6:-1),c(2),_("data",t.activeStatuses)("formControl",t.activeStatusFormControl)("pluckLabel",t.pluckActiveStatusLabel),c(),_("store",t.locationsFilterStore)("title",t.filterTitle),c(),_("selection",I(11,23,t.selection$))("columns",I(12,25,t.columns$))("data",I(13,27,t.locationIds$))("loading",I(14,29,t.isLoading$))("placeholder",n)("trackByProperty",ke(41,$s))("formControl",t.locationsService.locationIdsFormControl)("orderBy",I(15,31,t.tableOrderBy$))("pluckActions",I(16,33,t.pluckActions$))("pluckCellLabel",I(17,35,t.pluckCellLabel$))("pluckLabel",I(18,37,t.pluckLabelGroupLabel$)),c(9),A(I(20,39,t.canPaginate$)?19:-1)}},dependencies:[ee,ce,qn,K,vn,Hn,Jn,$n,jn,hn,In,J,fe,ui,Ee,_i,Ke,Ve,H],encapsulation:2,changeDetection:0})}}return i})();var B_=(()=>
5{class i{static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275mod=Lo({type:i})}static{this.\u0275inj=To({providers:[we],imports:[Ao,vo,oa,It,Ne,ye,Nn,pi,Wo.forChild([{path:"",component:Ma,children:[{path:"",component:va},ve({path:"add",component:la,canActivate:[he({permissions:["locations.create","users.show"]})]},{trackPendingChanges:!0}),ve({path:"copy",component:ra,canActivate:[he({permissions:["locations.create","users.show"]})]},{trackPendingChanges:!0}),ve({path:"label",component:wa,canActivate:[he({permissions:["locations.update","labels.update"],accountFeatures:["enableLabels"]})]},{trackPendingChanges:!0}),{path:"labels/edit",component:ya,canActivate:[he({permissions:["labels.show"],accountFeatures:["enableLabels"]})]},{path:"labels",component:ba,canActivate:[he({permissions:["labels.show"],accountFeatures:["enableLabels"]})]},ve({path:"copy-settings",component:Na},{trackPendingChanges:!0})]}])]})}}return i})();export{Bt as LocationsCopySettingsService,Pa as LocationsFilterStore,xt as WwLocationsActionsComponent,la as WwLocationsAddComponent,va as WwLocationsComponent,ra as WwLocationsCopyComponent,Na as WwLocationsCopySettingsComponent,Gt as WwLocationsCopySettingsOptionsFormComponent,wa as WwLocationsLabelEditorComponent,ya as WwLocationsLabelGroupEditorComponent,ba as WwLocationsLabelOverviewComponent,B_ as WwLocationsModule,Ma as WwLocationsRoutingComponent};
6//noopchunk-F543K4XY.js.map

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