!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="88d66e1d-106f-4172-9740-401c9bb6d543",e._sentryDebugIdIdentifier="sentry-dbid-88d66e1d-106f-4172-9740-401c9bb6d543")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3632],{92602:function(e,t,d){d.d(t,{Z:function(){return g}});var n=d(19580),i=d(10102),r=d(84594),l=d(21110),a=d(85500),o=d(42640),s=d(62993),u=d(99306),c=d(42012),f=d(2803),_=d(79917),p=d(42897);function g(e){let{keywordModalOpen:t,setKeywordModalOpen:d,currentEditingPage:g,tempKeywords:m,setTempKeywords:I,url:b,saveKeywords:h}=e,[w,N]=(0,o.useState)(""),[y,x]=(0,o.useState)(!1),A=(0,l.useParams)(),{mutateAsync:L}=_.h.website.saveKeywords.useMutation(),E=(0,f.pm)(),T=_.h.useUtils(),v=async()=>{x(!0);try{await L({websiteId:String(A.id),pageId:g,keywords:m});let e=T.website.getRoutes.getData({websiteId:String(A.id)}),t=T.website.getEnabledRoutesPage.getData({websiteId:String(A.id)});if(t&&T.website.getEnabledRoutesPage.setData({websiteId:String(A.id)},t.map(e=>e.id===g?{...e,keywords:m}:e)),e){let t={...e,urlGroups:(0,a.Z)(e=>e.map(e=>e.id===g?{...e,keywords:m}:e),e.urlGroups),sitemapGroups:e.sitemapGroups?(0,a.Z)(e=>null==e?void 0:e.map(e=>e.id===g?{...e,keywords:m}:e),e.sitemapGroups):void 0};T.website.getRoutes.setData({websiteId:String(A.id)},t)}}catch(e){E.toast({title:"Error",description:e.message})}finally{x(!1),h(),I([])}},M=()=>{w.trim()&&(I(e=>[...e,w.trim()]),N(""))};return(0,n.jsx)(s.Vq,{open:t,onOpenChange:d,children:(0,n.jsxs)(s.cZ,{className:"sm:max-w-[425px]",children:[(0,n.jsx)(s.fK,{children:(0,n.jsxs)(s.$N,{children:["Edit Keywords for ",b]})}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:m.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center rounded-full bg-gray-100 px-3 py-1",children:[(0,n.jsx)("span",{children:e.trim()}),(0,n.jsx)(i.Z,{className:"ml-1 h-3 w-3 cursor-pointer p-0 text-gray-900",onClick:()=>{I(e=>e.filter((e,d)=>d!==t))}})]},t))}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(c._,{htmlFor:"new-keyword",children:"Add new keyword"}),(0,n.jsxs)("div",{className:"flex space-x-2",children:[(0,n.jsx)(u.I,{id:"new-keyword",placeholder:"Enter keyword",value:w,onChange:e=>N(e.target.value),onKeyDown:e=>{"Enter"===e.key&&M()}}),(0,n.jsxs)(p.z,{onClick:M,disabled:y||!w,children:[(0,n.jsx)(r.Z,{className:"mr-2 h-4 w-4"}),"Add"]})]})]}),(0,n.jsx)(p.z,{onClick:v,className:"w-full",disabled:y,children:y?"Saving...":"Save Changes"})]})]})})}},27659:function(e,t,d){d.d(t,{_:function(){return r}});var n=d(42640),i=d(80013);function r(e,t){let d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{initializeWithValue:r=!0}=d,l=(0,n.useCallback)(e=>d.serializer?d.serializer(e):JSON.stringify(e),[d]),a=(0,n.useCallback)(e=>{let n;if(d.deserializer)return d.deserializer(e);if("undefined"===e)return;let i=t instanceof Function?t():t;try{n=JSON.parse(e)}catch(e){return console.error("Error parsing JSON:",e),i}return n},[d,t]),o=(0,n.useCallback)(()=>{let d=t instanceof Function?t():t;try{let t=window.localStorage.getItem(e);return t?a(t):d}catch(t){return console.warn("Error reading localStorage key “".concat(e,"”:"),t),d}},[t,e,a]),[s,u]=(0,n.useState)(()=>r?o():t instanceof Function?t():t),c=(0,i.$0)(t=>{try{let d=t instanceof Function?t(o()):t;window.localStorage.setItem(e,l(d)),u(d),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(n){console.warn("Error setting localStorage key “".concat(e,"”:"),n),window.localStorage.removeItem("REACT_QUERY_OFFLINE_CACHE");let d=t instanceof Function?t(o()):t;window.localStorage.setItem(e,l(d)),u(d),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}}),f=(0,i.$0)(()=>{let d=t instanceof Function?t():t;window.localStorage.removeItem(e),u(d),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))});(0,n.useEffect)(()=>{u(o())},[e]);let _=(0,n.useCallback)(t=>{t.key&&t.key!==e||u(o())},[e,o]);return(0,i.OR)("storage",_),(0,i.OR)("local-storage",_),[s,c,f]}},1046:function(e,t,d){d.d(t,{Cd:function(){return s},X:function(){return u},bZ:function(){return o}});var n=d(19580),i=d(42640),r=d(63452),l=d(7273);let a=(0,r.j)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",warning:"border-yellow-300 text-yellow-600 dark:border-yellow-400 dark:text-yellow-300 [&>svg]:text-yellow-500"}},defaultVariants:{variant:"default"}}),o=i.forwardRef((e,t)=>{let{className:d,variant:i,...r}=e;return(0,n.jsx)("div",{ref:t,role:"alert",className:(0,l.cn)(a({variant:i}),d),...r})});o.displayName="Alert";let s=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)("h5",{ref:t,className:(0,l.cn)("mb-1 font-medium leading-none tracking-tight",d),...i})});s.displayName="AlertTitle";let u=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("text-sm [&_p]:leading-relaxed",d),...i})});u.displayName="AlertDescription"},62993:function(e,t,d){d.d(t,{$N:function(){return g},Be:function(){return m},PK:function(){return u},Vq:function(){return o},cN:function(){return p},cZ:function(){return f},fK:function(){return _},hg:function(){return s}});var n=d(19580),i=d(42640),r=d(34410),l=d(20354),a=d(7273);let o=r.fC,s=r.xz,u=r.h_;r.x8;let c=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)(r.aV,{ref:t,className:(0,a.cn)("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",d),...i})});c.displayName=r.aV.displayName;let f=i.forwardRef((e,t)=>{let{className:d,children:i,overlayClassName:o,...s}=e;return(0,n.jsxs)(u,{children:[(0,n.jsx)(c,{className:o}),(0,n.jsxs)(r.VY,{ref:t,className:(0,a.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",d),...s,children:[i,(0,n.jsxs)(r.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,n.jsx)(l.Pxu,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=r.VY.displayName;let _=e=>{let{className:t,...d}=e;return(0,n.jsx)("div",{className:(0,a.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...d})};_.displayName="DialogHeader";let p=e=>{let{className:t,...d}=e;return(0,n.jsx)("div",{className:(0,a.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...d})};p.displayName="DialogFooter";let g=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)(r.Dx,{ref:t,className:(0,a.cn)("text-lg font-semibold leading-none tracking-tight",d),...i})});g.displayName=r.Dx.displayName;let m=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)(r.dk,{ref:t,className:(0,a.cn)("text-sm text-muted-foreground",d),...i})});m.displayName=r.dk.displayName},73987:function(e,t,d){d.d(t,{r:function(){return a}});var n=d(19580),i=d(42640),r=d(56189),l=d(7273);let a=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)(r.fC,{className:(0,l.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",d),...i,ref:t,children:(0,n.jsx)(r.bU,{className:(0,l.cn)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})});a.displayName=r.fC.displayName},59822:function(e,t,d){d.d(t,{SP:function(){return s},dr:function(){return o},mQ:function(){return a},nU:function(){return u}});var n=d(19580),i=d(42640),r=d(38551),l=d(7273);let a=r.fC,o=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)(r.aV,{ref:t,className:(0,l.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",d),...i})});o.displayName=r.aV.displayName;let s=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)(r.xz,{ref:t,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",d),...i})});s.displayName=r.xz.displayName;let u=i.forwardRef((e,t)=>{let{className:d,...i}=e;return(0,n.jsx)(r.VY,{ref:t,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d),...i})});u.displayName=r.VY.displayName},55720:function(e,t,d){d.d(t,{_v:function(){return u},aJ:function(){return s},pn:function(){return a},u:function(){return o}});var n=d(19580),i=d(42640),r=d(52045),l=d(7273);let a=r.zt,o=r.fC,s=r.xz,u=i.forwardRef((e,t)=>{let{className:d,sideOffset:i=4,...a}=e;return(0,n.jsx)(r.VY,{ref:t,sideOffset:i,className:(0,l.cn)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",d),...a})});u.displayName=r.VY.displayName},17742:function(e,t,d){d.d(t,{Bi:function(){return H},D1:function(){return l},t4:function(){return r}});var n,i,r,l,a=d(10612),o=d(58527),s=d(24060),u=d(46812),c=d(38318),f=d(76278),_=d(21336),p=d(51273),g=d(95566),m=d(96775),I=d(98555),b=d(2796),h=d(61611),w=d(64802);function N(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return N=function(){return e},e}function y(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return y=function(){return e},e}function x(){let e=(0,a._)(["CURRENT_TIMESTAMP(3)"]);return x=function(){return e},e}function A(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return A=function(){return e},e}function L(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return L=function(){return e},e}function E(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return E=function(){return e},e}function T(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return T=function(){return e},e}function v(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return v=function(){return e},e}function M(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return M=function(){return e},e}function U(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return U=function(){return e},e}function k(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return k=function(){return e},e}function R(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return R=function(){return e},e}function K(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return K=function(){return e},e}function S(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return S=function(){return e},e}function C(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return C=function(){return e},e}function z(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return z=function(){return e},e}function F(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return F=function(){return e},e}function B(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return B=function(){return e},e}function P(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return P=function(){return e},e}function $(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return $=function(){return e},e}function j(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return j=function(){return e},e}function D(){let e=(0,a._)(["CURRENT_TIMESTAMP"]);return D=function(){return e},e}let O=(0,c.Z$)(e=>"pinurl_".concat(e)),V=O("pins",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),url:(0,f.L7)("url",{length:756}),outboundUrl:(0,f.L7)("outbound_url",{length:756}),pinterestId:(0,f.L7)("pinterest_id",{length:256}),pageId:(0,f.L7)("page_id",{length:128}),status:(0,f.L7)("status",{length:40}),title:(0,f.L7)("title",{length:400}),pinterestTitle:(0,f.L7)("pinterest_title",{length:400}),description:(0,_.fL)("description"),avg_color:(0,f.L7)("avg_color",{length:20}),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),customTitles:(0,p.AV)("custom_titles"),customTexts:(0,p.AV)("custom_texts"),createdAt:(0,g.AB)("created_at").default((0,s.i6)(N())).notNull(),triggerAt:(0,g.AB)("trigger_at").notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow(),template:(0,f.L7)("template",{length:256}),templateId:(0,f.L7)("template_id",{length:128}),colorPaletteId:(0,f.L7)("color_palette_id",{length:128}),boardId:(0,f.L7)("boardId",{length:256}),imageUrl:(0,_.fL)("image_url"),keywords:(0,_.fL)("keywords")},e=>({urlIndex:(0,m.Kz)("url_idx").on(e.url),websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId),templateIdIndex:(0,m.Kz)("template_id_idx").on(e.templateId),colorPaletteIdIndex:(0,m.Kz)("color_palette_id_idx").on(e.colorPaletteId),statusIndex:(0,m.Kz)("status_idx").on(e.status),pageIdIndex:(0,m.Kz)("page_id_idx").on(e.pageId),triggerAtIndex:(0,m.Kz)("trigger_at_idx").on(e.triggerAt)}));(0,u.lE)(V,e=>{let{many:t,one:d}=e;return{images:t(Q),website:d(Y,{fields:[V.websiteId],references:[Y.id]}),board:d(X,{fields:[V.boardId],references:[X.boardId]}),page:d(el,{fields:[V.pageId],references:[el.id]}),templateRelation:d(ep,{fields:[V.templateId],references:[ep.id]}),colorPalette:d(em,{fields:[V.colorPaletteId],references:[em.id]})}}),(n=r||(r={})).YOUTUBE="youtube",n.MEDIUM="medium",n.REDBUBBLE="redbubble",n.SHOPIFY="shopify",n.ETSY="etsy",n.AMAZON="amazon",(i=l||(l={})).FETCH_YOUTUBE_RECOMENDATIONS="fetch_youtube_recomendations",i.FETCH_YOUTUBE_AUTHOR="fetch_youtube_author",i.FETCH_MEDIUM_CONTENT="fetch_medium_content",i.FETCH_MEDIUM_FEATURED="fetch_medium_featured_image",i.FETCH_MEDIUM_RELATED="fetch_medium_related",i.FETCH_SHOPIFY_RELATED="fetch_shopify_related",i.FETCH_SHOPIFY_FROM_DESCRIPTION="fetch_shopify_from_description",i.FETCH_SHOPIFY_SUGGESTION_FROM_BLOG="fetch_shopify_suggestion_from_blog",i.FETCH_REDBUBBLE_THUMBNAILS="fetch_redbubble_thumbnails",i.FETCH_REDBUBBLE_RELATED="fetch_redbubble_related";let H={fetch_youtube_recomendations:!1,fetch_youtube_author:!1,fetch_medium_content:!0,fetch_medium_featured_image:!0,fetch_medium_related:!1,fetch_shopify_related:!1,fetch_shopify_from_description:!1,fetch_shopify_suggestion_from_blog:!1,fetch_redbubble_thumbnails:!0,fetch_redbubble_related:!1},Y=O("websites",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),userId:(0,f.L7)("user_id",{length:128}).notNull(),sitemap:(0,f.L7)("sitemap",{length:256}),accountId:(0,f.L7)("account_id",{length:256}),adId:(0,f.L7)("ad_id",{length:256}),url:(0,f.L7)("url",{length:256}),name:(0,f.L7)("name",{length:256}),pinsUrl:(0,f.L7)("pins_url",{length:256}),generationType:(0,I.MI)("generation_type",["EFFECTIVE","DEFAULT"]).default("DEFAULT"),scheduleTo:(0,g.AB)("schedule_to"),createdAt:(0,g.AB)("created_at").default((0,s.i6)(y())).notNull(),hardcodedTemplates:(0,p.AV)("hardcoded_templates"),regenerationsLeft:(0,b.e$)("regenerations_left"),minImageHeight:(0,b.e$)("min_image_height"),minImageWidth:(0,b.e$)("min_image_width"),priorityByTemplate:(0,p.AV)("priority_by_template"),updatedAt:(0,g.AB)("updatedAt").onUpdateNow(),totalPages:(0,b.e$)("total_pages"),status:(0,f.L7)("status",{length:40}),timezone:(0,f.L7)("timezone",{length:100}),prompt:(0,_.fL)("prompt"),pinCount:(0,b.e$)("pin_count").notNull().default(20),disableNumberLift:(0,b.e$)("disable_number_lift").default(0),aiCredits:(0,b.e$)("ai_credits").default(100),pinsStatus:(0,I.MI)("pins_status",["UPLOAD_PAUSED","GENERATION_PAUSED"]),prioritizeLatestPages:(0,b.e$)("prioritize_latest_pages").default(0),imagesStrictness:(0,I.MI)("images_strictness",["USE_ALL","USE_VISIBLE"]).default("USE_ALL"),imagesObjectFit:(0,I.MI)("templates_object_fit",["COVER","CONTAIN"]),aiStyle:(0,I.MI)("ai_style",["photorealistic","anime","pop-art","futuristic","boho-chic","minimalist-luxe"]).default("photorealistic"),fetchImagesFromPage:(0,b.e$)("fetch_images_from_page").default(1),fetchImagesFromFeaturedImage:(0,b.e$)("fetch_images_from_featured_image").default(0),bestHoursStart:(0,h.fz)("best_hours_start").default(19),bestHoursEnd:(0,h.fz)("best_hours_end").default(23),overridesByPlatform:(0,p.AV)("overrides_by_platform"),platforms:(0,p.AV)("platforms"),type:(0,I.MI)("type",["SITEMAP","ETSY","OTHER"]).default("SITEMAP")},e=>({urlIndex:(0,m.Kz)("url_idx").on(e.url)}));(0,u.lE)(Y,e=>{let{many:t,one:d}=e;return{user:d(G,{fields:[Y.userId],references:[G.id]}),pins:t(V),pages:t(el),account:d(Z,{fields:[Y.accountId],references:[Z.providerAccountId]}),pinImages:t(Q),boards:t(X),templates:t(ep),customization:d(eg,{fields:[Y.id],references:[eg.websiteId]}),disabledImages:t(q),duplicatedImages:t(ed),duplicatedUIBlocks:t(ee),disabledUIBlocks:t(et),disabledRoutes:t(en),enabledRoutes:t(ei),enabledKeywords:t(er),uploadedImages:t(eu),colorPalettes:t(em),tags:t(eo)}});let G=O("user",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),name:(0,f.L7)("name",{length:255}),email:(0,f.L7)("email",{length:255}),emailVerified:(0,g.AB)("emailVerified",{mode:"date",fsp:3}).default((0,s.i6)(x())),image:(0,f.L7)("image",{length:255}),maxPinsADay:(0,b.e$)("max_pins_a_day").default(35),openAiApiKey:(0,f.L7)("open_ai_api_key",{length:700}),claudeApiKey:(0,f.L7)("claude_api_key",{length:700}),licenseKey:(0,f.L7)("license_key",{length:700}),pricingVersion:(0,f.L7)("pricing_version",{length:128}),cameFrom:(0,I.MI)("came_from",["google","youtube","tiktok","reddit","twitter","facebook","instagram","other"]),cameFromDetails:(0,_.fL)("came_from_details"),subscriptionProvider:(0,I.MI)("subscription_provider",["LEMON_SQUEEZY","STRIPE"]).default("STRIPE"),stripeCustomerId:(0,f.L7)("stripe_customer_id",{length:256}),createdAt:(0,g.AB)("created_at").default((0,s.i6)(A())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({emailIndex:(0,m.Kz)("email_idx").on(e.email)}));(0,u.lE)(G,e=>{let{many:t}=e;return{websites:t(Y),accounts:t(Z),licences:t(ea),subscriptions:t(e_)}});let Z=O("account",{userId:(0,f.L7)("userId",{length:255}).notNull(),type:(0,f.L7)("type",{length:255}).$type().notNull(),provider:(0,f.L7)("provider",{length:255}).notNull(),providerAccountId:(0,f.L7)("providerAccountId",{length:255}).notNull(),refresh_token:(0,_.fL)("refresh_token"),access_token:(0,_.fL)("access_token"),expires_at:(0,b.e$)("expires_at"),token_type:(0,f.L7)("token_type",{length:255}),scope:(0,f.L7)("scope",{length:255}),id_token:(0,_.fL)("id_token"),session_state:(0,f.L7)("session_state",{length:255})},e=>({compoundKey:(0,w.CK)(e.provider,e.providerAccountId),userIdIdx:(0,m.Kz)("userId_idx").on(e.userId)}));(0,u.lE)(Z,e=>{let{one:t,many:d}=e;return{user:t(G,{fields:[Z.userId],references:[G.id]}),websites:d(Y)}});let J=O("session",{sessionToken:(0,f.L7)("sessionToken",{length:255}).notNull().primaryKey(),userId:(0,f.L7)("userId",{length:255}).notNull(),expires:(0,g.AB)("expires",{mode:"date"}).notNull()},e=>({userIdIdx:(0,m.Kz)("userId_idx").on(e.userId)}));(0,u.lE)(J,e=>{let{one:t}=e;return{user:t(G,{fields:[J.userId],references:[G.id]})}}),O("verificationToken",{identifier:(0,f.L7)("identifier",{length:255}).notNull(),token:(0,f.L7)("token",{length:255}).notNull(),expires:(0,g.AB)("expires",{mode:"date"}).notNull()},e=>({compoundKey:(0,w.CK)(e.identifier,e.token)}));let Q=O("pins_to_images",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),pinId:(0,f.L7)("pin_id",{length:128}).notNull(),order:(0,b.e$)("order").default(0),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),imageUrl:(0,_.fL)("imageUrl").notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(L())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({idIndex:(0,m.Kz)("id_idx").on(e.id),pinIdIndex:(0,m.Kz)("pin_id_idx").on(e.pinId),websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(Q,e=>{let{one:t}=e;return{pin:t(V,{fields:[Q.pinId],references:[V.id]}),website:t(Y,{fields:[Q.websiteId],references:[Y.id]})}});let X=O("boards_to_websites",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),boardId:(0,f.L7)("board_id",{length:128}).notNull(),name:(0,f.L7)("name",{length:256}),isActive:(0,b.e$)("is_active").default(1),createdAt:(0,g.AB)("created_at").default((0,s.i6)(E())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({boardIdIndex:(0,m.Kz)("board_id_idx").on(e.boardId),websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(X,e=>{let{one:t}=e;return{website:t(Y,{fields:[X.websiteId],references:[Y.id]})}});let q=O("disabled_images_to_website",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),imageUrl:(0,_.fL)("imageUrl").notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(T())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(q,e=>{let{one:t}=e;return{website:t(Y,{fields:[q.websiteId],references:[Y.id]})}});let W=O("images_to_page",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),pageId:(0,f.L7)("page_id",{length:128}).notNull(),websiteId:(0,f.L7)("website_id",{length:128}),imageUrl:(0,_.fL)("image_url").notNull(),width:(0,b.e$)("width"),height:(0,b.e$)("height"),alt:(0,_.fL)("alt"),createdAt:(0,g.AB)("created_at").default((0,s.i6)(v())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({pageIdIndex:(0,m.Kz)("page_id_idx").on(e.pageId),websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(W,e=>{let{one:t}=e;return{page:t(el,{fields:[W.pageId],references:[el.id]})}});let ee=O("duplicated_ui_blocks",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),selector:(0,_.fL)("selector").notNull(),screenshotUrl:(0,_.fL)("screenshot_url").notNull(),type:(0,I.MI)("type",["AFTER_IMAGE","DISABLED","SUCCESS"]),importance:(0,f.L7)("importance",{length:40}).notNull(),url:(0,f.L7)("url",{length:256}).notNull(),imageUrls:(0,p.AV)("image_urls").notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(M())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(ee,e=>{let{one:t}=e;return{website:t(Y,{fields:[ee.websiteId],references:[Y.id]})}});let et=O("disabled_ui_blocks",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),selector:(0,_.fL)("selector").notNull(),screenshotUrl:(0,_.fL)("screenshot_url").notNull(),importance:(0,f.L7)("importance",{length:40}).notNull(),url:(0,f.L7)("url",{length:256}).notNull(),imageUrls:(0,p.AV)("image_urls").notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(U())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(et,e=>{let{one:t}=e;return{website:t(Y,{fields:[et.websiteId],references:[Y.id]})}});let ed=O("duplicated_images_to_website",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),imageUrl:(0,_.fL)("imageUrl").notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(k())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(ed,e=>{let{one:t}=e;return{website:t(Y,{fields:[ed.websiteId],references:[Y.id]})}});let en=O("disabled_routes_to_website",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),route:(0,f.L7)("route",{length:756}).notNull(),type:(0,I.MI)("type",["GROUP","URL"]).default("URL"),createdAt:(0,g.AB)("created_at").default((0,s.i6)(R())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({routeIndex:(0,m.Kz)("route_idx").on(e.route),websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(en,e=>{let{one:t}=e;return{website:t(Y,{fields:[en.websiteId],references:[Y.id]})}});let ei=O("enabled_routes",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),type:(0,I.MI)("type",["URL_PREFIX","SITEMAP","URL"]).default("URL_PREFIX"),route:(0,f.L7)("route",{length:756}).notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(K())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({routeIndex:(0,m.Kz)("route_idx").on(e.route),websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(ei,e=>{let{one:t}=e;return{website:t(Y,{fields:[ei.websiteId],references:[Y.id]})}});let er=O("enabled_keywords",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),keyword:(0,f.L7)("keyword",{length:256}).notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(S())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(er,e=>{let{one:t}=e;return{website:t(Y,{fields:[er.websiteId],references:[Y.id]})}});let el=O("pages_to_website",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),pageUrl:(0,f.L7)("page_url",{length:756}).notNull(),sitemapUrl:(0,f.L7)("sitemap_url",{length:756}),status:(0,f.L7)("status",{length:40}),createdAt:(0,g.AB)("created_at").default((0,s.i6)(C())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow(),isEmbedded:(0,b.e$)("is_embedded").default(0),visualPrompt:(0,_.fL)("visual_prompt"),lastModified:(0,g.AB)("last_modified"),priority:(0,I.MI)("priority",["LOW","MEDIUM","HIGH"]).default("HIGH"),keywords:(0,p.AV)("keywords")},e=>({pageUrlIndex:(0,m.Kz)("page_url_idx").on(e.pageUrl),websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(el,e=>{let{one:t,many:d}=e;return{website:t(Y,{fields:[el.websiteId],references:[Y.id]}),uploadedImages:d(ef),pins:d(V),images:d(W),tags:d(es)}});let ea=O("licence",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),licenseKey:(0,f.L7)("key",{length:128}).notNull(),email:(0,f.L7)("email",{length:128}).notNull(),userId:(0,f.L7)("user_id",{length:128}),userName:(0,f.L7)("user_name",{length:500}),productId:(0,f.L7)("product_id",{length:128}),subscriptionId:(0,f.L7)("subscription_id",{length:128}),licenceProviderType:(0,I.MI)("licence_provider_type",["STRIPE","LEMON_SQUEEZY"]).default("STRIPE"),stripeCustomerId:(0,f.L7)("stripe_customer_id",{length:128}),createdAt:(0,g.AB)("created_at").default((0,s.i6)(z())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({keyIndex:(0,m.Kz)("key_idx").on(e.licenseKey),userIdIndex:(0,m.Kz)("user_id_idx").on(e.userId),subscriptionIdIndex:(0,m.Kz)("subscription_id_idx").on(e.subscriptionId)}));(0,u.lE)(ea,e=>{let{one:t,many:d}=e;return{user:t(G,{fields:[ea.userId],references:[G.id]}),subscriptions:d(e_)}});let eo=O("tags",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),name:(0,f.L7)("name",{length:128}).notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(F())).notNull(),visualPrompts:(0,p.AV)("visual_prompts"),pexelsPrompt:(0,_.fL)("pexels_prompt"),updatedAt:(0,g.AB)("updatedAt").onUpdateNow(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),bulkCreatedFromStock:(0,b.e$)("bulk_created_from_stock").default(0),bulkCreatedFromAI:(0,b.e$)("bulk_created_from_ai").default(0)},e=>({websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId),nameIndex:(0,m.Kz)("name_idx").on(e.name)}));(0,u.lE)(eo,e=>{let{one:t,many:d}=e;return{website:t(Y,{fields:[eo.websiteId],references:[Y.id]}),pages:d(es),uploadedImages:d(ec)}});let es=O("pages_to_tags",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),tagId:(0,f.L7)("tag_id",{length:128}).notNull(),pageId:(0,f.L7)("page_id",{length:128}).notNull(),websiteId:(0,f.L7)("website_id",{length:128}).notNull()},e=>({tagIdIndex:(0,m.Kz)("tag_id_idx").on(e.tagId),pageIdIndex:(0,m.Kz)("page_id_idx").on(e.pageId),websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(es,e=>{let{one:t}=e;return{tag:t(eo,{fields:[es.tagId],references:[eo.id]}),page:t(el,{fields:[es.pageId],references:[el.id]}),website:t(Y,{fields:[es.websiteId],references:[Y.id]})}});let eu=O("uploaded_images",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(B())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow(),imageUrl:(0,_.fL)("image_url").notNull(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),source:(0,I.MI)("source",["MANUAL","STOCK","AI"]).notNull(),isActive:(0,b.e$)("is_active").default(1),attachToEveryPage:(0,b.e$)("attach_to_every_page").default(0)},e=>({websiteIdIndex:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(eu,e=>{let{one:t,many:d}=e;return{website:t(Y,{fields:[eu.websiteId],references:[Y.id]}),tags:d(ec),pages:d(ef)}});let ec=O("uploaded_images_to_tags",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),uploadedImageId:(0,f.L7)("uploaded_image_id",{length:128}).notNull(),tagId:(0,f.L7)("tag_id",{length:128}).notNull()},e=>({uploadedImageIdIndex:(0,m.Kz)("uploaded_image_id_idx").on(e.uploadedImageId),tagIdIndex:(0,m.Kz)("tag_id_idx").on(e.tagId)}));(0,u.lE)(ec,e=>{let{one:t}=e;return{uploadedImage:t(eu,{fields:[ec.uploadedImageId],references:[eu.id]}),tag:t(eo,{fields:[ec.tagId],references:[eo.id]})}});let ef=O("uploaded_images_to_pages",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),uploadedImageId:(0,f.L7)("uploaded_image_id",{length:128}).notNull(),pageId:(0,f.L7)("page_id",{length:128}).notNull()},e=>({uploadedImageIdIndex:(0,m.Kz)("uploaded_image_id_idx").on(e.uploadedImageId),pageIdIndex:(0,m.Kz)("page_id_idx").on(e.pageId)}));(0,u.lE)(ef,e=>{let{one:t}=e;return{uploadedImage:t(eu,{fields:[ef.uploadedImageId],references:[eu.id]}),page:t(el,{fields:[ef.pageId],references:[el.id]})}});let e_=O("subscription",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),userId:(0,f.L7)("user_id",{length:128}),productName:(0,f.L7)("product_name",{length:128}).notNull(),productId:(0,f.L7)("product_id",{length:128}).notNull(),variantId:(0,f.L7)("variant_id",{length:128}),pinsADay:(0,b.e$)("pins_a_day"),licenseId:(0,f.L7)("license_id",{length:128}),subscriptionId:(0,f.L7)("subscription_id",{length:128}),pricingVersion:(0,f.L7)("pricing_version",{length:128}),expiresAt:(0,g.AB)("expires_at").notNull(),status:(0,f.L7)("status",{length:40}).notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(P())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({userIdIndex:(0,m.Kz)("user_id_idx").on(e.userId),productIdIndex:(0,m.Kz)("product_id_idx").on(e.productId),licenseIdIndex:(0,m.Kz)("license_id_idx").on(e.licenseId),subscriptionIdIndex:(0,m.Kz)("subscription_id_idx").on(e.subscriptionId)}));(0,u.lE)(e_,e=>{let{one:t}=e;return{user:t(G,{fields:[e_.userId],references:[G.id]}),license:t(ea,{fields:[e_.licenseId],references:[ea.licenseKey]})}});let ep=O("templates",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),svg:(0,_.k1)("svg").notNull(),boxes:(0,p.AV)("boxes").notNull(),enabled:(0,b.e$)("enabled").default(1),hasNumber:(0,b.e$)("has_number").default(0),width:(0,b.e$)("width").default(1e3),height:(0,b.e$)("height").default(1500),images:(0,p.AV)("images").notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)($())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()},e=>({websiteId:(0,m.Kz)("website_id_idx").on(e.websiteId)}));(0,u.lE)(ep,e=>{let{one:t,many:d}=e;return{website:t(Y,{fields:[ep.websiteId],references:[Y.id]}),pins:d(V)}});let eg=O("customization",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),fontId:(0,f.L7)("font_id",{length:128}),primaryFont:(0,f.L7)("primary_font",{length:128}),secondaryFont:(0,f.L7)("secondary_font",{length:128}),accentFont:(0,f.L7)("accent_font",{length:128}),paletteId:(0,f.L7)("palette_id",{length:128}),primaryFontColor:(0,f.L7)("primary_font_color",{length:128}),secondaryFontColor:(0,f.L7)("secondary_font_color",{length:128}),backgroundColor:(0,f.L7)("background_color",{length:128}),backgroundSubtleColor:(0,f.L7)("background_subtle_color",{length:128}),accent1Color:(0,f.L7)("accent1_color",{length:128}),accent2Color:(0,f.L7)("accent2_color",{length:128}),createdAt:(0,g.AB)("created_at").default((0,s.i6)(j())).notNull(),updatedAt:(0,g.AB)("updatedAt").onUpdateNow()});(0,u.lE)(eg,e=>{let{one:t}=e;return{website:t(Y,{fields:[eg.websiteId],references:[Y.id]})}});let em=O("colorPalette",{id:(0,f.L7)("id",{length:128}).$defaultFn(()=>(0,o.Mc)()).primaryKey(),websiteId:(0,f.L7)("website_id",{length:128}).notNull(),paletteId:(0,f.L7)("palette_id",{length:128}),primaryFontColor:(0,f.L7)("primary_font_color",{length:128}).notNull(),secondaryFontColor:(0,f.L7)("secondary_font_color",{length:128}).notNull(),backgroundColor:(0,f.L7)("background_color",{length:128}).notNull(),backgroundSubtleColor:(0,f.L7)("background_subtle_color",{length:128}).notNull(),accent1Color:(0,f.L7)("accent1_color",{length:128}).notNull(),accent2Color:(0,f.L7)("accent2_color",{length:128}).notNull(),createdAt:(0,g.AB)("created_at").default((0,s.i6)(D())).notNull(),excludedTemplates:(0,p.AV)("excluded_templates"),updatedAt:(0,g.AB)("updatedAt").onUpdateNow(),isActive:(0,b.e$)("is_active").default(1)});(0,u.lE)(em,e=>{let{one:t,many:d}=e;return{website:t(Y,{fields:[em.websiteId],references:[Y.id]}),pins:d(V)}})}}]);