UNPKG

@perkforce/tool-kit

Version:

Perkforce Tool Kit, specifically developed for perkforce in house development and testing.

18 lines 60.4 kB
import {svgIconTypes,generateCouponCode,hasPermission,validateExcludedPermissions,validateRequiredPermissions,validateUserPermissions,PermissionCheckModeEnum,calcCrow,validateInputCharacters,generateSlug}from'ts-buildkit';import R from'dayjs';var ss=Object.defineProperty,rs=Object.defineProperties;var ns=Object.getOwnPropertyDescriptors;var ke=Object.getOwnPropertySymbols;var as=Object.prototype.hasOwnProperty,is=Object.prototype.propertyIsEnumerable;var Ge=(e,o,t)=>o in e?ss(e,o,{enumerable:true,configurable:true,writable:true,value:t}):e[o]=t,w=(e,o)=>{for(var t in o||(o={}))as.call(o,t)&&Ge(e,t,o[t]);if(ke)for(var t of ke(o))is.call(o,t)&&Ge(e,t,o[t]);return e},Y=(e,o)=>rs(e,ns(o));var D=(d=>(d.merchant="merchant",d.employer="employer",d.employee="employee",d.studentBody="studentBody",d.admin="admin",d.all="all",d.madeByMe="madeByMe",d.owner="owner",d.superUser="superUser",d.standardUser="standardUser",d.invalid="invalid",d))(D||{}),L=(l=>(l.draft="draft",l.approved="approved",l.live="live",l.scheduled="scheduled",l.ended="ended",l.endingSoon="endingSoon",l.pendingApproval="pendingApproval",l.disapproved="disapproved",l.invalid="invalid",l.pending="pending",l.accepted="accepted",l.paused="paused",l.available="available",l.verified="verified",l.unverified="unverified",l.active="active",l.inactive="inactive",l.deprecated="deprecated",l.added="added",l.invited="invited",l.signedUp="signedUp",l.completed="completed",l.failed="failed",l.inProgress="inProgress",l.processing="processing",l))(L||{}),g=(s=>(s.noLogo="noLogo",s.usePerkLogo="usePerkLogo",s.useProfileLogo="useProfileLogo",s))(g||{}),K=(t=>(t.purchased="purchased",t.free="free",t))(K||{}),H=(i=>(i.outOfStock="outOfStock",i.perUserLimitReached="perUserLimitReached",i.draft="draft",i.scheduled="scheduled",i.expired="expired",i.deleted="deleted",i))(H||{}),V=(s=>(s.superUsers="superUsers",s.allUsers="allUsers",s.normal="normal",s))(V||{}),q=(s=>(s.add="add",s.edit="edit",s.list="list",s))(q||{}),$=(s=>(s.manual="manual",s.emailFormat="emailFormat",s.newSignupsEmployees="newSignupsEmployees",s))($||{}),W=(s=>(s.android="android",s.ios="ios",s.web="web",s))(W||{}),X=(n=>(n.string="string",n.email="email",n.password="password",n.positiveInt="positiveInt",n.url="url",n))(X||{}),z=(t=>(t.internal="internal",t.external="external",t))(z||{}),Q=(a=>(a.microsoftTeams="microsoftTeams",a.slack="slack",a.stripe="stripe",a.pushNotifications="pushNotifications",a))(Q||{}),U=(s=>(s.enabled="enabled",s.disabled="disabled",s.notConnected="notConnected",s))(U||{}),j=(s=>(s.addEdit="addEdit",s.pubUnPub="pubUnPub",s.sendForApproval="sendForApproval",s))(j||{}),y=(t=>(t.ascend="ascend",t.descend="descend",t))(y||{}),Z=(a=>(a.point="Point",a.lineString="LineString",a.polygon="Polygon",a.multiPoint="MultiPoint",a))(Z||{}),J=(n=>(n.primary="primary",n.dashed="dashed",n.default="default",n.link="link",n.text="text",n))(J||{}),ee=(i=>(i.link="link",i.text="text",i.dashed="dashed",i.outlined="outlined",i.solid="solid",i.filled="filled",i))(ee||{}),te=(c=>(c.default="default",c.danger="danger",c.primary="primary",c.blue="blue",c.purple="purple",c.cyan="cyan",c.green="green",c.magenta="magenta",c.pink="pink",c.red="red",c.orange="orange",c.yellow="yellow",c.volcano="volcano",c.geekBlue="geekblue",c.lime="lime",c.gold="gold",c))(te||{}),oe=(s=>(s.granted="granted",s.denied="denied",s.default="default",s))(oe||{}),se=(t=>(t.automatic="automatic",t.manual="manual",t))(se||{}),re=(s=>(s.small="small",s.middle="middle",s.large="large",s))(re||{}),ne=(s=>(s.flexStart="flex-start",s.center="center",s.flexEnd="flex-end",s))(ne||{}),ae=(i=>(i.flexStart="flex-start",i.center="center",i.flexEnd="flex-end",i.spaceBetween="space-between",i.spaceAround="space-around",i.spaceEvenly="space-evenly",i))(ae||{}),ie=(t=>(t.svg="svg",t.other="other",t))(ie||{}),Ee=(t=>(t.category="category",t.subcategory="subcategory",t))(Ee||{}),de=(t=>(t.file="file",t.csv="csv",t))(de||{}),le=(s=>(s.file="file",s.url="url",s.text="text",s))(le||{}),ce=(s=>(s.web="web",s.android="android",s.ios="ios",s))(ce||{}),pe=(t=>(t.success="success",t.error="error",t))(pe||{}),Ie=(t=>(t.every="every",t.any="any",t))(Ie||{}),Re=(t=>(t.frontend="frontend",t.backend="backend",t))(Re||{}),_e=(t=>(t.mobileBrowser="mobileBrowser",t.mobileApp="mobileApp",t))(_e||{}),Ae=(i=>(i.notClaimed="notClaimed",i.requested="requested",i.granted="granted",i.rejected="rejected",i.expired="expired",i.refunded="refunded",i))(Ae||{}),Te=(t=>(t.perk="perk",t.benefit="benefit",t))(Te||{}),Se=(t=>(t.add="add",t.update="update",t))(Se||{}),me=(d=>(d.id="id",d.roleIdentifier="roleIdentifier",d.defaultRoleForEmployer="defaultRoleForEmployer",d.defaultRoleForStudentBody="defaultRoleForStudentBody",d.defaultRoleForMerchant="defaultRoleForMerchant",d.defaultRoleForMerchantEmployee="defaultRoleForMerchantEmployee",d.defaultRoleForStudentBodyEmployee="defaultRoleForStudentBodyEmployee",d.defaultRoleForStudentBodySuperUser="defaultRoleForStudentBodySuperUser",d.defaultRoleForEmployerEmployee="defaultRoleForEmployerEmployee",d.defaultRoleForEmployerSuperUser="defaultRoleForEmployerSuperUser",d.defaultRoleForAdmin="defaultRoleForAdmin",d))(me||{}),Oe=(s=>(s.validationFailed="validationFailed",s.roleUpdate="roleUpdate",s.processingError="processingError",s))(Oe||{}),M=(s=>(s.default="default",s.dateTimeWithAt="dateTimeWithAt",s.dateTimeWithDash="dateTimeWithDash",s))(M||{}),ue=(t=>(t.fade="fade",t.scrollx="scrollx",t))(ue||{});var Ne=(n=>(n.userManagement="userManagement",n.roleManagement="roleManagement",n.perkManagement="perkManagement",n.perkApprovalManagement="perkApprovalManagement",n.permissionManagement="permissionManagement",n))(Ne||{}),Pe=(r=>(r.viewAnyPerk="viewAnyPerk",r.deleteAnyPerk="deleteAnyPerk",r.updateAnyPerk="updateAnyPerk",r.listPerks="listPerks",r.viewPerk="viewPerk",r.canViewNonPublishedPerkOfOrganizationOwner="canViewNonPublishedPerkOfOrganizationOwner",r.canViewNonPublishedPerkOfOrganizationSuperUser="canViewNonPublishedPerkOfOrganizationSuperUser",r.canViewNonPublishedPerkOfOrganizationStandardUser="canViewNonPublishedPerkOfOrganizationStandardUser",r.createPerk="createPerk",r.updatePerk="updatePerk",r.updateOrgUserPerk="updateOrgUserPerk",r.deletePerk="deletePerk",r.deleteOrgUserPerk="deleteOrgUserPerk",r.canAddDescriptionToPerk="canAddDescriptionToPerk",r.canAddImageToPerk="canAddImageToPerk",r.canAddCustomCategoryToPerk="canAddCustomCategoryToPerk",r.canAddLogoToPerk="canAddLogoToPerk",r.canAddCategoryToPerk="canAddCategoryToPerk",r.canAddGroupsToPerk="canAddGroupsToPerk",r.canSelectOrganisationsInPerk="canSelectOrganisationsInPerk",r.canAddContactToPerk="canAddContactToPerk",r.canAddDisplayScheduleToPerk="canAddDisplayScheduleToPerk",r.canAddDiscountToPerk="canAddDiscountToPerk",r.canAddPurchasableToPerk="canAddPurchasableToPerk",r.canAddLimitsAndConstraintsToPerk="canAddLimitsAndConstraintsToPerk",r.canAddCodesToPerk="canAddCodesToPerk",r.canAddInterestToPerk="canAddInterestToPerk",r.canAddLocationsToPerk="canAddLocationsToPerk",r.canPublishPerk="canPublishPerk",r.listAllPerkApprovalRequests="listAllPerkApprovalRequests",r.listPerkApprovalRequests="listPerkApprovalRequests",r.viewAnyPerkApprovalRequest="viewAnyPerkApprovalRequest",r.viewPerkApprovalRequest="viewPerkApprovalRequest",r.rejectAnyPerkApprovalRequest="rejectAnyPerkApprovalRequest",r.rejectPerkApprovalRequest="rejectPerkApprovalRequest",r.approveAnyPerkApprovalRequest="approveAnyPerkApprovalRequest",r.approvePerkApprovalRequest="approvePerkApprovalRequest",r.listRoles="listRoles",r.viewRole="viewRole",r.createRole="createRole",r.updateRole="updateRole",r.deleteRole="deleteRole",r.canAssignRoleToUser="canAssignRoleToUser",r.canRemoveRoleFromUser="canRemoveRoleFromUser",r.canRunRoleValidatorManager="canRunRoleValidatorManager",r.canRunUserRoleBackgroundMigration="canRunUserRoleBackgroundMigration",r.canViewUserRoleBackgroundMigration="canViewUserRoleBackgroundMigration",r.assignPermissionsToRole="assignPermissionsToRole",r.removePermissionsFromRole="removePermissionsFromRole",r.listPermissions="listPermissions",r.viewPermission="viewPermission",r.createPermission="createPermission",r.updatePermission="updatePermission",r.deletePermission="deletePermission",r.deprecatePermission="deprecatePermission",r.initializePermissions="initializePermissions",r))(Pe||{});var Ce=(t=>(t.tokens="tokens",t.topics="topics",t))(Ce||{}),fe=(A=>(A.allUsers="allUsers",A.allAdmins="allAdmins",A.allEmployers="allEmployers",A.allMerchants="allMerchants",A.allStudentBodies="allStudentBodies",A.allStandardUsers="allStandardUsers",A.allSuperUsers="allSuperUsers",A.webAppUsers="webAppUsers",A.androidAppUsers="androidAppUsers",A.iosAppUsers="iosAppUsers",A))(fe||{}),De=(t=>(t.specificUsers="specificUsers",t.fcmTopics="fcmTopics",t))(De||{});var N={testArea:{max:1e4},remarks:{max:500}};var h={GOOGLE_MAPS_API_KEY:"{{googleMapsApiKey}}"},ve={NOT_AVAILABLE:"-",DEFAULT_OFFSET:0,DEFAULT_LIMIT:10,DEFAULT_PERKS_CATEGORY:"perks"},be={DEFAULT_ZOOM:12,OFFICE_COORDINATES:{LAT:51.931934000000005,LNG:-8.123001}},S={PHONE_ATTEMPTS_LIMIT:3,SMS_CODE_EXPIRY_SECONDS:600,PHONE_ATTEMPTS_TIME_LIMIT_IN_MINUTES:60,CODE_RETRIES_LIMIT:5},m={DEFAULT:"DD MMMM YYYY",TIME:"hh:mmA"},u={SIZE_LIMIT_MB:4,ALLOWED_IMAGE_TYPES:"image/png, image/jpeg, image/gif"},xe=[{value:"bar",label:"Bar"},{value:"line",label:"Line"},{value:"doughnut",label:"Doughnut"},{value:"pie",label:"Pie"},{value:"polar",label:"Polar"}],Fe={maintainAspectRatio:false,scales:{y:{beginAtZero:true,precision:0}},plugins:{legend:{display:true,labels:{boxWidth:0,font:{size:18}}}}},Be={backgroundColor:["rgba(255, 99, 132, 0.2)","rgba(54, 162, 235, 0.2)","rgba(255, 206, 86, 0.2)","rgba(75, 192, 192, 0.2)","rgba(153, 102, 255, 0.2)","rgba(255, 159, 64, 0.2)","rgba(255, 99, 232, 0.2)","rgba(54, 162, 135, 0.2)","rgba(255, 206, 186, 0.2)","rgba(75, 192, 12, 0.2)","rgba(153, 202, 55, 0.2)","rgba(25, 159, 64, 0.2)"],borderColor:["rgba(255, 99, 132, 1)","rgba(54, 162, 235, 1)","rgba(255, 206, 86, 1)","rgba(75, 192, 192, 1)","rgba(153, 102, 255, 1)","rgba(255, 159, 64, 1)","rgba(255, 99, 32, 1)","rgba(54, 162, 35, 1)","rgba(255, 206, 186, 1)","rgba(75, 292, 192, 1)","rgba(153, 202, 255, 1)","rgba(255, 259, 64, 1)"],borderWidth:1,barThickness:30},we="https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?access_type=online&response_type=token&scope=email%20profile&flowName=GeneralOAuthFlow",Ye="https://www.linkedin.com/oauth/v2/authorization?response_type=code&scope=r_liteprofile%20r_emailaddress",Ke="https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))",He="https://api.linkedin.com/oauth/v2/accessToken",Ve="https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))",qe="https://www.googleapis.com/oauth2/v1/userinfo",$e="https://graph.facebook.com/me?fields=id,first_name,last_name,email,picture",We="https://oauth2.googleapis.com/revoke?token=",Xe={GOOGLE_AUTH_SIGNIN_CALLBACK:"/social-auth/googlesignin/callback",GOOGLE_AUTH_SIGNUP_CALLBACK:"/social-auth/googlesignup/callback",FACEBOOK_AUTH_SIGNUP_CALLBACK:"/social-auth/facebooksignup/callback",FACEBOOK_AUTH_SIGNIN_CALLBACK:"/social-auth/facebooksignin/callback",LINKEDIN_AUTH_CALLBACK:"/social-auth/linkedin/callback",LINKEDIN_AUTH_SIGNUP_CALLBACK:"/social-auth/linkedinsignup/callback",LINKEDIN_AUTH_SIGNIN_CALLBACK:"/social-auth/linkedinsignin/callback",GOOGLE_AUTH_CALLBACK:"/social-auth/google/callback",FACEBOOK_AUTH_CALLBACK:"/social-auth/facebook/callback",MS_AUTH_REDIRECT:"/ms-auth",MicrosoftTeamsConfigTab:"/microsoft-teams/channel-app/config"},ze="https://www.facebook.com/v12.0/dialog/oauth?response_type=token&scope=email",Qe=10,je=30,Ze="pf_r32_4ui3_234",Je="pf_r32_nhg_5t",et="vcx_sdf_Ge_rhb",tt="we_lk_gpf_rre_23",ot="re_2we_lk_gpf_r3",st="wer_Vssdf_vf_r3",rt="ds09sdf_vf_r3",nt="dscr38g4-234-r23-4_Vd2",at="cus_5rge_svsb_5pf_3r",it="o5r_5pf_3r4ui3_90",Et="r4uo5r_5pf_3i3_90",dt="r_5vnopf_3i3_90",lt="pf_3i3_9das42_30",ct="rb_5pf_3_3i3_90",pt="perks",It={RedeemCodes:"redeem-codes",ImportRedeemCodes:"import-redeem-codes"},Rt={ORDER_CHECKOUT:52,GET_PERK_CODE:53},_t="https://perkforce.com/wp-content/uploads/2022/03/perkforce-logo.png",At={SLACK_OAUTH_URL:(e,o,t)=>`https://slack.com/oauth/v2/authorize?client_id=${o}&scope=chat:write,chat:write.public,channels:read&redirect_uri=${t}&state=${e}`,SLACK_AUTH_REDIRECT_URL:"/slack-bot/auth-redirect"},Tt={CLOSED_BY_USER:"auth/popup-closed-by-user"},St={STRING:"string",OBJECT:"object",ARRAY:"array",boolean:"boolean",NUMBER:"number",FUNCTION:"function"},mt=["perkforce.com","pfstag.com","pfdevqa.com"],Ot={MINUTES:"minutes"},ut=2e3,Nt="WFE_vwevV_sf_F-ssdfdsf_",Pt={client:{perksDataChanged:"perksDataChanged__client",userSettingChanged:"userSettingChanged__client"},server:{perksDataChanged:"perksDataChanged__server",userSettingChanged:"userSettingChanged__server"}},Ct={blank:"_blank"},ft=["click","hover","focus","contextMenu"],P={TENANT_TYPE:"common",RESPONSE_TYPE:"code",REQUESTED_SCOPES:"Channel.ReadBasic.All ChannelMessage.Send email offline_access openid profile Team.ReadBasic.All User.Read",GET_SERVER_AUTH_URL:(e,o,t)=>`https://login.microsoftonline.com/${P.TENANT_TYPE}/oauth2/v2.0/authorize?client_id=${o}&response_type=${P.RESPONSE_TYPE}&redirect_uri=${t}&response_mode=query&scope=${P.REQUESTED_SCOPES}&state=${e}`,AUTH_SCOPES:"email offline_access openid profile User.Read Team.ReadBasic.All Channel.ReadBasic.All ChannelMessage.Send",GRAPH_API_ENDPOINTS:{JOINED_TEAMS:"https://graph.microsoft.com/v1.0/me/joinedTeams",CHANNELS_IN_TEAM:e=>`https://graph.microsoft.com/v1.0/teams/${e}/channels`,SEND_MESSAGE_IN_CHANNEL:(e,o)=>`https://graph.microsoft.com/v1.0/teams/${e}/channels/${o}/messages`}},Dt=["click","hover"],Lt={supportEmail:"support@perkforce.com",webAppUrl:"https://app.perkforce.com",androidAppUrl:"https://play.google.com/store/apps/details?id=com.perkforce.app",iosAppUrl:"https://apps.apple.com/pk/app/perkforce/id1608229415"},gt=["image/svg","image/svg+xml"],Ut={YOU:{name:"You",_id:"you"},CREATOR:{name:"Creator",_id:"creator"}};var yt={PERK_UNIQUE_REDEEM_ENABLED:"perk_unique_redeem_enabled"};var Mt={geoLocationApi:{url:`https://www.googleapis.com/geolocation/v1/geolocate?key=${h.GOOGLE_MAPS_API_KEY}`}};var ht={START_DATE_REQUIRED:"Display From Date is required when perk is not always displayed.",END_DATE_GREATER:"Display Until Date should be greater than Display From Date.",USER_REQUIRED:"User is required.",INVALID_NAME:"'Perks' as a name is not allowed.",NOT_FOUND:"Perk not found.",NOT_AVAILABLE:"Perk not available.",ACCEPT_TERMS:"Please accept the terms and conditions.",CREATED:"Perk created.",UPDATED:"Perk updated.",EDIT_UNPUB_IN_CAROUSEL:"Perk updated. Users will not be able to view this unpublished perk in the carousel.",STATUS_UPDATED:"Perk status updated.",DELETED:"Perk deleted.",PROVIDE_PRICE_FOR_PURCHASABLE:"Please provide a price to make this perk purchasable.",INVALID_PRICE:"Please provide valid price.",REMAINING_QUANTITY_REQUIRED:"Remaining quantity is required.",INVALID_REMAINING_QUANTITY:"Please provide valid remaining quantity.",INVALID_MAX_ALLOWED_PER_USER:"Please provide valid max allowed per user value.",INVALID_ALLOWED_PER_USER:"Please provide valid per user value.",INVALID_ALLOWED_EVERY_DAY:"Please provide valid every day(s) value.",START_DATE_SHOULD_LESS_THEN_END_DATE:"Perk display from date cannot be after the display until date.",START_DATE_OR_ALWAYS_AVAILABLE_REQUIRED:'Please provide display from date or check "Always Display" box.',REDEEM_LIMIT_EXCEEDED_PROVIDED_CODES:"Remaining quantity cannot be greater than provided redeem codes.",REDEEM_CODE_COPIED:"Code copied to clipboard.",REDEEM_CODE_DUPLICATE:"Redeem Code already available.",REDEEM_CODE_DUPLICATE_IN_ALL_PERKS:"Redeem Code already available in other perk.",REDEEM_CODE_SPACE:"Redeem Code cannot contain white spaces.",REDDEM_CODES_REQUIRED:"You need to add your redeem codes, or you can select to have us automatically create redeem codes for you.",MAX_USER_REDEEM_LIMIT_EXCEEDED:"Your allowance has been reached, try again later.",LIMITS_NOT_ALLOWED:'Limits/Constraints can\u2019t be implemented without "Use Redeem Codes".',DISCOUNT_CODE_NOT_ALLOWED:"Discount code is not allowed with these controls selection made (Purchasable, Use Redeem Codes, Total Quantity Available, Max Allowed Per User/Days).",DESCRIPTION_PERMISSION_ERROR_MESSAGE:"You do not have permission to add a description to this perk. Please contact your administrator for assistance.",IMAGE_PERMISSION_ERROR_MESSAGE:"You do not have permission to add an image to this perk. Please contact your administrator for assistance.",CATEGORY_PERMISSION_ERROR_MESSAGE:"You do not have permission to assign a category to this perk. Please contact your administrator for assistance.",LOGO_PERMISSION_ERROR_MESSAGE:"You do not have permission to add a logo image to this perk. Please contact your administrator for assistance.",GROUP_PERMISSION_ERROR_MESSAGE:"You do not have permission to modify the user selector for this perk. Please contact your administrator for assistance.",CONTACT_PERMISSION_ERROR_MESSAGE:"You do not have permission to add contact information (name, website, phone number) to this perk. Please contact your administrator for assistance.",DISPLAY_SCHEDULE_PERMISSION_ERROR_MESSAGE:"You do not have permission to modify the display schedule settings. Please contact your administrator for assistance.",DISCOUNT_PERMISSION_ERROR_MESSAGE:"You are not authorized to set discounts. Please contact your administrator if you need this permission.",PURCHASABLE_PERMISSION_ERROR_MESSAGE:"You do not have the required permissions to modify the purchasable options or set a price. Contact your administrator for help.",LIMITS_CONSTRAINTS_PERMISSION_ERROR_MESSAGE:"You are not permitted to modify limits or constraints for this perk. Please reach out to your administrator for further assistance.",CODES_PERMISSION_ERROR_MESSAGE:"You do not have permission to manage redeem codes for this perk. Contact your administrator for permission.",REGISTER_INTEREST_PERMISSION_ERROR_MESSAGE:"You are not authorized to manage the 'Register Interest'. Please reach out to your administrator for assistance.",LOCATIONS_PERMISSION_ERROR_MESSAGE:"You do not have permission to add or modify locations. Contact your administrator for further help.",PERK_CREATE_LIMIT_REACHED:e=>`You are not allowed to create more than ${e} perk${e>1?"s":""} right now. Contact admin to increase your limit and try again later.`,VERIFY_PERK_REDEEM_ERROR:"Error occurred while verifying perk redeem.",INVALID_STATUS:"Cannot send a notification while the perk is in Draft mode. You'll need to Publish it first.",NOTIFICATION_ON_UNPUBLISH:"Cannot send a notification, while trying to unpublish a perk.",PERK_WEBSITE_OPEN_ERROR:"Error occurred while trying to open the perk website URL.",FOR_USERS:"Select the organisations that can avail of your perk.",FOR_USERS_PREVIEW:"Allow your perk to be previewed by Companies and Colleges, before connecting with them.",LEGEND_STUDENT_DESC:"The graduate cap represents a connected College, their <b>Students</b> will see your perk \u{1F469}\u{1F3FE}\u200D\u{1F393}\u{1F468}\u200D\u{1F393}"},kt={TRANSACTION_PROCESS:"Transaction is processing."},Gt={CAPTURED:"Perk Click captured."},vt={FOUND:"Perk redeem code found.",NOT_FOUND:"Perk redeem code not found.",CODE_CREATED:"Code created successfully.",UPDATED:"Perk redeem updated."},bt={ADDED:"Perk interest registered.",REMOVED:"Perk interest unregistered.",NOT_FOUND:"Interest not registered for this perk.",DUPLICATE:"Perk interest already registered."};var C={standardUsers:{pluralCapitalized:"Standard users",pluralPascalCase:"Standard Users",pluralLowerCase:"standard users",pluralUpperCase:"STANDARD USERS",singularCapitalized:"Standard user",singularPascalCase:"Standard User",singularLowerCase:"standard user",singularUpperCase:"STANDARD USER"},approve:{pluralCapitalized:"Approve",pluralLowerCase:"approve",pluralUpperCase:"APPROVE",singularCapitalized:"Approve",singularLowerCase:"approve",singularUpperCase:"APPROVE"},disapprove:{pluralCapitalized:"Disapprove",pluralLowerCase:"disapprove",pluralUpperCase:"DISAPPROVE",singularCapitalized:"Disapprove",singularLowerCase:"disapprove",singularUpperCase:"DISAPPROVE"}};var Es={NO_DISAPPROVE_PERMISSION:`You do not have permission to ${C.disapprove.singularLowerCase} this request.`,REQUEST_ALREADY_PROCESSED:"This request has already been processed.",NO_APPROVE_PERMISSION:`You do not have permission to ${C.approve.singularLowerCase} this request.`,NO_VIEW_PERMISSION:"You do not have permission to view the details of this request.",NOT_FOUND:"Perk approval request not found.",UPDATED:"Perk approval request updated successfully.",ALREADY_PROCESSED:"Perk approval request already processed.",NO_APPROVAL_HISTORY:"No approval history exists for this perk"},xt=Es;var ds={AT_LAST_1_MEMBER:"Please select at least 1 group member.",CREATED:"Group created.",NOT_FOUND:"Group not found.",DELETED:"Group deleted.",UPDATED:"Group updated.",MEMBER_CREATED:"Group member added.",MEMBER_DELETED:"Group member deleted.",MEMBER_EXISTS:"Group member already added.",MEMBER_NOT_FOUND:"Group member not found",MEMBERS_ADDED_TO_GROUPS:"Groups updated.",DUPLICATE:"Group name already exists."},Ft=ds;var ls={INVALID:"Please enter valid domain name",EMPTY_REQUEST:"Please enter request",EMPTY_EXPRESSION:"Please enter expression",CREATED:"Email domain created. Pending for approval.",UPDATED:"Email domain updated.",NOT_FOUND:"Email domain not found.",DELETED:"Email domain deleted.",EXPRESSION_ADDED:"Regular Expression created."},Bt=ls;var cs={EMPTY_EXPRESSION:"Please enter valid regular expression to block emails",INVALID_EXPRESSION:"Please enter a valid regular expression.",CREATED:`A new regular expression added to block Emails.`,NOT_FOUND:"Block Email expression not found.",DELETED:"Block Email expression deleted.",EXPRESSION_ALREADY_EXISTS:"This regular expression already exists.",REQUEST_BLOCKED:`Sorry, this request is not permitted. For further information contact us using the Give Feedback button <svg style="position:relative;top:3px;" viewBox="64 64 896 896" focusable="false" data-icon="notification" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M880 112c-3.8 0-7.7.7-11.6 2.3L292 345.9H128c-8.8 0-16 7.4-16 16.6v299c0 9.2 7.2 16.6 16 16.6h101.7c-3.7 11.6-5.7 23.9-5.7 36.4 0 65.9 53.8 119.5 120 119.5 55.4 0 102.1-37.6 115.9-88.4l408.6 164.2c3.9 1.5 7.8 2.3 11.6 2.3 16.9 0 32-14.2 32-33.2V145.2C912 126.2 897 112 880 112zM344 762.3c-26.5 0-48-21.4-48-47.8 0-11.2 3.9-21.9 11-30.4l84.9 34.1c-2 24.6-22.7 44.1-47.9 44.1zm496 58.4L318.8 611.3l-12.9-5.2H184V417.9h121.9l12.9-5.2L840 203.3v617.4z"></path></svg> or email <a href="mailto:support@perkforce.com">support@perkforce.com</a>`},wt=cs;var Is={RELOAD_DATA:"Reload Data",FILE_SIZE_LIMIT:`File size has exceeded it's max limit of ${u.SIZE_LIMIT_MB}MB`,INVALID_FILE_TYPE:`Invalid file type selected. Allowed file types are ${u.ALLOWED_IMAGE_TYPES}.`,INVALID_FILE:"Invalid file selected. Please try again.",INVALID_PHONE:"Please enter valid Phone No.",THANKS_FOR_FEEDBACK:"Thank you for the feedback.",CHAR_LIMIT_EXCEEDED:e=>`${e} limit exceeded ${N.testArea.max.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")} characters`,SPECIAL_CHARS_NOT_ALLOWED:"Special characters are not allowed.",SPECIAL_CHARS_AND_SPACES_NOT_ALLOWED:"Special characters and spaces are not allowed.",IMAGE_REQUIRED:"Image is required.",INVALID_URL:"Please enter a valid URL",AFFILIATE_LINK_WARNING:"Please ensure this is not an affiliate link. See Perkforce Terms & Conditions for more details",INVALID_REQUEST:"Invalid request.",ERROR_OCCURRED:"Error occurred, try again later",CANCELLED_BY_USER:"Request cancelled by user.",ACCEPT_CONDITION:"Please accept the condition.",REQUEST_EXPIRED:"Requested token expired, try again later.",INVALID_EMPLOYEE_PERMISSIONS:"Invalid request. Your permissions are changed. Please refresh your page.",INVALID_ICON_TYPE:(e="svg")=>`Invalid file type selected. Allowed file types are ${e==="svg"?svgIconTypes.join(", "):u.ALLOWED_IMAGE_TYPES}.`,GIVE_FEEDBACK:"Give Feedback",COLLEGE:"College",BUSINESS:"Business",COMPANY:"Company",COMPANY_OR_COLLEGE:"Company or College",SUCCESS:"Request completed successfully.",NAME_REQUIRED:"Name is required.",ID_REQUIRED:"Id is required, can't proceed without id.",REMARKS_MAX_ERROR:`Remarks must contain at most ${N.remarks.max} character(s)`,REMARKS_REQUIRED:"Remarks is required.",INVALID:"Invalid request.",EMAIL_EXISTS:"Email address already occupied.",CARD_BANNER_NOT_FOUND:"Card or Banner not found.",PERKS_SENT:"Perks Sent.",DB_CONNECTED:"Database Connected Successfully.",UNAUTHENTICATED:"please authenticate",SPECIAL_CHARACTERS_NOT_ALLOWED:"Please provide a valid value, Special characters are not allowed.",CHARATCER_LIMIT_EXCEEDED:"Characters Limit Exceeded.",FILE_UPLOAD_SUCCESS:"File upload completed successfully.",FILE_UPLOAD_FAILED:"File upload failed.",NOT_FOUND:"Item not found.",INVALID_SLUG:"Invalid category name, name should contain at least one alphabet and should be unique.",INVALID_EMAIL:"Please provide a valid email address.",UNAUTHORIZED:"Unauthorized access. You do not have permission to perform this action. Please check your credentials or contact support if you believe this is a mistake.",UNEXPECTED_ERROR_MESSAGE:"An unexpected error occurred. Please try again.",DEPRECATION_REASON_REQUIRED:"Deprecated reason is required."},Yt=Is;var Kt={PERKFORCE_DOMAIN_UPDATE_INFO:"Perkforce domain change will take effect in next sign in.",DESCRIPTON_REQUIRED:"Description is required.",CREATED:"User Created.",NOT_FOUND:"User not found.",VANITY_URL_EXISTS:"Vanity url already occupied.",COMPANY_NAME_EXISTS:e=>`${e||"Company"} name already occupied.`,INVALID_TOKEN:"Invalid token.",CODE_EXPIRED:"Code is expired.",CODE_INVALID:"Code is invalid.",LOGGED_OUT:"User logged out.",UPDATED:"User updated.",ORDER_EMAIL_RECIPIENTS_UPDATED:"Order email recipients updated.",NOT_ONBOARDED:"User not onboarded.",PHONE_CODE:(e,o)=>`Please use this code ${e} to verify your phone number ${o}.`,INVALID_PHONE_ATTEMPT:e=>`Sorry, you can\u2019t sign up right now. You can try again in ${e}.`,PRIVACY_POLICY_RESET:"Terms, conditions and privacy policy reset done for all users.",ACTIVE_STATUS_UPDATED:"User Active Status Updated Successfully.",DELETED:"User Deleted Successfully.",CANNOT_DOWNGRADE_EMAIL_ORDER_RECIPIENT:"Can not remove superuser access, Please remove the user from order email recipient list first.",CANNOT_REMOE_LAST_EMAIL_ORDER_RECIPIENT:"Can not remove last order email recipient.",INVALID_EMPLOYER_ID:"Error Occurred, Invalid employer id, please try again later.",LOCATION_UPDATED:"Location Updated Successfully.",FAILED_TO_FETCH_PERMISSIONS:"Failed to fetch permissions, please try again.",NO_ROLE_ASSIGNED:"You currently don't have any roles assigned. Please contact the administrator for assistance."},Ht={CREATED:"User history created."},Vt={CREATED:"User created.",NOT_FOUND:"User not found.",DELETED:"User deleted.",UPDATED:"User updated.",NO_FILE_FOUND:"No file found to import users.",EMPLOYEES_IMPORT_SUCCESS:"Users imported successfully.",EMPLOYEES_IMPORT_FAILED:"Users import failed.",INVALID_FILE_TYPE:"Invalid file type, upload csv file.",MAXIMUM_IMPORT_LIMIT:e=>`Each import is restricted to a maximum of ${e} users. Instead, separate your file into smaller files and import multiple times.`,EMPLOYEES_EMAIL_COLUMN_NOT_FOUND:"Users email column not found.",INVITE_SENT:"Invite sent."},qt={EMPLOYEES_LANDING_CAT_CHANGED:"Users landing category changed."},$t={FEEDBACK_SUCCESS:"Feedback submitted successfully.",FEEDBACK_FAILED:"Feedback submission failed."};var Rs={INVALID_STRIPE_FEE:"Fee percentage cannot be less than 0 or greater than 100.",CANNOT_NEGATIVE:"Cannot be less than 1.",FEE_FOR_ORGANIZATION:e=>`Application Fee from ${e}.`,UPDATED:"Settings updated.",INVALID_PERKS_PER_PAGE:"Perks per page should not be less than 1.",INVALID_CONNECTIONS_UPTO:"Number of connections should not be less than 1.",NEW_SIGNUPS:{SUCCESS:"New signups settings updated successfully.",INVALID_EMAIL:"Invalid email, no emplopyer/merchant/student-body user found with this email."},MOBILE_APP_INFO:{SUCCESS:"Mobile app info updated successfully."}},Wt=Rs;var _s={INVITE_SENT:"Connection invite sent.",CONNECTION_REQUEST_SENT:"Connection request sent.",REFER_A_BUSINESS:"Refer a Business",SENT:"Connection request sent.",NOT_FOUND:"Connection request not found",NOT_FOUND_OR_ACCEPTED:"Connection request not found or already accepted.",EXISTS:"Connection request already exists or invalid.",CONNECTION_EXISTS:"Users already connected.",DELETED:"Connection request deleted.",INVALID:"Invalid connection request.",ACCEPTED:"Connection request accepted.",CONNECTION_CREATED:"Connection created.",STATUS_CHANGED:"Status updated.",INVALID_USER:"Cannot send connection request to this user. Please reach out to Perkforce or send feedback for help.",REFERRAL_SENT:"Referral sent."},Xt=_s;var zt={NO_ICON_PROVIDED:"No icon provided for category.",NO_ICONS_FOUND:"No Icons Found!",ICON_DIMENSION_LIMIT_EXCEED:"Image dimensions should be less than or equal to 256*256",CREATED:"Category created.",EXISTS:"Category with the same name already exists.",UPDATED:"Category updated.",DELETED:"Category deleted.",NOT_FOUND:"Category not found.",CONTAIN_SUB_CATEGORIES:"Cannot delete because there are sub categories in this category.",REORDER:"Categories reordered."},Qt={CREATED:"Sub Category created.",EXISTS:"Sub Category with the same name already exists.",UPDATED:"Sub Category updated.",DELETED:"Sub Category deleted.",NOT_FOUND:"Sub Category not found.",DEFAULT:"Cannot update default Sub Category.",CONTAIN_PERKS:"Cannot delete because there are perks in this sub category.",REORDER:"Sub Categories reordered."},jt={DEFAULT:"Cannot update default Perk Category.",NOT_FOUND:"Default Perk Category not found.",CREATED:"Default Perk Category created.",DELETED:"Default Perk Category deleted",UPDATED:"Default Perk Category updated",EXISTS:"Default Perk Category with the same name already exists.",CONTAIN_PERKS:"Cannot delete because there are perks in this category.",REORDER:"Default Perk Categories reordered."};var As={TEST_ERROR_REPORTING:"Testing frontend sentry error reporting."},Zt=As;var Ts={INVALID_REQUEST:"Cannot change, once a purchase has occured.",ADDED:"Perk Redeem Code added.",EDITED:"Perk Redeem Code edited.",DELETED:"Perk Redeem Code deleted.",PERK_ID_REQUIRED:"Perk id is required.",COMPLETED:"Redeem Codes added successfully.",FAILED:"Failed to add requested redeem Codes.",LIMIT_REACHED:e=>`Limit reached, can not add more than ${e} redeem codes at a time.`,NO_FILE_FOUND:"No file found to import data.",NO_REDEEM_CODE_AVAILABLE:"No Perk code available right now, try again later.",INVALID_REDEEM_CODE:"Invalid redeem code found, please try again later.",DUPLICATE_RECORDS_FOUND:(e,o)=>`${e} unique codes added. Found ${o} duplicate codes, which were skiped.`,INVALID_RECORDS_FOUND:(e,o)=>`${e} unique codes added. Found ${o} invalid codes, which were skiped.`,DUPLICATE_INVALID_RECORDS_FOUND:(e,o,t)=>`${e} unique codes added. Found ${o} duplicate codes & ${t} invalid codes, which were skiped.`,REDEEM_CODE_DUPLICATE_IN_ALL_PERKS:"Redeem Code already available in other perk."},Jt=Ts;var Ss={ALREADY_EXISTS:"Test account email already exists.",INVALID_ACTION:"Invalid test account form action passed, please try again.",ADDED:"Test account added successfully.",UPDATED:"Test account updated successfully.",DELETED:"Test account deleted successfully.",SETTING_UPDATED:"Test accounts setting updated successfully.",INVALID_EMAIL:"Please add a valid email to add new test account.",EXISTS:"Test account already exists, please try a different user.",NOT_FOUND:"Test account not found, please try again.",MUST_BE_MANAGER:"Internal tester should be a manager account."},eo=Ss;var ms={REDIRECT_FAILED:"Error occured while trying to redirect to Stripe to complete checkout request.",DISCONNECTED:`You're now disconnected from Stripe. Reconnect anytime to access its amazing features again.`,ENABLED:`Stripe is enabled again! All its amazing features are ready for you to enjoy.`,DISABLED:`Stripe is disabled. You're still connected, so turning it back on is easy whenever you're ready!`},to=ms;var Os={CODE_COPIED:"Code copied successfully.",AMOUNT_SELECTION:"Please select amount."},oo=Os;var us={DUPLICATE_TITLE:"A role with the same title already exists.",CREATED:"Role created successfully.",UPDATED:"Role updated successfully.",DELETED:"Role deleted successfully.",MISSING_TITLE:"Role title is required.",NOT_FOUND:"Role not found.",ERROR_DEFAULT_ROLE_UNSET:e=>`Cannot unset the ${e} without setting another role as ${e} first`,ERROR_DEFAULT_ROLE_DELETE:e=>`Cannot delete the ${e} role without setting another role as ${e} first`,ERROR_ASSIGNED_ROLE_DELETE:"Cannot delete role because it is assigned to existing users",REPLACEMENT_ROLE_NOT_FOUND:"Replacement role not found",REPLACEMENT_ROLE_MUST_ACTIVE:"Replacement role must be active.",REPLACEMENT_INVALID_DEPRECATED_ROLE:"Invalid replacement role, provided replacement role is in deprecated state",INVALID_DEPRECATED_ROLE:"Invalid role, provided role is in deprecated state",ROLE_DELETE_REQUIRES_REPLACEMENT:"Cannot delete the role as it is assigned to users. Please provide a replacement role to proceed.",ROLE_ALREADY_ASSIGNED:"Role already assigned to user.",USER_ROLE_NOT_ASSIGNED:"Role is not assigned to the user.",USER_LAST_ROLE_REMOVAL:"You cannot remove the last role assigned to the user.",ASSIGNED:"Role successfully assigned to user.",REMOVED:"Role successfully removed from user.",ROLES_UPDATED:"Roles updated successfully",SOME_ROLES_UPDATED_FAILED:"Some roles failed to update",CANNOT_SET_DEPRECATED_AS_DEFAULT:"Cannot set a deprecated role as default for any user type",REPLACEMENT_ROLE_REQUIRED:"Replacement role id is required in case of deprecated state",PERMISSIONS_ASSIGNED:"Permissions assigned to role successfully.",PERMISSIONS_REMOVED:"Permissions removed from role successfully.",CANNOT_REMOVE_ALL_PERMISSIONS:"Cannot remove all permissions from role.",NO_NEW_PERMISSIONS:"The requested permissions are already assigned to this role",CANNOT_UPDATE_DEFAULT_ROLE:"Cannot update default roles. Default roles are system-defined and cannot be modified.",CANNOT_DELETE_DEFAULT_ROLE:"Cannot delete default roles. Default roles are system-defined and cannot be removed."},so=us;var Ns={NOT_FOUND:"Permission not found.",CREATED:"Permission created successfully.",UPDATED:"Permission updated successfully.",UPDATED_PERMISSIONS:"Permissions updated successfully.",DELETED:"Permission deleted successfully.",REPLACEMENT_PERMISSION_NOT_FOUND:"Replacement permission not found.",REPLACEMENT_PERMISSION_ID_REQUIRED:"Replacement permission id is required.",CANNOT_DEPRECATE_PERMISSION_IN_USE:"Cannot deprecate permission that is in use without a replacement.",DEPRECATED_SUCCESSFULLY:"Permission deprecated successfully.",IN_USE:e=>`Permission is currently in use by ${e} role${e===1?"":"s"}. Please transfer to another permission by providing replacement permission id before deleting.`,TRANSFER_TARGET_NOT_FOUND:"The permission to transfer to does not exist.",TRANSFER_TARGET_INVALID:"The target permission for transfer must be active and not deprecated.",PERMISSION_ALREADY_EXISTS:"Permission with this identifier already exists.",DELETED_BY_ADMINISTRATOR:"Deleted by administrator.",INITIALIZED:"Permissions successfully initialized.",IDENTIFIER_REQUIRED:"Permission identifier is required.",ID_REQUIRED:"Permission id is required.",TITLE_REQUIRED:"Permission title is required.",TRANSFERRED_AND_DELETED:"Permission transferred and deleted successfully."},ro=Ns;var Ps={RESTRICT_ACCESS:"Unable to access for now. Please Try Later. Sorry for inconvenience.",CODE_RETRIES_LIMIT_REACHED:`${S.CODE_RETRIES_LIMIT} unsuccessful attempts were made to Sign-in to your account. Access to your account is restricted.`,CODE_RETRIES:e=>`Incorrect code. ${S.CODE_RETRIES_LIMIT-e} ${S.CODE_RETRIES_LIMIT-e===1?"try":"tries"} remaining.`,ACCOUNT_UNDER_REVIEW:"We are reviewing your account. We will get back to you soon.",NO_TERMS_CONDITION_STATUS:"Please accept the Terms of Service and Privacy Policy to continue."},no=Ps;var Cs={UPDATED:"Profile updated."},ao=Cs;var fs={NOT_FOUND:"Budget not found or you do not have access to this budget.",EXPIRED_OR_CLAIMED:"Budget expired or already claimed.",REFUND_REQUEST:"Refund Requested.",APPROVED:"Amount approved.",REJECTED:"Amount rejected.",REFUNDED:"Budget Refunded."},io=fs;var Ds={NOT_ENOUGH_BALANCE:"You dont have enough balance for this voucher."},Eo=Ds;var lo={ITEM_CREATED:"Carousel item created.",NOT_FOUND:"Carousel item not found.",ITEM_DELETED:"Carousel item deleted.",ITEM_UPDATED:"Carousel item updated.",REORDER:"Carousel items reordered."},co={ITEM_CREATED:"Carousel item created.",NOT_FOUND:"Carousel item not found.",ITEM_DELETED:"Carousel item deleted.",ITEM_UPDATED:"Carousel item updated.",LIMIT_REACHED:"Cannot create carousel item, limit reached. Please contact Perkforce for furthur information."},po={UPDATED:"Carousel settings updated."},Io={UPDATED:"Carousel settings updated."},Ro={ADDED:"Custom category icon added.",UPDATED:"Custom category icon updated.",DELETED:"Custom category icon deleted."};var _o={ITEM_CREATED:"Card item created.",NOT_FOUND:"Card item not found.",ITEM_DELETED:"Card item deleted.",ITEM_UPDATED:"Card item updated.",REORDER:"Card items reordered."},Ao={UPDATED:"Card settings updated."},To={ADDED:"Credit card added.",EXISTS:"Credit card already exists.",DELETED:"Credit card deleted."};var Ls={NOT_FOUND:"Order not found.",DELETED:"Order deleted."},So=Ls;var mo={ADDED:"Manager Email added successfully.",UPDATED:"Manager Email updated successfully.",DELETED:"Manager Email deleted successfully.",ITEM_EXISTS:"Manager Email already added in the list.",MANAGER_NOT_FOUND:"Manager not found, please make sure to enter a manager email."},Oo={INVALID_APP_OR_STATUS:"Invalid integration app or status, please try again."};var uo={ACCESS_DENIED:"Access Denied By User.",SEND_PERK_NOTIFICATION:"Click here to send a notification about this perk to your slack organisation.",NO_CHANNELS_FOUND:"No channels found, please create some public channels in your workspace or add perkforce slack app to some private channels to continue.",INVALID_CHANNEL:"Invalid channel, please try again.",INVALID_WORKSPACE_DATA:"Invalid workspace data, please try again.",SELECT_CHANNEL:"Please select channel to continue to send a notification to slack.",ERROR_OCCURRED:"Error ocurred while opening slack app to complete the integration process.",ENABLE_INTEGRATION:"Please enable slack integration to use this feature."},No={NOTIFICATION_SENT:"Notification sent successfully.",CONNECTED:`Congrats! You're now connected to Slack. Now each perk has a feature where you can notify your Slack channels about it. \u{1F680}`,DISCONNECTED:`You're now disconnected from Slack. Reconnect anytime to access its amazing features again.`,ENABLED:`Slack is enabled again! All its amazing features are ready for you to enjoy.`,DISABLED:`Slack is disabled. You're still connected, so turning it back on is easy whenever you're ready!`};var gs={SEND_PERK_NOTIFICATION:"Click here to send a notification about this perk to your Microsoft Teams.",NO_TEAMS_FOUND:"No teams found, please create some public teams with public channels in your Microsoft Teams account.",NO_CHANNELS_FOUND:"No public channels found in selected team, please selected another team or create some public channels and try again.",MS_CONNECTION_NOT_ALLOWED:"MS Connection is not allowed, please request admin and try again later.",ERROR_OCCURRED:"Error occurred while processing microsoft auth request.",SELECT_TEAM:"Please select team to continue to send a notification to microsoft teams.",SELECT_CHANNEL:"Please select channel to continue to send a notification to microsoft teams.",NOT_IN_MS_TEAMS:"Initialization Failed. No Parent window found.",ENABLE_INTEGRATION:"Please enable microsoft teams integration to use this feature.",ID_TOKEN_REQUIRED:"ID Token is required to complete the MS Teams SSO Auth Request.",ACCESS_TOKEN_EXPIRED:"Access Token Expired, please open perkforce app in ms teams again to refresh your access token.",TEAM_ID_IS_REQUIRED:"Team Id is required to fetch the channels for that team.",TEAM_CHANNEL_ID_IS_REQUIRED:"Team & Channel Id is required to send notification message to the channel.",MESSAGE_SENDING_FAILED:"Error occurred while sending the message to channel in MS Teams, please try again.",ADAPTIVE_CARD_FAILED:"Error Occurred while creating adaptive card to send message to MS Teams.",NOT_ALLOWED:"You are not allowed to use MS Teams feature.",INVALID_DATA:"No valid data found for requested MS Teams action, please try again.",ERROR_WHILE_SENDING_NOTIFICATION:"Error occurred while sending notification to MS Teams.",NOTIFICATION_SENT:"Notification sent successfully.",CONNECTED:`Congrats! You're now connected to Microsoft Teams. Now each perk has a feature where you can notify your Microsoft Teams channels about it. \u{1F680}`,DISCONNECTED:`You're now disconnected from Microsoft Teams. Reconnect anytime to access its amazing features again.`,ENABLED:`Microsoft Teams is enabled again! All its amazing features are ready for you to enjoy.`,DISABLED:`Microsoft Teams is disabled. You're still connected, so turning it back on is easy whenever you're ready!`},Po=gs;var Co={SUCCESS:"Push notification sent successfully.",FAILED:"Error occurred while sending push notification to users.",ENABLED:"Push notifications are enabled.",DISABLED:"Push notifications are disabled."};var Us={USER_TYPE_MISSING:"User type is missing",INVALID_USER_TYPE:"Invalid user type",NO_EMAIL:"No Email",ALREADY_IN_PROGRESS:"User role migration is already in progress. Please wait for the current migration to complete before initiating a new one."},fo=Us;var ys={CHECK_STATUS:"Initialization is in process for more detail run getMigrationStatus query to get the status of the migration"},Do=ys;var Ms={NOT_FOUND:"Cart not found.",CART_EMPTY:"Cart is empty.",ITEM_NOT_FOUND:"Cart item not found.",ITEM_ADDED:"Item added in cart.",QUANTITY_REQUIRED:"Quantity is required.",CHECKOUT_SUCCESS:"Transaction in process.",ITEMS_OUT_OF_STOCK:"One or more items are not available.",ITEM_OUT_OF_STOCK_AND_UPDATED:"Item not available. Removed it from cart.",PURCHASE_SUCCESS:"Purchased Successfully.",BUSINESS_NOT_FOUND:"Business not found.",ITEM_NOT_AVAILABLE_FOR_PURCHASE:"Item(s) not available to purchase.",ONLY_SAME_BUSINESS_ALLOWED:"Items from different seller cannot be added in Cart. Please clear your cart to add items from a different seller.",ADD_QUANTITY_EXCEEDED:e=>e?`There are a max of ${e} items available, so we have updated your cart with the ${e} available.`:"Item not available."},Lo=Ms;var go={SETUP:Do,PERK:ht,CART:Lo,GIVE_PERKS:kt,GROUP:Ft,EMAIL_DOMAIN:Bt,DISCOUNT_CODE:oo,GENERAL:Yt,USER:Kt,USER_HISTORY:Ht,SETTINGS:Wt,INVITES:Xt,SLACK:No,SLACK_BOT:uo,CATEGORY:zt,SUB_CATEGORY:Qt,SENTRY:Zt,PERK_REDEEM_CODES:Jt,TEST_ACCOUNTS:eo,STRIPE:to,BLOCK_EMAIL_EXPRESSION:wt,MS_TEAMS:Po,PERK_APPROVAL_REQUEST:xt,ROLE:so,PERMISSION:ro,AUTH:no,PROFILE:ao,BUDGET:io,EMPLOYEE:Vt,VOUCHER:Eo,CAROUSEL:lo,BRAND_CAROUSEL:co,CARD:_o,CAROUSEL_SETTINGS:po,BRAND_CAROUSEL_SETTINGS:Io,CARD_SETTINGS:Ao,PERK_CLICK:Gt,PERK_CATEGORY:jt,EMPLOYER:qt,USER_FEEDBACK:$t,VERIFY_PERK_REDEEM:vt,ORDER:So,CREDIT_CARD:To,CUSTOM_CATEGORY_ICONS:Ro,PERK_INTEREST:bt,MOBILE_APP_FORCE_EXCLUDE:mo,APPS_INTEGRATIONS:Oo,PUSH_NOTIFICATIONS:Co,MIGRATION:fo};var Uo={PERKS_PER_PAGE:9},yo={ROLES_PER_PAGE:9};var Mo={pageStep:"p"},ho={profile:{details:"details",edit:"edit"}},p={perkEditId:":perkEditId",perkViewId:":perkViewId",perkIdIU:":perkIdIU",groupSlug:":groupSlug",brandVanityUrlOrId:":brandVanityUrlOrId",brandSubCat:":brandSubCat",brandPerkViewId:":brandPerkViewId",perkBenefitListCat:":perkBenefitListCat",perkBenefitListSubCat:":perkBenefitListSubCat",roleId:":roleId",permissionId:":permissionId"},k={APP_ROOT_URL:"/",SIGN_IN_ROUTE:"/sign-in",SIGN_UP_ROUTE:"/sign-up",ONBOARDING_ROUTE:"/onboarding",HOME:"/dashboard",PROFILE:"/profile",INVITATIONS:"/invitations",PERK_INSIGHTS:"/perk-insights",LOGOUT:"/logout",PERK_MANAGEMENT:"/perk",PERK_APPROVAL_REQUESTS:"/perk-approval-requests",SINGLE_PERK:`/perk/${p.perkViewId}`,PERK_INTERESTED_USERS:`/perk/${p.perkIdIU}/interested-users`,PERK_APPROVAL_REQUEST_HISTORY:`/perk/${p.perkIdIU}/approval-request-history`,SINGLE_GROUP:`/group/${p.groupSlug}`,EDIT_PERK:`/perk/edit/${p.perkEditId}`,CATEGORIES:"/categories",EMPLOYEES:"/employees",MERCHANTS:"/merchants",EDIT_EMPLOYEE_DASHBOARD:"/employee-dashboard",GROUPS:"/groups",IMPORT_EMPLOYEES:"/import-employees",VERIFIED_MEMBER:"/verified-member",INVALID_INVITE:"/invalid-invite",CHECKOUT_SUCCESS:"/checkout-success",CART:"/cart",PURCHASES:"/purchases",VERIFY_PERK_REDEEM:"/orders",PERKS:"/perks",EMPLOYERS:"/employers",USERS:"/users",MERCHANDIZE:`/organisation/${p.brandVanityUrlOrId}`,MERCHANDIZE_SUB:`/organisation/${p.brandVanityUrlOrId}/${p.brandSubCat}`,SINGLE_PERK_BRAND:`/organisation/${p.brandVanityUrlOrId}/perk/${p.brandPerkViewId}`,NEARBY_LOCATION:"/nearby-location",NEARBY_LOCATION_CAT:`/nearby-location/${p.perkBenefitListCat}`,NEARBY_LOCATION_SUB_CAT:`/nearby-location/${p.perkBenefitListCat}/${p.perkBenefitListSubCat}`,PERK_MANAGEMENT_CAT:`/${p.perkBenefitListCat}`,PERK_MANAGEMENT_SUBCAT:`/${p.perkBenefitListCat}/${p.perkBenefitListSubCat}`,REFERRALS:"/referrals",SETTINGS:"/settings",EMAIL_DOMAINS:"/email-domains",BLOCK_EMAIL_EXPRESSIONS:"/block-email-expressions",USER_HISTORY:"/user-history",PERK_CATEGORIES:"/perk-categories",BENEFIT_CATEGORIES:"/benefit-categories",LANDIND_PAGE:e=>{var o,t,s,a;return e!=null&&e.employerId&&(t=(o=e==null?void 0:e.employerId)==null?void 0:o.employeesLandingCategory)!=null&&t.categorySlug?`/${(a=(s=e==null?void 0:e.employerId)==null?void 0:s.employeesLandingCategory)==null?void 0:a.categorySlug}`:k.PERKS},EMAIL_SIGNIN_VERIFY:"/callback/verification",PAGE_NOT_FOUND:"/page-not-found",WILD_CARD:"*",APP_ROOT_SIGN_UP_MODAL:"/?type=signup",INTEGRATIONS_LIST_PAGE:"/integrations",PUSH_NOTIFICATIONS_PAGE:"/push-notifications",PUSH_NOTIFICATION_GROUPS:"/push-notification-groups",SINGLE_PUSH_NOTIFICATION_GROUP:"/push-notification-groups/:groupSlug"};var ko={mtu:"mtuOrganizationFcmTopic",doterra:"doterraOrganizationFcmTopic",republicofwork:"republicofworkOrganizationFcmTopic",everymancork:"everymancorkOrganizationFcmTopic"};var Go=({permission:e,userPermissions:o})=>hasPermission({permission:e,userPermissions:o}),vo=({userPermissions:e,requiredPermissions:o=[],checkModeForRequiredPermissions:t=PermissionCheckModeEnum.every})=>validateRequiredPermissions({userPermissions:e,checkModeForRequiredPermissions:t,requiredPermissions:o}),bo=({userPermissions:e,excludedPermissions:o=[],checkModeForExcludedPermissions:t=PermissionCheckModeEnum.every})=>validateExcludedPermissions({userPermissions:e,checkModeForExcludedPermissions:t,excludedPermissions:o}),xo=({userPermissions:e,requiredPermissions:o=[],excludedPermissions:t=[],checkModeForRequiredPermissions:s=PermissionCheckModeEnum.every,checkModeForExcludedPermissions:a=PermissionCheckModeEnum.every})=>validateUserPermissions({userPermissions:e,checkModeForExcludedPermissions:a,checkModeForRequiredPermissions:s,excludedPermissions:t,requiredPermissions:o});var Fo=e=>{var o,t,s,a;return (e==null?void 0:e.type)==="merchant"?"Business":(e==null?void 0:e.type)==="studentBody"?"College":(e==null?void 0:e.type)==="employer"?"Company":(e==null?void 0:e.type)==="employee"&&((o=e==null?void 0:e.employerId)!=null&&o._id)?((t=e==null?void 0:e.employerId)==null?void 0:t.type)==="employer"||((s=e==null?void 0:e.employerId)==null?void 0:s.type)==="merchant"||((a=e==null?void 0:e.employerId)==null?void 0:a.type)==="studentBody"&&(e!=null&&e.isSuperUser)?"Member of staff":"Student":"Company"},Le=(e,o)=>{let t=[];return e==null||e.forEach(s=>{var n,i;let a=calcCrow((n=o==null?void 0:o.lat)!=null?n:0,(i=o==null?void 0:o.lng)!=null?i:0,s!=null&&s.lat?s==null?void 0:s.lat:0,s!=null&&s.lng?s==null?void 0:s.lng:0);t==null||t.push(a);}),t==null||t.sort((s,a)=>s-a),t==null?void 0:t[0]},Bo=async({curr:e,locBusiness:o,nearby:t,region:s,sort:a})=>{var i;let n=[];if(o)for(let E of o)if(((i=E==null?void 0:E.locations)==null?void 0:i.length)===0){let _=t&&(a==null?void 0:a.distance)===-1?0:t?1e8:0;n==null||n.push(Y(w({},E),{distance:Number(_),region:s}));}else {let _=Le(E==null?void 0:E.locations,e),f=Y(w({},E),{distance:_,region:s});n==null||n.push(f);}return (t||(a==null?void 0:a.distance)===1)&&(n==null||n.sort((E,_)=>Number(E==null?void 0:E.distance)-Number(_==null?void 0:_.distance))),t&&(a==null?void 0:a.distance)===-1&&(n==null||n.sort((E,_)=>Number(_==null?void 0:_.distance)-Number(E==null?void 0:E.distance))),n},ge=e=>{var o;return ((o=e==null?void 0:e.employerId)==null?void 0:o.type)==="merchant"},wo=(e,o)=>{let t=e==null?void 0:e.email;return o!=null&&o.length&&t?o==null?void 0:o.includes(t):false},v=e=>{var t,s,a;return e!=null&&e.displayFromDate&&(a=(s=R((t=e==null?void 0:e.displayFromDate)==null?void 0:t.toString()))==null?void 0:s.isAfter(R()))!=null?a:false},Yo=e=>{var a,n;if(!e)return false;let o=(a=R())==null?void 0:a.startOf("day"),t=e!=null&&e.displayFromDate?R((n=e==null?void 0:e.displayFromDate)==null?void 0:n.toString()):null;return !!(!(e!=null&&e.alwaysDisplay)&&(t==null?void 0:t.isAfter(o)))},Ue=e=>{var s,a;if(e!=null&&e.alwaysDisplay||!(e!=null&&e.displayUntilDate))return false;let o=R(R()).add(14,"days");return !(e!=null&&e.alwaysDisplay)&&((a=R((s=e==null?void 0:e.displayUntilDate)==null?void 0:s.toString()))==null?void 0:a.isBefore(o))},b=e=>{var t,s;return e!=null&&e.alwaysDisplay||!(e!=null&&e.displayUnt