PageSourceSearch

https://www.joinspectra.com/_next/static/chunks/1175-44d0af5605e69724.js?dpl=dpl_5ewfZQFu2NbwFo58T6BeSHsvvese

js joinspectra.com collected 2026-10-02 00:31:41 UTC 38,194 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="35378aab-7568-459a-9f56-5109e9b19ceb",e._sentryDebugIdIdentifier="sentry-dbid-35378aab-7568-459a-9f56-5109e9b19ceb")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1175],{99689:(e,t,a)=>{a.d(t,{S:()=>u});var l=a(798463),r=a(98734),n=a(344193),i=a(896549),s=a(624805),o=a(458716),d=a(890467),c=a(326367);class u{static create(e){return i.MerchantProfileCreateScalarSchema.omit({merchantType:!0,defaultDiscount:!0,phone:!0,zip:!0,merchantAreaEN:!0,merchantAreaFR:!0,merchantTypeEN:!0,merchantTypeFR:!0,descriptionEN:!0,descriptionFR:!0,latitude:!0,longitude:!0,website:!0,embeddedMap:!0}).merge(r.Ik({phone:r.Yj().max(20,e("profile.validation.phone.max")).superRefine((t,a)=>{var r;if(t){if(t.length<10)return void a.addIssue({code:n.eq.custom,message:e("profile.validation.phone.min")});(null==(r=(0,l.l)(t,"CA"))?void 0:r.isValid())||a.addIssue({code:n.eq.custom,message:e("profile.validation.phone.invalid")})}}).optional(),zip:r.Yj().min(5,e("profile.validation.zip.min")).max(7,e("profile.validation.zip.max")).superRefine((t,a)=>{/^[ABCEGHJ-NPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][ -]?\d[ABCEGHJ-NPRSTV-Z]\d$/i.test(t)||a.addIssue({code:n.eq.custom,message:e("profile.validation.zip.invalid")})}),descriptionEN:r.Yj().max(1e4,e("profile.validation.description.max")).optional(),descriptionFR:r.Yj().max(1e4,e("profile.validation.description.max")).optional(),defaultDiscount:r.ai({invalid_type_error:e("profile.validation.discount.invalid",{min:s.M.MIN_DISCOUNT,max:s.M.MAX_DISCOUNT})}).min(s.M.MIN_DISCOUNT,e("profile.validation.discount.min",{min:s.M.MIN_DISCOUNT})).max(s.M.MAX_DISCOUNT,e("profile.validation.discount.max",{max:s.M.MAX_DISCOUNT})).optional(),website:r.Yj().superRefine((t,a)=>{t&&((0,d.kW)(t)||a.addIssue({code:n.eq.custom,message:e("profile.validation.website.invalid")}))}).optional(),weeklyCouponLimit:r.ai().optional(),dailyCouponLimit:r.ai().optional(),merchantLocations:c.PL.optional(),googlePlaceId:r.Yj().trim().max(255).refine(e=>(0,o.C)(e),{message:"Invalid Google Place ID"}).optional()}))}static update(e){return u.create(e).partial().passthrough()}}},106259:(e,t,a)=>{a.d(t,{SQ:()=>m,_2:()=>p,lp:()=>h,mB:()=>f,rI:()=>c,ty:()=>u});var l=a(695155),r=a(847971),n=a(627937),i=a(505917),s=a(499051),o=a(212115),d=a(964269);let c=r.bL,u=r.l9;r.YJ,r.ZL,r.Pb,r.z6,o.forwardRef((e,t)=>{let{className:a,inset:i,children:s,...o}=e;return(0,l.jsxs)(r.ZP,{ref:t,className:(0,d.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",i&&"pl-8",a),...o,children:[s,(0,l.jsx)(n.A,{className:"ml-auto"})]})}).displayName=r.ZP.displayName,o.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(r.G5,{ref:t,className:(0,d.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg",a),...n})}).displayName=r.G5.displayName;let m=o.forwardRef((e,t)=>{let{className:a,sideOffset:n=4,...i}=e;return(0,l.jsx)(r.ZL,{children:(0,l.jsx)(r.UC,{ref:t,sideOffset:n,className:(0,d.cn)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=closed]:animate-dropdown-out data-[state=open]:animate-dropdown-in","origin-[var(--radix-dropdown-menu-content-transform-origin)]",a),...i})})});m.displayName=r.UC.displayName;let p=o.forwardRef((e,t)=>{let{className:a,inset:n,...i}=e;return(0,l.jsx)(r.q7,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",a),...i})});p.displayName=r.q7.displayName,o.forwardRef((e,t)=>
1{let{className:a,children:n,checked:s,...o}=e;return(0,l.jsxs)(r.H_,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:s,...o,children:[(0,l.jsx)("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:(0,l.jsx)(r.VF,{children:(0,l.jsx)(i.A,{className:"size-4"})})}),n]})}).displayName=r.H_.displayName,o.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,l.jsxs)(r.hN,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...i,children:[(0,l.jsx)("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:(0,l.jsx)(r.VF,{children:(0,l.jsx)(s.A,{className:"size-2 fill-current"})})}),n]})}).displayName=r.hN.displayName;let h=o.forwardRef((e,t)=>{let{className:a,inset:n,...i}=e;return(0,l.jsx)(r.JU,{ref:t,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",a),...i})});h.displayName=r.JU.displayName;let f=o.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(r.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...n})});f.displayName=r.wv.displayName},142061:(e,t,a)=>{a.d(t,{A:()=>n});var l=a(695155),r=a(964269);function n(e){let{error:t,className:a}=e;return t&&(0,l.jsx)("div",{className:(0,r.cn)("animate-shake text-sm text-red-500",a),role:"alert",children:(0,l.jsx)("ul",{className:"list-inside list-disc",children:(0,l.jsx)("li",{children:t})})})}},244290:(e,t,a)=>{a.d(t,{A:()=>n});var l=a(695155),r=a(226541);function n(e){let{className:t,variant:a}=e,n={height:"".concat(1,"em"),width:"auto"};return(0,l.jsx)(r.N_,{href:"/",className:"flex items-center text-2xl ".concat(null!=t?t:""),children:a?(0,l.jsx)("img",{src:"light"===a?"/spectra-logo-light.png":"/spectra-logo-dark.png",alt:"Spectra",style:n}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{src:"/spectra-logo-dark.png",alt:"Spectra",className:"block dark:hidden",style:n}),(0,l.jsx)("img",{src:"/spectra-logo-light.png",alt:"Spectra",className:"hidden dark:block",style:n})]})})}},258279:(e,t,a)=>{a.d(t,{R:()=>r});var l=a(730926);let r=(0,l.createServerReference)("4043ac86f7f0f21bb0967fa2ac45480fdeebdd2455",l.callServer,void 0,l.findSourceMapURL,"updatePreferredLanguageAction")},320339:(e,t,a)=>{a.d(t,{r:()=>r});var l=a(730926);let r=(0,l.createServerReference)("00fe326ea163e4726df6c3318ebfc54e90c4d77ba2",l.callServer,void 0,l.findSourceMapURL,"logout")},326367:(e,t,a)=>{a.d(t,{PL:()=>n,wy:()=>i});var l=a(98734);let r=l.Ik({address:l.Yj().trim().min(1).max(255),latitude:l.au.number().finite().gte(-90).lte(90),longitude:l.au.number().finite().gte(-180).lte(180)}),n=l.YO(r).max(10),i=e=>{if(void 0===e)return;if(null===e)return[];let t="string"==typeof e?(()=>{try{return JSON.parse(e)}catch(e){throw Error("merchantLocations must be valid JSON")}})():e,a=n.safeParse(t);if(!a.success)throw Error("merchantLocations validation failed: ".concat(a.error.errors.map(e=>e.message).join(", ")));return a.data}},416629:(e,t,a)=>{a.d(t,{O:()=>i});var l=a(212115),r=a(521878);class n{static transformToSupabaseUserWithMetadata(e){if(!e.email&&!e.phone)throw Error("User email or phone is required");return{...e,email:e.email,phone:e.phone,user_metadata:e.user_metadata}}}function i(){let[e,t]=(0,l.useState)();return(0,l.useEffect)(()=>{r.z.getClientSupabase().auth.getUser().then(e=>{let{data:{user:a}}=e;a&&t(n.transformToSupabaseUserWithMetadata(a))})},[]),(0,l.useMemo)(()=>e,[e])}},458716:(e,t,a)=>{a.d(t,{C:()=>n,f:()=>r});let l=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function r(e){if("string"!=typeof e)return null;let t=e.trim();if(!t)return null;let a=t.startsWith("places/")?t.slice(7).trim():t;return!a||l.test(a)?null:a}function n(e){return null!==r(e)}},532014:(e,t,a)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.VendorTypeSchema=void 0,t.VendorTypeSchema=a(412853).z.enum(["RESTAURANT","BEAUTY"])},573473:(e,t,a)=>{a.d(t,{$:()=>i});var l=a(212115),r=a(215279),n=a(115894);let i=function(e){let{debounceTime:t=2e3,showToast:a=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{toast:i}=(0,n.dj)(),[,s]=(0,l.useTransition)(),[o,d]=(0,l.useState)(null),[c,u]=(0,l.useState)(!1),m=(0,l.useRef)(e),p=(0,l.useRef)(a),h=(0,l.useRef)(i);(0,l.useEffect)(()=>{m.current=e,p.current=a,h.current=i},[e,a,i]);let f=(0,l.useCallback)(async e=>{let t=await m.current(e);return p.current&&t&&!t.success&&t.errors.length>0&&h.current({title:t.errors[0],variant:"destructive"}),t},[]),[,g]=(0,l.useActionState)(async(e,t)=>{try{let e=await f(t);return d(e),e}finally{u(!1)}},null),x=(0,l.useCallback)((e,t)=>{u(!0),s(async()=>{try{let a=await f(e);d(a),t&&a&&t(a)}finally{u(!1)}})},[f,s]),y=(0,l.useCallback)(e=>{u(!0),s(()=>g(e))},[g,s]),v=(0,r._6)(y,t);return{response:o,serverAction:y,debouncedServerAction:v,isPending:c,serverActionSync:x,reset:(0,l.useCallback)(()=>{d(null),u(!1)},[])}}},589254:(e,t,a)=>{a.d(t,{a:()=>s});var l=a(695155),r=a(495604),n=a(3998),i=a(964269);function s(e){let{value:t,onChange:a,isFrError:s,isEnError:o}=e,d=(0,r.useTranslations)("common.lang");return(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(n.$,{type:"button",variant:"en"===t?"default":"outline",className:(0,i.cn)({"bg-destructive text-white":o}),onClick:()=>a("en"),children:d("en")}),(0,l.jsx)(n.$,{type:"button",variant:"fr"===t?"default":"outline",className:(0,i.cn)({"bg-destructive text-white":s}),onClick:()=>a("fr"),children:d("fr")})]})}},631120:(e,t,a)=>{a.d(t,{T:()=>i});var l=a(695155),r=a(212115),n=a(964269);let i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,l.jsx)("textarea",{className:(0,n.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:t,...r})});i.displayName="Textarea"},644590:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecimalSchema=void 0;let l=a(412853);t.DecimalSchema=l.z.union([l.z.number(),l.z.string(),l.z.object({d:l.z.number().array(),e:l.z.number(),s:l.z.number()}).passthrough()])},647804:(e,t,a)=>{a.d(t,{G:()=>u});var l=a(695155),r=a(139068),n=a(258279),i=a(3998),s=a(106259),o=a(573473),d=a(226541),c=a(936832);function u(){let e=(0,c.Km)({required:!1}),{serverAction:t}=(0,o.$)(n.R),a=(0,d.a8)(),u=(0,d.rd)(),m=l=>{e.appUser&&t({preferredLanguage:l}),u.replace(a,{locale:l})};return(0,l.jsxs)(s.rI,{children:[(0,l.jsx)(s.ty,{asChild:!0,children:(0,l.jsxs)(i.$,{variant:"ghost",className:"size-8 rounded-full py-4",children:[(0,l.jsx)(r.A,{className:"size-4"}),(0,l.jsx)("span",{className:"sr-only",children:"Language"})]})}),(0,l.jsxs)(s.SQ,{className:"[&>*]:cursor-pointer",children:[(0,l.jsx)(s._2,{onClick:()=>m("en"),children:(0,l.jsx)("span",{children:"English"})}),(0,l.jsx)(s._2,{onClick:()=>m("fr"),children:(0,l.jsx)("span",{children:"Fran\xe7ais"})})]})]})}},673457:(e,t,a)=>{a.d(t,{S:()=>o});var l=a(695155),r=a(538162),n=a(505917),i=a(212115),s=a(964269);let o=i.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,l.jsx)(r.bL,{ref:t,className:(0,s.cn)("peer size-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...i,children:(0,l.jsx)(r.C1,{className:(0,s.cn)("flex items-center justify-center text-current"),children:(0,l.jsx)(n.A,{className:"size-4"})})})});o.displayName=r.bL.displayName},711186:(e,t,a)=>{a.d(t,{bq:()=>m,eb:()=>g,gC:()=>f,l6:()=>c,yv:()=>u});var l=a(695155),r=a(247887),n=a(924033),i=a(712108),s=a(505917),o=a(212115),d=a(964269);let c=r.bL;r.YJ;let u=r.WT,m=o.forwardRef((e,t)=>{let{className:a,children:i,...s}=e;return(0,l.jsxs)(r.l9,{ref:t,className:(0,d.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...s,children:[i,(0,l.jsx)(r.In,{asChild:!0,children:(0,l.jsx)(n.A,{className:"size-4 opacity-50"})})]})});m.displayName=r.l9.displayName;let p=o.forwardRef((e,t)=>
1{let{className:a,...n}=e;return(0,l.jsx)(r.PP,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,l.jsx)(i.A,{className:"size-4"})})});p.displayName=r.PP.displayName;let h=o.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,l.jsx)(r.wn,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...i,children:(0,l.jsx)(n.A,{className:"size-4"})})});h.displayName=r.wn.displayName;let f=o.forwardRef((e,t)=>{let{className:a,children:n,position:i="popper",...s}=e;return(0,l.jsx)(r.ZL,{children:(0,l.jsxs)(r.UC,{ref:t,className:(0,d.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:i,...s,children:[(0,l.jsx)(p,{}),(0,l.jsx)(r.LM,{className:(0,d.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,l.jsx)(h,{})]})})});f.displayName=r.UC.displayName,o.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(r.JU,{ref:t,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",a),...n})}).displayName=r.JU.displayName;let g=o.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,l.jsxs)(r.q7,{ref:t,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...i,children:[(0,l.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,l.jsx)(r.VF,{children:(0,l.jsx)(s.A,{className:"size-4"})})}),(0,l.jsx)(r.p4,{children:n})]})});g.displayName=r.q7.displayName,o.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(r.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...n})}).displayName=r.wv.displayName},712366:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MerchantProfileAddressStateSchema=void 0,t.MerchantProfileAddressStateSchema=a(412853).z.enum(["QC"])},890467:(e,t,a)=>{function l(e){let t,a=null==e?void 0:e.trim();if(!a)return null;let l=/^https?:\/\//i.test(a)?a:"https://".concat(a);try{t=new URL(l)}catch(e){return null}if("http:"!==t.protocol&&"https:"!==t.protocol)return null;let r=t.hostname.toLowerCase();if(!r.includes(".")||r.startsWith(".")||r.endsWith("."))return null;let n=t.port?":".concat(t.port):"",i="/"!==t.pathname||t.search?t.pathname:"",s="".concat(t.protocol,"//").concat(r).concat(n).concat(i).concat(t.search);return s.length<=255?s:null}function r(e){return null!==l(e)}a.d(t,{bt:()=>l,kW:()=>r})},896549:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MerchantProfileUpdateSchema=t.MerchantProfileUpdateWithoutRefineSchema=t.MerchantProfileUpdateScalarSchema=t.MerchantProfileCreateSchema=t.MerchantProfileCreateWithoutRefineSchema=t.MerchantProfileCreateScalarSchema=t.MerchantProfilePrismaUpdateSchema=t.MerchantProfilePrismaCreateSchema=t.MerchantProfileSchema=t.MerchantProfileWithoutRefineSchema=t.MerchantProfileScalarSchema=t.refineMerchantProfile=void 0;let l=a(412853),r=a(946924),n=a(532014),i=a(712366),s=a(644590),o=l.z.object({id:l.z.string().uuid(),merchantType:r.MerchantTypeSchema,vendorType:n.VendorTypeSchema,name:l.z.string(),descriptionEN:l.z.string().nullish(),descriptionFR:l.z.string().nullish(),street:l.z.string().trim().min(3).max(50),city:l.z.string().trim().min(3).max(50),state:i.MerchantProfileAddressStateSchema,zip:l.z.string().trim(),phone:l.z.string().trim().nullish(),website:l.z.string().trim().nullish(),reservationLink:l.z.string().trim().nullish(),reservationEstablishmentId:l.z.string().trim().max(100).nullish(),promptReservationAfterTicket:l.z.boolean().default(!1),embeddedMap:l.z.string().trim().max(1e3).nullish(),googlePlaceId:l.z.string().max(255).nullish(),merchantAreaEN:l.z.string().default(""),merchantAreaFR:l.z.string().default(""),merchantTypeEN:l.z.string().default(""),merchantTypeFR:l.z.string().default(""),priceLevel:l.z.number().nullish(),latitude:s.DecimalSchema.default(0),longitude:s.DecimalSchema.default(0),merchantLocations:l.z.any().nullish(),activated:l.z.boolean().default(!1),defaultDiscount:l.z.number().gte(20).lte(100).default(20),applicationFeePercentage:l.z.number().gte(0).lte(100).default(5),setTableNumberManually:l.z.boolean().default(!1),weeklyCouponLimit:l.z.number().gte(0).default(999999),dailyCouponLimit:l.z.number().gte(0).default(999999),temporarilySoldOut:l.z.boolean().default(!1),displayOrder:l.z.number().gte(0).default(9999),banners:l.z.array(l.z.string()),statsToken:l.z.string().nullish(),stripeAccountId:l.z.string().nullish(),stripeOnboarded:l.z.boolean().default(!1),createdAt:l.z.coerce.date().default(()=>new Date),updatedAt:l.z.coerce.date().default(()=>new Date)}).strict(),d=l.z.object({daysOff:l.z.array(l.z.unknown()).optional(),ratings:l.z.array(l.z.unknown()).optional(),coupons:l.z.array(l.z.unknown()).optional(),dishAddOnCategories:l.z.array(l.z.unknown()).optional(),merchantCouponRedeemer:l.z.record(l.z.unknown()).optional(),user:l.z.record(l.z.unknown()),merchantOpeningHours:l.z.array(l.z.unknown()).optional(),capacity:l.z.record(l.z.unknown()).optional(),merchantTags:l.z.array(l.z.unknown()).optional(),dishCategories:l.z.array(l.z.unknown()).optional(),orders:l.z.array(l.z.unknown()).optional(),couponDayReminders:l.z.array(l.z.unknown()).optional(),wantToGoItems:l.z.array(l.z.unknown()).optional(),journalEntries:l.z.array(l.z.unknown()).optional()}),c=l.z.object({userId:l.z.string().uuid().optional()});function u(e){return e.refine(e=>(null==e?void 0:e.activated)===void 0||!(null==e?void 0:e.activated)||(null==e?void 0:e.name)!==null&&(null==e?void 0:e.name)!==void 0&&(null==e?void 0:e.street)!==null&&(null==e?void 0:e.street)!==void 0&&(null==e?void 0:e.city)!==null&&(null==e?void 0:e.city)!==void 0&&(null==e?void 0:e.state)!==null&&(null==e?void 0:e.state)!==void 0&&(null==e?void 0:e.zip)!==null&&(null==e?void 0:e.zip)!==void 0,{message:"Merchant profile should be completed before activation."})}t.refineMerchantProfile=u,t.MerchantProfileScalarSchema=o,t.MerchantProfileWithoutRefineSchema=t.MerchantProfileScalarSchema.merge(c).merge(d.partial()),t.MerchantProfileSchema=u(t.MerchantProfileWithoutRefineSchema),t.MerchantProfilePrismaCreateSchema=u(o.partial().passthrough()),t.MerchantProfilePrismaUpdateSchema=l.z.object({id:l.z.string().uuid(),merchantType:r.MerchantTypeSchema,vendorType:n.VendorTypeSchema,name:l.z.string(),descriptionEN:l.z.string().nullish(),descriptionFR:l.z.string().nullish(),street:l.z.string().trim().min(3).max(50),city:l.z.string().trim().min(3).max(50),state:i.MerchantProfileAddressStateSchema,zip:l.z.string().trim(),phone:l.z.string().trim().nullish(),website:l.z.string().trim().nullish(),reservationLink:l.z.string().trim().nullish(),reservationEstablishmentId:l.z.string().trim().max(100).nullish(),promptReservationAfterTicket:l.z.boolean().default(!1),embeddedMap:l.z.string().trim().max(1e3).nullish(),googlePlaceId:l.z.string().max(255).nullish(),merchantAreaEN:l.z.string().default(""),merchantAreaFR:l.z.string().default(""),merchantTypeEN:l.z.string().default(""),merchantTypeFR:l.z.string().default(""),priceLevel:l.z.union([l.z.number().nullish(),l.z.record(l.z.unknown())]),latitude:s.DecimalSchema.default(0),longitude:s.DecimalSchema.default(0),merchantLocations:l.z.any().nullish(),activated:l.z.boolean().default(!1),defaultDiscount:l.z.union([l.z.number().gte(20).lte(100).default(20),l.z.record(l.z.unknown())]),applicationFeePercentage:l.z.union([l.z.number().gte(0).lte(100).default(5),l.z.record(l.z.unknown())]),setTableNumberManually:l.z.boolean().default(!1),weeklyCouponLimit:l.z.union([l.z.number().gte(0).default(999999),l.z.record(l.z.unknown())]),dailyCouponLimit:l.z.union([l.z.number().gte(0).default(999999),l.z.record(l.z.unknown())]),temporarilySoldOut:l.z.boolean().default(!1),displayOrder:l.z.union([l.z.number().gte(0).default(9999),l.z.record(l.z.unknown())]),banners:l.z.array(l.z.string()),statsToken:l.z.string().nullish(),stripeAccountId:l.z.string().nullish(),stripeOnboarded:l.z.boolean().default(!1),createdAt:l.z.coerce.date().default(()=>new Date),updatedAt:l.z.coerce.date().default(()=>new Date)}).partial().passthrough(),t.MerchantProfileCreateScalarSchema=o.partial({merchantType:!0,vendorType:!0,promptReservationAfterTicket:!0,merchantAreaEN:!0,merchantAreaFR:!0,merchantTypeEN:!0,merchantTypeFR:!0,latitude:!0,longitude:!0,activated:!0,defaultDiscount:!0,applicationFeePercentage:!0,setTableNumberManually:!0,weeklyCouponLimit:!0,dailyCouponLimit:!0,temporarilySoldOut:!0,displayOrder:!0,banners:!0,stripeOnboarded:!0,createdAt:!0,updatedAt:!0}),t.MerchantProfileCreateWithoutRefineSchema=t.MerchantProfileCreateScalarSchema.merge(c),t.MerchantProfileCreateSchema=u(t.MerchantProfileCreateWithoutRefineSchema),t.MerchantProfileUpdateScalarSchema=o.partial(),t.MerchantProfileUpdateWithoutRefineSchema=t.MerchantProfileUpdateScalarSchema.merge(c.partial()),t.MerchantProfileUpdateSchema=u(t.MerchantProfileUpdateWithoutRefineSchema)},946924:(e,t,a)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.MerchantTypeSchema=void 0,t.MerchantTypeSchema=a(412853).z.enum(["DINE_IN","COUPONS"])},960377:(e,t,a)=>{a.d(t,{A:()=>R});var l=a(695155),r=a(866942),n=a(834486),i=a(746671),s=a(35299),o=a(886651),d=a(121873),c=a(495604),u=a(212115),m=a(422544),p=a(474879),h=a(965142);function f(e){let{register:t,setValue:a,name:r="zip",required:n=!1,disabled:i=!1}=e;return(0,l.jsx)(h.p,{...t(r,{required:n,onChange:e=>{let t=(e=>{let t=e.replace(/[^a-zA-Z0-9]/g,"").toUpperCase(),{length:a}=t;return a<=3?t:"".concat(t.slice(0,3)," ").concat(t.slice(3,6))})(e.target.value);e.target.value=t,a(r,t,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}}),required:n,placeholder:"A1A 1A1",maxLength:7,disabled:i})}var g=a(3998),x=a(376444),y=a(631120),v=a(226541),b=a(964269),j=a(458716),N=a(890467),z=a(851194),w=a(99689),S=a(521878),C=a(589254),k=a(142061);function T(e){let{text:t,className:a}=e;return(0,l.jsx)("p",{className:(0,b.cn)("mt-1 text-[12px] text-muted-foreground",a),children:t})}var A=a(673457),P=a(624805);let _=e=>{let{onValueChange:t,...a}=e;return(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:(0,l.jsx)("span",{className:"text-gray-500",children:"%"})}),(0,l.jsx)(h.p,{...a,id:"discount",placeholder:"20",className:"pl-7",onChange:e=>{t(e.target.value.replace(/[^\d]/g,""))},onBlur:e=>{let a=e.target.value.replace(/[^\d]/g,"");Number(a)<P.M.MIN_DISCOUNT?a=P.M.MIN_DISCOUNT.toString():Number(a)>P.M.MAX_DISCOUNT&&(a=P.M.MAX_DISCOUNT.toString()),t(a)}})]})};var M=a(711186);function R(e){var t,a,R,L,D,I,E,U,V,F,O,J,q,W,Y,$,G,Z,B,H,Q,X;let{merchantType:K,merchantProfile:ee,onSubmit:et,isLoading:ea,loadingProgress:el,showUpdatePassword:er}=e,en=(0,c.useTranslations)("merchant.profile"),ei=(0,c.useTranslations)("merchant"),es=(0,c.useTranslations)("common"),[eo,ed]=(0,u.useState)("en"),[ec,eu]=(0,u.useState)((null==ee?void 0:ee.weeklyCouponLimit)!==999999&&(null==ee?void 0:ee.weeklyCouponLimit)!==void 0),[em,ep]=(0,u.useState)((null==ee?void 0:ee.dailyCouponLimit)!==999999&&(null==ee?void 0:ee.dailyCouponLimit)!==void 0),[eh,ef]=(0,u.useState)(ee?"manual":"search"),[eg,ex]=(0,u.useState)(""),[ey,ev]=(0,u.useState)([]),[eb,ej]=(0,u.useState)(""),[eN,ez]=(0,u.useState)(!1),[ew,eS]=(0,u.useState)(null),[eC,ek]=(0,u.useState)(null),{register:eT,handleSubmit:eA,setValue:eP,clearErrors:e_,formState:{errors:eM,isDirty:eR,dirtyFields:eL}}=(0,m.mN)({shouldUnregister:!1,resolver:(0,r.u)(ee?w.S.update(ei):w.S.create(ei)),defaultValues:{id:(0,p.A)(),...i.pick(ee,["id","name","street","city","state","zip","phone","descriptionEN","descriptionFR","defaultDiscount","website","weeklyCouponLimit","dailyCouponLimit"]),vendorType:null!=(G=null==ee?void 0:ee.vendorType)?G:"RESTAURANT",defaultDiscount:null!=(Z=null==ee?void 0:ee.defaultDiscount)?Z:20,weeklyCouponLimit:null!=(B=null==ee?void 0:ee.weeklyCouponLimit)?B:999999,dailyCouponLimit:null!=(H=null==ee?void 0:ee.dailyCouponLimit)?H:999999,state:null!=(Q=null==ee?void 0:ee.state)?Q:"QC"}});console.log("FORM ERRORS:",eM);let eD=e=>{let t=e.replace(/[^\d]/g,""),a=t.length;return a<4?t:a<7?"(".concat(t.slice(0,3),") ").concat(t.slice(3)):"(".concat(t.slice(0,3),") ").concat(t.slice(3,6),"-").concat(t.slice(6,10))},eI=()=>{ek(null),ef("search"),eP("googlePlaceId",void 0,{shouldDirty:!0,shouldValidate:!1}),eP("merchantLocations",void 0,{shouldDirty:!0,shouldValidate:!1})},eE=async()=>{let e=eg.trim();if(e.length<4){ej(en("update.form.google_place.min_query")),ev([]);return}ez(!0),ej(""),ev([]);try{let t=await fetch("/api/public/places/searchText?q=".concat(encodeURIComponent(e)),{cache:"no-store"}),a=await t.json();if(!t.ok)throw Error("Google Places search failed");let l=Array.isArray(a.results)?a.results:[];if(0===l.length)return void ej(en("update.form.google_place.no_results"));ev(l)}catch(e){ej(en("update.form.google_place.error"))}finally{ez(!1)}},eU=async e=>{eS(e.placeId),ej("");try{let t=await fetch("/api/public/places/".concat(encodeURIComponent(e.placeId),"/onboarding"),{cache:"no-store"}),a=await t.json();if(!t.ok||!("placeId"in a))throw Error("Google Places details failed");eV(a)}catch(e){ej(en("update.form.google_place.error"))}finally{eS(null)}},eV=e=>{var t,a,l,r,n,i;let s=(0,j.f)(e.placeId);if(!s)return void ej(en("update.form.google_place.error"));let o=null!=(a=null!=(t=e.street)?t:e.address)?a:"",d=null!=(l=e.city)?l:"",c=null!=(r=e.zip)?r:"",u=(n=e.website,null!=(i=(0,N.bt)(n))?i:void 0),m=(e=>{var t;let a=null!=(t=null==e?void 0:e.replace(/[^\d]/g,""))?t:"",l=11===a.length&&a.startsWith("1")?a.slice(1):a;return 10===l.length?eD(l):void 0})(e.phone),p=!!(o&&d&&c);ek(e),ef(p?"google":"manual"),ex(e.address?"".concat(e.name," - ").concat(e.address):e.name),ev([]),ej(""),eP("name",e.name,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("street",o,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("city",d,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("state","QC",{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("zip",c,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("phone",m,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("website",u,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("vendorType","RESTAURANT",{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("defaultDiscount",20,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),eP("weeklyCouponLimit",999999,{shouldDirty:!0,shouldValidate:!1}),eP("dailyCouponLimit",999999,{shouldDirty:!0,shouldValidate:!1}),eP("googlePlaceId",s,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),"number"==typeof e.latitude&&"number"==typeof e.longitude&&o&&eP("merchantLocations",[{address:o,latitude:e.latitude,longitude:e.longitude}],{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})},eF=!!ee||"manual"===eh,eO=!!ee||"manual"===eh||"google"===eh;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("form",{onSubmit:eA
1(e=>{ee?et(S.z.dirtyValues(eL,e)):et(e)}),className:"my-4 space-y-4",children:[(0,l.jsx)("input",{type:"hidden",...eT("googlePlaceId",{setValueAs:e=>e||void 0})}),(0,l.jsxs)("div",{className:"space-y-4 pr-2",children:[!ee&&(0,l.jsxs)("div",{className:"rounded-lg border bg-card p-3",children:[(0,l.jsx)(x.J,{htmlFor:"googlePlaceSearch",children:en("update.form.google_place.label")}),(0,l.jsx)("p",{className:"mb-2 text-xs text-muted-foreground",children:en("update.form.google_place.hint")}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(h.p,{id:"googlePlaceSearch",value:eg,placeholder:en("update.form.google_place.placeholder"),onChange:e=>ex(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),eE())}}),(0,l.jsx)(g.$,{type:"button",variant:"secondary",size:"icon",onClick:()=>void eE(),disabled:eN||eg.trim().length<4,title:en("update.form.google_place.search"),children:eN?(0,l.jsx)(s.A,{className:"size-4 animate-spin"}):(0,l.jsx)(o.A,{className:"size-4"})})]}),eb&&(0,l.jsx)("p",{className:"mt-2 text-xs text-destructive",children:eb}),eC&&"google"===eh&&(0,l.jsxs)("div",{className:"mt-3 rounded-md bg-muted p-3 text-sm",children:[(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(d.A,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"font-medium",children:eC.name}),(0,l.jsx)("div",{className:"text-xs text-muted-foreground",children:null!=(X=eC.address)?X:en("update.form.google_place.address_unavailable")}),(0,l.jsx)("div",{className:"mt-2 text-xs text-muted-foreground",children:en("update.form.google_place.remaining_fields")})]})]}),(0,l.jsx)(g.$,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:eI,children:en("update.form.google_place.change_selection")})]}),ey.length>0&&"google"!==eh&&(0,l.jsx)("div",{className:"mt-2 max-h-48 divide-y overflow-y-auto rounded-md border",children:ey.map(e=>{var t;return(0,l.jsxs)("button",{type:"button",className:"flex w-full gap-2 p-2 text-left text-sm hover:bg-muted",onClick:()=>void eU(e),disabled:null!==ew,children:[(0,l.jsx)(d.A,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"font-medium",children:e.name}),(0,l.jsx)("div",{className:"text-xs text-muted-foreground",children:null!=(t=e.address)?t:en("update.form.google_place.address_unavailable")})]}),ew===e.placeId&&(0,l.jsx)(s.A,{className:"mt-0.5 size-4 animate-spin"})]},e.placeId)})}),"manual"!==eh&&(0,l.jsx)(g.$,{type:"button",variant:"outline",className:"mt-3 w-full",onClick:()=>{eI(),ef("manual")},children:en("update.form.google_place.manual_entry")})]}),eF&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"langSwitch",children:es("lang.label")}),(0,l.jsx)(C.a,{value:eo,onChange:ed,isFrError:!!(null==eM||null==(t=eM.descriptionFR)?void 0:t.message),isEnError:!!(null==eM||null==(a=eM.descriptionEN)?void 0:a.message)}),(0,l.jsx)(T,{text:es("lang.hint")})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(x.J,{htmlFor:"description",children:[en("update.form.description.label")," ",(0,l.jsx)(T,{text:eo.toUpperCase(),className:"inline"})]}),(0,l.jsx)(y.T,{...eT("descriptionEN",{maxLength:1e3,setValueAs:e=>e||void 0}),placeholder:en("update.form.description.placeholder"),rows:4,className:(0,b.cn)((null==eM||null==(R=eM.descriptionEN)?void 0:R.message)&&"border-destructive","fr"===eo&&"hidden")}),(0,l.jsx)(k.A,{error:null==eM||null==(L=eM.descriptionEN)?void 0:L.message}),(0,l.jsx)(y.T,{...eT("descriptionFR",{maxLength:1e3,setValueAs:e=>e||void 0}),placeholder:en("update.form.description.placeholder"),rows:4,className:(0,b.cn)((null==eM||null==(D=eM.descriptionFR)?void 0:D.message)&&"border-destructive","en"===eo&&"hidden")}),(0,l.jsx)(k.A,{error:null==eM||null==(I=eM.descriptionFR)?void 0:I.message})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"name",children:en("update.form.name.label")}),(0,l.jsx)(h.p,{...eT("name",{required:!0}),placeholder:en("update.form.name.placeholder"),required:!0}),(0,l.jsx)(k.A,{error:null==eM||null==(E=eM.name)?void 0:E.message})]}),!ee&&(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"vendorType",children:en("update.form.vendor_type.label")}),(0,l.jsxs)(M.l6,{...eT("vendorType",{required:!0}),defaultValue:"RESTAURANT",onValueChange:e=>{eP("vendorType",e,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})},children:[(0,l.jsx)(M.bq,{children:(0,l.jsx)(M.yv,{placeholder:en("update.form.vendor_type.placeholder")})}),(0,l.jsx)(M.gC,{children:P.M.VENDOR_TYPES.map(e=>(0,l.jsx)(M.eb,{value:e,children:es("vendor_type.".concat(e))},e))})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"street",children:en("update.form.address.street.label")}),(0,l.jsx)(h.p,{...eT("street",{maxLength:255}),required:!0,placeholder:en("update.form.address.street.placeholder")}),(0,l.jsx)(k.A,{error:null==eM||null==(U=eM.street)?void 0:U.message})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"city",children:en("update.form.address.city.label")}),(0,l.jsx)(h.p,{...eT("city",{maxLength:255}),required:!0,placeholder:en("update.form.address.city.placeholder")}),(0,l.jsx)(k.A,{error:null==eM||null==(V=eM.city)?void 0:V.message})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"state",children:en("update.form.address.state.label")}),(0,l.jsx)(h.p,{...eT("state"),disabled:!0,placeholder:en("update.form.address.state.placeholder"),defaultValue:"QC"}),(0,l.jsx)(k.A,{error:null==eM||null==(F=eM.state)?void 0:F.message})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"zip",children:en("update.form.address.zip.label")}),(0,l.jsx)(f,{register:eT,setValue:eP,name:"zip",required:!ee}),(0,l.jsx)(k.A,{error:null==eM||null==(O=eM.zip)?void 0:O.message})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"phone",children:en("update.form.phone.label")}),(0,l.jsx)(h.p,{...eT("phone",{setValueAs:e=>e||void 0,maxLength:255}),type:"tel",placeholder:en("update.form.phone.placeholder"),onChange:e=>{eP("phone",eD(e.target.value),{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})},maxLength:14}),(0,l.jsx)(k.A,{error:null==eM||null==(J=eM.phone)?void 0:J.message})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"website",children:en("update.form.
1website.label")}),(0,l.jsx)(h.p,{...eT("website",{setValueAs:e=>e||void 0,maxLength:255}),placeholder:en("update.form.website.placeholder")}),(0,l.jsx)(k.A,{error:null==eM||null==(q=eM.website)?void 0:q.message})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.J,{htmlFor:"defaultDiscount",children:en("update.form.discount.label")}),(0,l.jsx)(_,{...eT("defaultDiscount",{valueAsNumber:!0}),onValueChange:e=>{eP("defaultDiscount",e?Number(e):20,{shouldValidate:!0,shouldDirty:!0})}}),(0,l.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:en("update.form.discount.hint")}),(0,l.jsx)(k.A,{error:null==eM||null==(W=eM.defaultDiscount)?void 0:W.message})]}),"COUPONS"===K&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"mb-2 flex items-center space-x-2",children:[(0,l.jsx)(A.S,{id:"weeklyLimitEnabled",checked:ec,onCheckedChange:e=>{let t=!0===e;eu(t),t||(eP("weeklyCouponLimit",999999,{shouldDirty:!0,shouldValidate:!1}),e_("weeklyCouponLimit"))}}),(0,l.jsx)(x.J,{htmlFor:"weeklyLimitEnabled",children:en("update.form.coupon_limit.label")})]}),ec&&(0,l.jsxs)(n.P.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},children:[(0,l.jsx)(h.p,{...eT("weeklyCouponLimit",{setValueAs:e=>{if(""===e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}}),placeholder:en("update.form.coupon_limit.placeholder"),type:"number",min:0}),(0,l.jsx)(k.A,{error:null==eM||null==(Y=eM.weeklyCouponLimit)?void 0:Y.message})]})]}),"COUPONS"===K&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"mb-2 flex items-center space-x-2",children:[(0,l.jsx)(A.S,{id:"dailyLimitEnabled",checked:em,onCheckedChange:e=>{let t=!0===e;ep(t),t||(eP("dailyCouponLimit",999999,{shouldDirty:!0,shouldValidate:!1}),e_("dailyCouponLimit"))}}),(0,l.jsx)(x.J,{htmlFor:"dailyLimitEnabled",children:en("update.form.daily_coupon_limit.label")})]}),em&&(0,l.jsxs)(n.P.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},children:[(0,l.jsx)(h.p,{...eT("dailyCouponLimit",{setValueAs:e=>{if(""===e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}}),placeholder:en("update.form.daily_coupon_limit.placeholder"),type:"number",min:0}),(0,l.jsx)(k.A,{error:null==eM||null==($=eM.dailyCouponLimit)?void 0:$.message})]})]})]})]}),eO&&(0,l.jsxs)("div",{className:"relative",children:[er&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v.N_,{href:z.bw.updateEmail,className:"mb-4 block text-center text-sm text-primary hover:underline",children:es("auth.email.title")}),(0,l.jsx)(v.N_,{href:z.bw.updatePassword,className:"mb-4 block text-center text-sm text-primary hover:underline",children:en("update.change_password")})]}),Object.keys(eM).length>0&&(0,l.jsx)("div",{className:"mb-4 text-center text-sm text-destructive",children:en("validation.some_fields_invalid")}),(0,l.jsx)(g.$,{type:"submit",className:"w-full",disabled:ea||!eR||Object.keys(eM).length>0,children:en("update.save_changes")}),ea&&(0,l.jsx)(n.P.div,{className:"absolute inset-x-0 bottom-0 h-1 bg-primary",initial:{width:0},animate:{width:"".concat(el,"%")},transition:{duration:.2}})]})]})})}}}]);

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.