(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888,3662],{22804:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});let{Decimal:n,objectEnumValues:i,makeStrictEnum:o,Public:a,getRuntime:s}=r(73847),l={};t.Prisma=l,t.$Enums={},l.prismaVersion={client:"5.13.0",engine:"1e7af066ee9cb95cf3a403c78d9aab3e6b04f37a"},l.PrismaClientKnownRequestError=()=>{let e=s().prettyName;throw Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.PrismaClientUnknownRequestError=()=>{let e=s().prettyName;throw Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.PrismaClientRustPanicError=()=>{let e=s().prettyName;throw Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.PrismaClientInitializationError=()=>{let e=s().prettyName;throw Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.PrismaClientValidationError=()=>{let e=s().prettyName;throw Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.NotFoundError=()=>{let e=s().prettyName;throw Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.Decimal=n,l.sql=()=>{let e=s().prettyName;throw Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.empty=()=>{let e=s().prettyName;throw Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.join=()=>{let e=s().prettyName;throw Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.raw=()=>{let e=s().prettyName;throw Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.validator=a.validator,l.getExtensionContext=()=>{let e=s().prettyName;throw Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.defineExtension=()=>{let e=s().prettyName;throw Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)},l.DbNull=i.instances.DbNull,l.JsonNull=i.instances.JsonNull,l.AnyNull=i.instances.AnyNull,l.NullTypes={DbNull:i.classes.DbNull,JsonNull:i.classes.JsonNull,AnyNull:i.classes.AnyNull},t.Prisma.AccountScalarFieldEnum={id:"id",userId:"userId",type:"type",provider:"provider",providerAccountId:"providerAccountId",refresh_token:"refresh_token",access_token:"access_token",expires_at:"expires_at",token_type:"token_type",scope:"scope",id_token:"id_token",session_state:"session_state"},t.Prisma.AnnouncementScalarFieldEnum={id:"id",createdAt:"createdAt",title:"title",active:"active",expiresAt:"expiresAt"},t.Prisma.ApiKeyScalarFieldEnum={id:"id",userId:"userId",createdAt:"createdAt",name:"name",disabled:"disabled",hashedKey:"hashedKey"},t.Prisma.ApiMeterScalarFieldEnum={start:"start",apiKeyId:"apiKeyId",type:"type",count:"count"},t.Prisma.CanvasAccessScalarFieldEnum={canvasId:"canvasId",userId:"userId",createdAt:"createdAt",canvasRolesId:"canvasRolesId"},t.Prisma.CanvasCommentScalarFieldEnum={id:"id",createdAt:"createdAt",text:"text",userId:"userId",canvasId:"canvasId",x:"x",y:"y",replyToId:"replyToId",status:"status",boundedShapeId:"boundedShapeId",boundedX:"boundedX",boundedY:"boundedY"},t.Prisma.CanvasRolesScalarFieldEnum={id:"id",name:"name"},t.Prisma.CanvasScalarFieldEnum={id:"id",name:"name",hide:"hide",workspaceId:"workspaceId",lastEdited:"lastEdited",type:"type"},t.Prisma.CanvasUserMetadataScalarFieldEnum={lastViewedAt:"lastViewedAt",favorited:"favorited",canvasId:"canvasId",userId:"userId"},t.Prisma.CustomColorPaletteScalarFieldEnum={id:"id",slug:"slug",userId:"userId",colors:"colors"},t.Prisma.CustomerScalarFieldEnum={id:"id",userId:"userId",stripeCustomerId:"stripeCustomerId"},t.Prisma.DailyThemeScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",title:"title",body:"body",imageUrl:"imageUrl",date:"date"},t.Prisma.DesignFileScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",templateId:"templateId",userId:"userId",name:"name",activeDesignFileVersionId:"activeDesignFileVersionId",access:"access",createdFromPublicVersionId:"createdFromPublicVersionId",userDeleted:"userDeleted"},t.Prisma.DesignFileVersionScalarFieldEnum={id:"id",createdAt:"createdAt",designFileId:"designFileId",public:"public",name:"name",width:"width",height:"height",seed:"seed",content:"content",secretContent:"secretContent",overwrittenAt:"overwrittenAt",parentVersionId:"parentVersionId"},t.Prisma.DesignInvitesScalarFieldEnum={id:"id",email:"email",userId:"userId",invitedById:"invitedById",createdAt:"createdAt",updatedAt:"updatedAt",status:"status",designFileId:"designFileId"},t.Prisma.DesignPromptsScalarFieldEnum={slug:"slug",prompt:"prompt",updatedAt:"updatedAt"},t.Prisma.DesignSearchLandingPageScalarFieldEnum={query:"query",slug:"slug",description:"description"},t.Prisma.ELOImageScalarFieldEnum={id:"id",url:"url",score:"score",category:"category",num_games:"num_games",createdAt:"createdAt",status:"status"},t.Prisma.ELOImageVoteScalarFieldEnum={id:"id",userId:"userId",winningImageId:"winningImageId",losingImageId:"losingImageId",createdAt:"createdAt"},t.Prisma.EditScalarFieldEnum={id:"id",userId:"userId",url:"url",originalImageUrl:"originalImageUrl",editedImageUrl:"editedImageUrl",meta:"meta",createdAt:"createdAt",type:"type"},t.Prisma.FeatureFlagScalarFieldEnum={id:"id",description:"description",createdAt:"createdAt",updatedAt:"updatedAt",access:"access",disabled:"disabled"},t.Prisma.FeedbackScalarFieldEnum={id:"id",submittedById:"submittedById",createdAt:"createdAt",feedback:"feedback",translated_feedback:"translated_feedback",designFileId:"designFileId"},t.Prisma.FilterScalarFieldEnum={id:"id",name:"name",promptText:"promptText",promptPrefix:"promptPrefix",promptSuffix:"promptSuffix",negativePrompt:"negativePrompt",proTip:"proTip",modelUrls:"modelUrls",thumbnailUrl:"thumbnailUrl",visibility:"visibility",deployStatus:"deployStatus",createdAt:"createdAt",updatedAt:"updatedAt",deleted:"deleted",jobId:"jobId",userId:"userId"},t.Prisma.FriendshipScalarFieldEnum={followerId:"followerId",followingId:"followingId",seenByUser:"seenByUser",createdAt:"createdAt"},t.Prisma.ImageCategoriesScalarFieldEnum={imageId:"imageId",animals:"animals",scifi:"scifi",landscapes:"landscapes",faces:"faces",anime:"anime",fashion:"fashion",food:"food",vehicles:"vehicles",boobs:"boobs",nudity:"nudity",threedrender:"threedrender"},t.Prisma.ImageMetadataScalarFieldEnum={imageId:"imageId",upscaled:"upscaled",upscaler:"upscaler",high_noise_frac:"high_noise_frac",original_prompt:"original_prompt",deletion_date:"deletion_date",daily_theme_id:"daily_theme_id",templateId:"templateId"},t.Prisma.ImageReactionScalarFieldEnum={id:"id",userId:"userId",imageId:"imageId",reaction:"reaction",createdAt:"createdAt",seenByUser:"seenByUser",imageOwnerUserId:"imageOwnerUserId"},t.Prisma.ImageScalarFieldEnum={id:"id",userId:"userId",prompt:"prompt",url:"url",url_jpeg:"url_jpeg",seed:"seed",sampler:"sampler",steps:"steps",width:"width",height:"height",private:"private",createdAt:"createdAt",title:"title",source:"source",cfg_scale:"cfg_scale",numVariations:"numVariations",hide:"hide",sequence:"sequence",batchId:"batchId",remixedFromId:"remixedFromId",uploadedToPinecone:"uploadedToPinecone",embeddingCached:"embeddingCached",filter:"filter",negative_prompt:"negative_prompt",negative_embedding_id:"negative_embedding_id",start_schedule:"start_schedule",parent_image_url:"parent_image_url",mask_image_url:"mask_image_url",parent_image_id:"parent_image_id",postprocessing:"postprocessing",edit_image_status:"edit_image_status",metadata:"metadata",share_status:"share_status",aesthetic_model:"aesthetic_model",aesthetic_score:"aesthetic_score",publishedFromCanvasId:"publishedFromCanvasId",publishedFromCanvasIntent:"publishedFromCanvasIntent",canvasShapeId:"canvasShapeId"},t.Prisma.InvitesScalarFieldEnum={id:"id",email:"email",userId:"userId",invitedBy:"invitedBy",createdAt:"createdAt",updatedAt:"updatedAt",status:"status",canvasId:"canvasId",canvasRolesId:"canvasRolesId"},t.Prisma.JobScalarFieldEnum={id:"id",type:"type",status:"status",createdAt:"createdAt",updatedAt:"updatedAt",startedAt:"startedAt",finishedAt:"finishedAt",args:"args",rayId:"rayId",error:"error",retryCount:"retryCount",userId:"userId"},t.Prisma.JsonNullValueFilter={DbNull:l.DbNull,JsonNull:l.JsonNull,AnyNull:l.AnyNull},t.Prisma.JsonNullValueInput={JsonNull:l.JsonNull},t.Prisma.NotificationScalarFieldEnum={id:"id",title:"title",description:"description",imageUrl:"imageUrl",link:"link",seen:"seen",userId:"userId",type:"type",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.NullableJsonNullValueInput={DbNull:l.DbNull,JsonNull:l.JsonNull},t.Prisma.PresetConfigScalarFieldEnum={slug:"slug",name:"name",prompt:"prompt",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.PresetScalarFieldEnum={id:"id",name:"name",userId:"userId",createdAt:"createdAt",lastUsedAt:"lastUsedAt",seed:"seed",sampler:"sampler",steps:"steps",num_images:"num_images",width:"width",height:"height",source:"source",cfg_scale:"cfg_scale",filter:"filter",high_noise_frac:"high_noise_frac",prompt:"prompt",negative_prompt:"negative_prompt",start_schedule:"start_schedule",expand_prompt:"expand_prompt"},t.Prisma.QueryMode={default:"default",insensitive:"insensitive"},t.Prisma.RankedImagePairVotesScalarFieldEnum={id:"id",rankedImagePairId:"rankedImagePairId",userId:"userId",selectedImageURL:"selectedImageURL",categoryRatedOn:"categoryRatedOn",createdAt:"createdAt",updatedAt:"updatedAt",meta:"meta"},t.Prisma.RankedImagePairsScalarFieldEnum={id:"id",imgURL1:"imgURL1",imgURL2:"imgURL2",imgURL3:"imgURL3",prompt1:"prompt1",prompt2:"prompt2",prompt3:"prompt3",status:"status",jobName:"jobName",createdAt:"createdAt",completedAt:"completedAt",category:"category"},t.Prisma.ReportScalarFieldEnum={id:"id",imageId:"imageId",reporterId:"reporterId",createdAt:"createdAt",reason:"reason",status:"status",handledBy:"handledBy",handledAt:"handledAt"},t.Prisma.SessionScalarFieldEnum={id:"id",sessionToken:"sessionToken",userId:"userId",expires:"expires",api_key:"api_key"},t.Prisma.SortOrder={asc:"asc",desc:"desc"},t.Prisma.SubscriptionScalarFieldEnum={id:"id",userId:"userId",stripeSubscriptionId:"stripeSubscriptionId",revcatSubscriptionId:"revcatSubscriptionId",stripeStatus:"stripeStatus",revcatStatus:"revcatStatus",stripePriceId:"stripePriceId",quantity:"quantity",cancelAtPeriodEnd:"cancelAtPeriodEnd",cancelAt:"cancelAt",currentPeriodStart:"currentPeriodStart",currentPeriodEnd:"currentPeriodEnd",created:"created",endedAt:"endedAt",cancellationReason:"cancellationReason",meta:"meta"},t.Prisma.TagScalarFieldEnum={id:"id",name:"name",image:"image",height:"height",width:"width",type:"type",previewImageUrls:"previewImageUrls",visibility:"visibility",position:"position"},t.Prisma.TagToTagScalarFieldEnum={parentId:"parentId",childId:"childId"},t.Prisma.TemplatePresetScalarFieldEnum={prompt:"prompt",negativePrompt:"negativePrompt",used:"used",createdAt:"createdAt",url:"url",url_jpeg:"url_jpeg",width:"width",height:"height",seed:"seed",templateId:"templateId",presetConfigSlug:"presetConfigSlug",prompt_embedding:"prompt_embedding"},t.Prisma.TemplateScalarFieldEnum={id:"id",title:"title",keywords:"keywords",used:"used",userId:"userId",visibility:"visibility",createdAt:"createdAt",updatedAt:"updatedAt",type:"type"},t.Prisma.TemplateToTagScalarFieldEnum={templateId:"templateId",tagId:"tagId"},t.Prisma.TemplateUseScalarFieldEnum={templateId:"templateId",tagId:"tagId",date:"date",count:"count"},t.Prisma.TransactionIsolationLevel=o({ReadUncommitted:"ReadUncommitted",ReadCommitted:"ReadCommitted",RepeatableRead:"RepeatableRead",Serializable:"Serializable"}),t.Prisma.UserBlockScalarFieldEnum={id:"id",userId:"userId",blockedId:"blockedId",createdAt:"createdAt",updatedAt:"updatedAt"},t.Prisma.UserEditRatingScalarFieldEnum={editId:"editId",rating:"rating",createdAt:"createdAt",userId:"userId"},t.Prisma.UserImageRatingScalarFieldEnum={imageId:"imageId",rating:"rating",createdAt:"createdAt",userId:"userId"},t.Prisma.UserScalarFieldEnum={id:"id",name:"name",email:"email",emailVerified:"emailVerified",image:"image",displayName:"displayName",discordId:"discordId",ipAddress:"ipAddress",disabled:"disabled",role:"role",createdAt:"createdAt",link:"link",email_hash:"email_hash",preferences:"preferences",personalWorkspaceId:"personalWorkspaceId"},t.Prisma.VerificationTokenScalarFieldEnum={identifier:"identifier",token:"token",expires:"expires"},t.Prisma.WorkspaceAccessScalarFieldEnum={workspaceId:"workspaceId",userId:"userId",createdAt:"createdAt",workspaceRolesId:"workspaceRolesId"},t.Prisma.WorkspaceRolesScalarFieldEnum={id:"id",name:"name"},t.Prisma.WorkspaceScalarFieldEnum={id:"id",name:"name",slug:"slug"},t.CanvasCommentStatus=t.$Enums.CanvasCommentStatus={ACTIVE:"ACTIVE",DELETED:"DELETED",RESOLVED:"RESOLVED"},t.CanvasPublishType=t.$Enums.CanvasPublishType={PRIVATE:"PRIVATE",PUBLIC:"PUBLIC"},t.CanvasRolesEnum=t.$Enums.CanvasRolesEnum={OWNER:"OWNER",EDITOR:"EDITOR",VIEWER:"VIEWER"},t.DesignFileAccess=t.$Enums.DesignFileAccess={PRIVATE:"PRIVATE",PUBLIC:"PUBLIC"},t.EditImageStatus=t.$Enums.EditImageStatus={DISCARDED:"DISCARDED",SAVED:"SAVED"},t.EditRating=t.$Enums.EditRating={LOVE:"LOVE",LIKE:"LIKE",DISLIKE:"DISLIKE",HATE:"HATE",RATING_REMOVED:"RATING_REMOVED"},t.EditType=t.$Enums.EditType={CLEAN:"CLEAN",REMOVE_BACKGROUND:"REMOVE_BACKGROUND",INSTRUCT:"INSTRUCT",IMAGE_TO_IMAGE:"IMAGE_TO_IMAGE",OUTPAINT:"OUTPAINT"},t.FilterDeployStatus=t.$Enums.FilterDeployStatus={UNDEPLOYED:"UNDEPLOYED",DEPLOY_NEEDED:"DEPLOY_NEEDED",DEPLOYED:"DEPLOYED"},t.FilterVisibility=t.$Enums.FilterVisibility={HIDDEN:"HIDDEN",USER_ONLY:"USER_ONLY",INTERNAL_ONLY:"INTERNAL_ONLY",PUBLIC:"PUBLIC"},t.ImageRating=t.$Enums.ImageRating={LOVE:"LOVE",OKAY:"OKAY",HATE:"HATE",RATING_REMOVED:"RATING_REMOVED"},t.ImageShareStatus=t.$Enums.ImageShareStatus={HIDE_FROM_FEEDS:"HIDE_FROM_FEEDS"},t.InviteStatus=t.$Enums.InviteStatus={USER_PENDING:"USER_PENDING",ACCEPTED:"ACCEPTED",REVOKED:"REVOKED"},t.JobStatus=t.$Enums.JobStatus={QUEUED:"QUEUED",RUNNING:"RUNNING",COMPLETED:"COMPLETED",FAILED:"FAILED",CANCELLED:"CANCELLED"},t.NotificationType=t.$Enums.NotificationType={TEMPLATE_STATUS_UPDATE:"TEMPLATE_STATUS_UPDATE"},t.PublishFromCanvasIntent=t.$Enums.PublishFromCanvasIntent={PUBLIC:"PUBLIC",NOT_PUBLIC:"NOT_PUBLIC"},t.RankedImagePairStatus=t.$Enums.RankedImagePairStatus={ACTIVE:"ACTIVE",DISABLED:"DISABLED",COMPLETED:"COMPLETED"},t.ReportStatus=t.$Enums.ReportStatus={PENDING:"PENDING",DISMISSED:"DISMISSED",PHOTO_HIDDEN:"PHOTO_HIDDEN",PHOTO_PRIVATIZED:"PHOTO_PRIVATIZED",USER_DISABLED:"USER_DISABLED",HIDDEN_FROM_FEEDS:"HIDDEN_FROM_FEEDS"},t.Role=t.$Enums.Role={USER:"USER",ADMIN:"ADMIN",RESEARCHER:"RESEARCHER",RESEARCHBASE_UPLOADER:"RESEARCHBASE_UPLOADER",TEMPLATE_CREATOR:"TEMPLATE_CREATOR"},t.TagType=t.$Enums.TagType={MAJOR:"MAJOR",MINOR:"MINOR"},t.TemplateType=t.$Enums.TemplateType={BASIC:"BASIC",PREMIUM:"PREMIUM",PREMIUM_CANDIDATE:"PREMIUM_CANDIDATE"},t.WorkspaceRolesEnum=t.$Enums.WorkspaceRolesEnum={OWNER:"OWNER"},t.Prisma.ModelName={Account:"Account",Session:"Session",User:"User",VerificationToken:"VerificationToken",Edit:"Edit",Image:"Image",ImageReaction:"ImageReaction",ImageMetadata:"ImageMetadata",ImageCategories:"ImageCategories",Friendship:"Friendship",Customer:"Customer",Subscription:"Subscription",Report:"Report",UserImageRating:"UserImageRating",UserEditRating:"UserEditRating",Job:"Job",Filter:"Filter",Feedback:"Feedback",Workspace:"Workspace",WorkspaceRoles:"WorkspaceRoles",WorkspaceAccess:"WorkspaceAccess",Canvas:"Canvas",CanvasComment:"CanvasComment",CanvasRoles:"CanvasRoles",CanvasAccess:"CanvasAccess",CanvasUserMetadata:"CanvasUserMetadata",Preset:"Preset",RankedImagePairs:"RankedImagePairs",ELOImage:"ELOImage",ELOImageVote:"ELOImageVote",RankedImagePairVotes:"RankedImagePairVotes",CustomColorPalette:"CustomColorPalette",DesignInvites:"DesignInvites",Invites:"Invites",Announcement:"Announcement",ApiKey:"ApiKey",DailyTheme:"DailyTheme",UserBlock:"UserBlock",ApiMeter:"ApiMeter",FeatureFlag:"FeatureFlag",TemplatePreset:"TemplatePreset",Template:"Template",TemplateUse:"TemplateUse",PresetConfig:"PresetConfig",TemplateToTag:"TemplateToTag",Tag:"Tag",TagToTag:"TagToTag",Notification:"Notification",DesignFile:"DesignFile",DesignFileVersion:"DesignFileVersion",DesignPrompts:"DesignPrompts",DesignSearchLandingPage:"DesignSearchLandingPage"};class u{constructor(){return new Proxy(this,{get(e,t){let r=s();throw Error((r.isEdge?`PrismaClient is not configured to run in ${r.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`:"PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `"+r.prettyName+"`).")+`
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`)}})}}t.PrismaClient=u,Object.assign(t,l)},8417:function(e,t,r){"use strict";r.d(t,{Z:function(){return H}});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,a=Object.assign;function s(e,t,r){return e.replace(t,r)}function l(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function c(e,t,r){return e.slice(t,r)}function d(e){return e.length}function f(e,t){return t.push(e),e}var p=1,h=1,m=0,g=0,v=0,y="";function x(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:p,column:h,length:a,return:""}}function b(e,t){return a(x("",null,null,"",null,null,0),e,{length:-e.length},t)}function w(){return v=g<m?u(y,g++):0,h++,10===v&&(h=1,p++),v}function _(){return u(y,g)}function j(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function C(e){return p=h=1,m=d(y=e),g=0,[]}function k(e){var t,r;return(t=g-1,r=function e(t){for(;w();)switch(v){case t:return g;case 34:case 39:34!==t&&39!==t&&e(v);break;case 40:41===t&&e(t);break;case 92:w()}return g}(91===e?e+2:40===e?e+1:e),c(y,t,r)).trim()}var E="-ms-",S="-moz-",N="-webkit-",P="comm",L="rule",T="decl",O="@keyframes";function R(e,t){for(var r="",n=e.length,i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function A(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case T:return e.return=e.return||e.value;case P:return"";case O:return e.return=e.value+"{"+R(e.children,n)+"}";case L:e.value=e.props.join(",")}return d(r=R(e.children,n))?e.return=e.value+"{"+r+"}":""}function I(e,t,r,n,o,a,l,u,d,f,p){for(var h=o-1,m=0===o?a:[""],g=m.length,v=0,y=0,b=0;v<n;++v)for(var w=0,_=c(e,h+1,h=i(y=l[v])),j=e;w<g;++w)(j=(y>0?m[w]+" "+_:s(_,/&\f/g,m[w])).trim())&&(d[b++]=j);return x(e,t,r,0===o?L:u,d,f,p)}function M(e,t,r,n){return x(e,t,r,T,c(e,0,n),c(e,n+1,-1),n)}var D=function(e,t,r){for(var n=0,i=0;n=i,i=_(),38===n&&12===i&&(t[r]=1),!j(i);)w();return c(y,e,g)},F=function(e,t){var r=-1,n=44;do switch(j(n)){case 0:38===n&&12===_()&&(t[r]=1),e[r]+=D(g-1,t,r);break;case 2:e[r]+=k(n);break;case 4:if(44===n){e[++r]=58===_()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=o(n)}while(n=w());return e},z=function(e,t){var r;return r=F(C(e),t),y="",r},B=new WeakMap,U=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||B.get(r))&&!n){B.set(e,!0);for(var i=[],o=z(t,i),a=r.props,s=0,l=0;s<o.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[u]):a[u]+" "+o[s]}}},V=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},$=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case T:e.return=function e(t,r){switch(45^u(t,0)?(((r<<2^u(t,0))<<2^u(t,1))<<2^u(t,2))<<2^u(t,3):0){case 5103:return N+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return N+t+S+t+E+t+t;case 6828:case 4268:return N+t+E+t+t;case 6165:return N+t+E+"flex-"+t+t;case 5187:return N+t+s(t,/(\w+).+(:[^]+)/,N+"box-$1$2"+E+"flex-$1$2")+t;case 5443:return N+t+E+"flex-item-"+s(t,/flex-|-self/,"")+t;case 4675:return N+t+E+"flex-line-pack"+s(t,/align-content|flex-|-self/,"")+t;case 5548:return N+t+E+s(t,"shrink","negative")+t;case 5292:return N+t+E+s(t,"basis","preferred-size")+t;case 6060:return N+"box-"+s(t,"-grow","")+N+t+E+s(t,"grow","positive")+t;case 4554:return N+s(t,/([^-])(transform)/g,"$1"+N+"$2")+t;case 6187:return s(s(s(t,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),t,"")+t;case 5495:case 3959:return s(t,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return s(s(t,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+E+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+t+t;case 4095:case 3583:case 4068:case 2532:return s(t,/(.+)-inline(.+)/,N+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(d(t)-1-r>6)switch(u(t,r+1)){case 109:if(45!==u(t,r+4))break;case 102:return s(t,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+S+(108==u(t,r+3)?"$3":"$2-$3"))+t;case 115:return~l(t,"stretch")?e(s(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(115!==u(t,r+1))break;case 6444:switch(u(t,d(t)-3-(~l(t,"!important")&&10))){case 107:return s(t,":",":"+N)+t;case 101:return s(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+N+(45===u(t,14)?"inline-":"")+"box$3$1"+N+"$2$3$1"+E+"$2box$3")+t}break;case 5936:switch(u(t,r+11)){case 114:return N+t+E+s(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return N+t+E+s(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return N+t+E+s(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return N+t+E+t+t}return t}(e.value,e.length);break;case O:return R([b(e,{value:s(e.value,"@","@"+N)})],n);case L:if(e.length){var i,o;return i=e.props,o=function(t){var r;switch(r=t,(r=/(::plac\w+|:read-\w+)/.exec(r))?r[0]:r){case":read-only":case":read-write":return R([b(e,{props:[s(t,/:(read-\w+)/,":"+S+"$1")]})],n);case"::placeholder":return R([b(e,{props:[s(t,/:(plac\w+)/,":"+N+"input-$1")]}),b(e,{props:[s(t,/:(plac\w+)/,":"+S+"$1")]}),b(e,{props:[s(t,/:(plac\w+)/,E+"input-$1")]})],n)}return""},i.map(o).join("")}}}],H=function(e){var t,r,i,a,m,b,E=e.key;if("css"===E){var S=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(S,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var N=e.stylisPlugins||$,L={},T=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+E+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)L[t[r]]=!0;T.push(e)});var O=(r=(t=[U,V].concat(N,[A,(i=function(e){b.insert(e)},function(e){!e.root&&(e=e.return)&&i(e)})])).length,function(e,n,i,o){for(var a="",s=0;s<r;s++)a+=t[s](e,n,i,o)||"";return a}),D=function(e){var t,r;return R((r=function e(t,r,n,i,a,m,b,C,E){for(var S,N=0,L=0,T=b,O=0,R=0,A=0,D=1,F=1,z=1,B=0,U="",V=a,$=m,H=i,Z=U;F;)switch(A=B,B=w()){case 40:if(108!=A&&58==u(Z,T-1)){-1!=l(Z+=s(k(B),"&","&\f"),"&\f")&&(z=-1);break}case 34:case 39:case 91:Z+=k(B);break;case 9:case 10:case 13:case 32:Z+=function(e){for(;v=_();)if(v<33)w();else break;return j(e)>2||j(v)>3?"":" "}(A);break;case 92:Z+=function(e,t){for(var r;--t&&w()&&!(v<48)&&!(v>102)&&(!(v>57)||!(v<65))&&(!(v>70)||!(v<97)););return r=g+(t<6&&32==_()&&32==w()),c(y,e,r)}(g-1,7);continue;case 47:switch(_()){case 42:case 47:f(x(S=function(e,t){for(;w();)if(e+v===57)break;else if(e+v===84&&47===_())break;return"/*"+c(y,t,g-1)+"*"+o(47===e?e:w())}(w(),g),r,n,P,o(v),c(S,2,-2),0),E);break;default:Z+="/"}break;case 123*D:C[N++]=d(Z)*z;case 125*D:case 59:case 0:switch(B){case 0:case 125:F=0;case 59+L:-1==z&&(Z=s(Z,/\f/g,"")),R>0&&d(Z)-T&&f(R>32?M(Z+";",i,n,T-1):M(s(Z," ","")+";",i,n,T-2),E);break;case 59:Z+=";";default:if(f(H=I(Z,r,n,N,L,a,C,U,V=[],$=[],T),m),123===B){if(0===L)e(Z,r,H,H,V,m,T,C,$);else switch(99===O&&110===u(Z,3)?100:O){case 100:case 108:case 109:case 115:e(t,H,H,i&&f(I(t,H,H,0,0,a,C,U,a,V=[],T),$),a,$,T,C,i?V:$);break;default:e(Z,H,H,H,[""],$,0,C,$)}}}N=L=R=0,D=z=1,U=Z="",T=b;break;case 58:T=1+d(Z),R=A;default:if(D<1){if(123==B)--D;else if(125==B&&0==D++&&125==(v=g>0?u(y,--g):0,h--,10===v&&(h=1,p--),v))continue}switch(Z+=o(B),B*D){case 38:z=L>0?1:(Z+="\f",-1);break;case 44:C[N++]=(d(Z)-1)*z,z=1;break;case 64:45===_()&&(Z+=k(w())),O=_(),L=T=d(U=Z+=function(e){for(;!j(_());)w();return c(y,e,g)}(g)),B++;break;case 45:45===A&&2==d(Z)&&(D=0)}}return m}("",null,null,null,[""],t=C(t=e),0,[0],t),y="",r),O)};m=function(e,t,r,n){b=r,D(e?e+"{"+t.styles+"}":t.styles),n&&(F.inserted[t.name]=!0)};var F={key:E,sheet:new n({key:E,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:L,registered:{},insert:m};return F.sheet.hydrate(T),F}},45042:function(e,t,r){"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{Z:function(){return n}})},76330:function(e,t,r){"use strict";r.d(t,{T:function(){return c},a:function(){return f},i:function(){return s},w:function(){return u}});var n=r(67294),i=r(8417),o=r(87462),a=function(e){var t=new WeakMap;return function(r){if(t.has(r))return t.get(r);var n=e(r);return t.set(r,n),n}};r(48137),r(27278);var s=!0,l=n.createContext("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null);l.Provider;var u=function(e){return(0,n.forwardRef)(function(t,r){return e(t,(0,n.useContext)(l),r)})};s||(u=function(e){return function(t){var r=(0,n.useContext)(l);return null===r?(r=(0,i.Z)({key:"css"}),n.createElement(l.Provider,{value:r},e(t,r))):e(t,r)}});var c=n.createContext({}),d=a(function(e){return a(function(t){return"function"==typeof t?t(e):(0,o.Z)({},e,t)})}),f=function(e){var t=n.useContext(c);return e.theme!==t&&(t=d(t)(e.theme)),n.createElement(c.Provider,{value:t},e.children)}},70917:function(e,t,r){"use strict";r.d(t,{F4:function(){return c},xB:function(){return l}});var n=r(76330),i=r(67294),o=r(70444),a=r(27278),s=r(48137);r(8417),r(8679);var l=(0,n.w)(function(e,t){var r=e.styles,l=(0,s.O)([r],void 0,i.useContext(n.T));if(!n.i){for(var u,c=l.name,d=l.styles,f=l.next;void 0!==f;)c+=" "+f.name,d+=f.styles,f=f.next;var p=!0===t.compat,h=t.insert("",{name:c,styles:d},t.sheet,p);return p?null:i.createElement("style",((u={})["data-emotion"]=t.key+"-global "+c,u.dangerouslySetInnerHTML={__html:h},u.nonce=t.sheet.nonce,u))}var m=i.useRef();return(0,a.j)(function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==i&&(n=!0,i.setAttribute("data-emotion",e),r.hydrate([i])),m.current=[r,n],function(){r.flush()}},[t]),(0,a.j)(function(){var e=m.current,r=e[0];if(e[1]){e[1]=!1;return}if(void 0!==l.next&&(0,o.My)(t,l.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",l,r,!1)},[t,l.name]),null});function u(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.O)(t)}var c=function(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},48137:function(e,t,r){"use strict";r.d(t,{O:function(){return h}});var n,i={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=r(45042),a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},c=(0,o.Z)(function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()}),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,function(e,t,r){return n={name:t,styles:r,next:n},t})}return 1===i[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"};function f(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return n={name:r.name,styles:r.styles,next:n},r.name;if(void 0!==r.styles){var i=r.next;if(void 0!==i)for(;void 0!==i;)n={name:i.name,styles:i.styles,next:n},i=i.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=f(e,t,r[i])+";";else for(var o in r){var a=r[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?n+=o+"{"+t[a]+"}":u(a)&&(n+=c(o)+":"+d(o,a)+";");else if(Array.isArray(a)&&"string"==typeof a[0]&&(null==t||void 0===t[a[0]]))for(var s=0;s<a.length;s++)u(a[s])&&(n+=c(o)+":"+d(o,a[s])+";");else{var l=f(e,t,a);switch(o){case"animation":case"animationName":n+=c(o)+":"+l+";";break;default:n+=o+"{"+l+"}"}}}return n}(e,t,r);case"function":if(void 0!==e){var o=n,a=r(e);return n=o,f(e,t,a)}}if(null==t)return r;var s=t[r];return void 0!==s?s:r}var p=/label:\s*([^\s;\n{]+)\s*(;|$)/g,h=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i,o=!0,a="";n=void 0;var s=e[0];null==s||void 0===s.raw?(o=!1,a+=f(r,t,s)):a+=s[0];for(var l=1;l<e.length;l++)a+=f(r,t,e[l]),o&&(a+=s[l]);p.lastIndex=0;for(var u="";null!==(i=p.exec(a));)u+="-"+i[1];return{name:function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&r)*1540483477+((r>>>16)*59797<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r^=255&e.charCodeAt(n),r=(65535&r)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,(((r=(65535&r)*1540483477+((r>>>16)*59797<<16))^r>>>15)>>>0).toString(36)}(a)+u,styles:a,next:n}}},27278:function(e,t,r){"use strict";r.d(t,{L:function(){return a},j:function(){return s}});var n,i=r(67294),o=!!(n||(n=r.t(i,2))).useInsertionEffect&&(n||(n=r.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},70444:function(e,t,r){"use strict";function n(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "}),n}r.d(t,{My:function(){return o},fp:function(){return n},hC:function(){return i}});var i=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},o=function(e,t,r){i(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next;while(void 0!==o)}}},70385:function(e,t,r){let n=r(22804);e.exports=n},73847:function(e){"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})},a={};o(a,{Decimal:()=>e0,Public:()=>s,getRuntime:()=>w,makeStrictEnum:()=>x,objectEnumValues:()=>g}),e.exports=((e,o,a,s)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let l of n(o))i.call(e,l)||l===a||t(e,l,{get:()=>o[l],enumerable:!(s=r(o,l))||s.enumerable});return e})(t({},"__esModule",{value:!0}),a);var s={};function l(...e){return e=>e}o(s,{validator:()=>l});var u=Symbol(),c=new WeakMap,d=class{constructor(e){e===u?c.set(this,"Prisma.".concat(this._getName())):c.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return c.get(this)}},f=class extends d{_getNamespace(){return"NullTypes"}},p=class extends f{};v(p,"DbNull");var h=class extends f{};v(h,"JsonNull");var m=class extends f{};v(m,"AnyNull");var g={classes:{DbNull:p,JsonNull:h,AnyNull:m},instances:{DbNull:new p(u),JsonNull:new h(u),AnyNull:new m(u)}};function v(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var y=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function x(e){return new Proxy(e,{get(e,t){if(t in e)return e[t];if(!y.has(t))throw TypeError("Invalid enum value: ".concat(String(t)))}})}var b={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function w(){var e,t,r;let n="object"==typeof Netlify?"netlify":"string"==typeof EdgeRuntime?"edge-light":(null==(e=globalThis.navigator)?void 0:e.userAgent)==="Cloudflare-Workers"?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":(null==(r=null==(t=globalThis.process)?void 0:t.release)?void 0:r.name)==="node"?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown";return{id:n,prettyName:b[n]||n,isEdge:["workerd","deno","netlify","edge-light"].includes(n)}}var _,j,C="0123456789abcdef",k="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",E="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",S={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},N=!0,P="[DecimalError] ",L=P+"Invalid argument: ",T=P+"Precision limit exceeded",O=P+"crypto unavailable",R="[object Decimal]",A=Math.floor,I=Math.pow,M=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,D=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,F=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,z=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,B=k.length-1,U=E.length-1,V={toStringTag:R};function $(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(o+=ee(r)),o+=n;(r=7-(n=(a=e[t])+"").length)&&(o+=ee(r))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function H(e,t,r){if(e!==~~e||e<t||e>r)throw Error(L+e)}function Z(e,t,r,n){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=I(10,7-t),s=e[i]%o|0,null==n?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=r<4&&99999==s||r>3&&49999==s||5e4==s||0==s):a=(r<4&&s+1==o||r>3&&s+1==o/2)&&(e[i+1]/o/100|0)==I(10,t-2)-1||(s==o/2||0==s)&&(e[i+1]/o/100|0)==0:t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(n||r<4)&&9999==s||!n&&r>3&&4999==s):a=((n||r<4)&&s+1==o||!n&&r>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==I(10,t-3)-1,a}function W(e,t,r){for(var n,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=C.indexOf(e.charAt(a++)),n=0;n<o.length;n++)o[n]>r-1&&(void 0===o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}V.absoluteValue=V.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),G(e)},V.ceil=function(){return G(new this.constructor(this),this.e+1,2)},V.clampedTo=V.clamp=function(e,t){var r=this.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(L+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new r(this)},V.comparedTo=V.cmp=function(e){var t,r,n,i,o=this.d,a=(e=new this.constructor(e)).d,s=this.s,l=e.s;if(!o||!a)return s&&l?s!==l?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-l:0;if(s!==l)return s;if(this.e!==e.e)return this.e>e.e^s<0?1:-1;for(n=o.length,i=a.length,t=0,r=n<i?n:i;t<r;++t)if(o[t]!==a[t])return o[t]>a[t]^s<0?1:-1;return n===i?0:n>i^s<0?1:-1},V.cosine=V.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n,i;if(t.isZero())return t;(n=t.d.length)<32?i=(1/eu(4,r=Math.ceil(n/3))).toString():(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=el(e,1,t.times(i),new e(1));for(var o=r;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}(n,ec(n,r)),n.precision=e,n.rounding=t,G(2==j||3==j?r.neg():r,e,t,!0)):new n(1):new n(NaN)},V.cubeRoot=V.cbrt=function(){var e,t,r,n,i,o,a,s,l,u,c=this.constructor;if(!this.isFinite()||this.isZero())return new c(this);for(N=!1,(o=this.s*I(this.s*this,1/3))&&Math.abs(o)!=1/0?n=new c(o.toString()):(r=$(this.d),(o=((e=this.e)-r.length+1)%3)&&(r+=1==o||-2==o?"0":"00"),o=I(r,1/3),e=A((e+1)/3)-(e%3==(e<0?-1:2)),(n=new c(r=o==1/0?"5e"+e:(r=o.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=this.s),a=(e=c.precision)+3;;)if(n=q((u=(l=(s=n).times(s).times(s)).plus(this)).plus(this).times(s),u.plus(l),a+2,1),$(s.d).slice(0,a)===(r=$(n.d)).slice(0,a)){if("9999"!=(r=r.slice(a-3,a+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(G(n,e+1,1),t=!n.times(n).times(n).eq(this));break}if(!i&&(G(s,e+1,0),s.times(s).times(s).eq(this))){n=s;break}a+=4,i=1}return N=!0,G(n,e,c.rounding,t)},V.decimalPlaces=V.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=((e=t.length-1)-A(this.e/7))*7,e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},V.dividedBy=V.div=function(e){return q(this,new this.constructor(e))},V.dividedToIntegerBy=V.divToInt=function(e){var t=this.constructor;return G(q(this,new t(e),0,1,1),t.precision,t.rounding)},V.equals=V.eq=function(e){return 0===this.cmp(e)},V.floor=function(){return G(new this.constructor(this),this.e+1,3)},V.greaterThan=V.gt=function(e){return this.cmp(e)>0},V.greaterThanOrEqualTo=V.gte=function(e){var t=this.cmp(e);return 1==t||0===t},V.hyperbolicCosine=V.cosh=function(){var e,t,r,n,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;r=a.precision,n=a.rounding,a.precision=r+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/eu(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=el(a,1,o.times(t),new a(1),!0);for(var l,u=e,c=new a(8);u--;)l=o.times(o),o=s.minus(l.times(c.minus(l.times(c))));return G(o,a.precision=r,a.rounding=n,!0)},V.hyperbolicSine=V.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(n=i.d.length)<3)i=el(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=el(o,2,i=i.times(1/eu(5,e)),i,!0);for(var a,s=new o(5),l=new o(16),u=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(u))))}return o.precision=t,o.rounding=r,G(i,t,r,!0)},V.hyperbolicTangent=V.tanh=function(){var e,t,r=this.constructor;return this.isFinite()?this.isZero()?new r(this):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,q(this.sinh(),this.cosh(),r.precision=e,r.rounding=t)):new r(this.s)},V.inverseCosine=V.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return -1!==n?0===n?t.isNeg()?J(r,i,o):new r(0):new r(NaN):t.isZero()?J(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=J(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))},V.inverseHyperbolicCosine=V.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},V.inverseHyperbolicSine=V.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())},V.inverseHyperbolicTangent=V.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(n=i.sd(),e)<-(2*i.e)-1?G(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},V.inverseSine=V.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,-1!==t?0===t?((e=J(o,r+4,n).times(.5)).s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))},V.inverseTangent=V.atan=function(){var e,t,r,n,i,o,a,s,l,u=this,c=u.constructor,d=c.precision,f=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&d+4<=U)return(a=J(c,d+4,f).times(.25)).s=u.s,a}else{if(!u.s)return new c(NaN);if(d+4<=U)return(a=J(c,d+4,f).times(.5)).s=u.s,a}for(c.precision=s=d+10,c.rounding=1,e=r=Math.min(28,s/7+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(s/7),n=1,l=u.times(u),a=new c(u),i=u;-1!==e;)if(i=i.times(l),o=a.minus(i.div(n+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(n+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),N=!0,G(a,c.precision=d,c.rounding=f,!0)},V.isFinite=function(){return!!this.d},V.isInteger=V.isInt=function(){return!!this.d&&A(this.e/7)>this.d.length-2},V.isNaN=function(){return!this.s},V.isNegative=V.isNeg=function(){return this.s<0},V.isPositive=V.isPos=function(){return this.s>0},V.isZero=function(){return!!this.d&&0===this.d[0]},V.lessThan=V.lt=function(e){return 0>this.cmp(e)},V.lessThanOrEqualTo=V.lte=function(e){return 1>this.cmp(e)},V.logarithm=V.log=function(e){var t,r,n,i,o,a,s,l=this.constructor,u=l.precision,c=l.rounding;if(null==e)e=new l(10),t=!0;else{if(r=(e=new l(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(r=this.d,this.s<0||!r||!r[0]||this.eq(1))return new l(r&&!r[0]?-1/0:1!=this.s?NaN:r?0:1/0);if(t){if(r.length>1)i=!0;else{for(n=r[0];n%10==0;)n/=10;i=1!==n}}if(N=!1,Z((s=q(eo(this,a=u+5),t?X(l,a+10):eo(e,a),a,1)).d,n=u,c))do if(a+=10,s=q(eo(this,a),t?X(l,a+10):eo(e,a),a,1),!i){+$(s.d).slice(n+1,n+15)+1==1e14&&(s=G(s,u+1,0));break}while(Z(s.d,n+=10,c));return N=!0,G(s,u,c)},V.minus=V.sub=function(e){var t,r,n,i,o,a,s,l,u,c,d,f,p=this.constructor;if(e=new p(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new p(e.d||this.s!==e.s?this:NaN):e=new p(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(u=this.d,f=e.d,s=p.precision,l=p.rounding,!u[0]||!f[0]){if(f[0])e.s=-e.s;else{if(!u[0])return new p(3===l?-0:0);e=new p(this)}return N?G(e,s,l):e}if(r=A(e.e/7),c=A(this.e/7),u=u.slice(),o=c-r){for((d=o<0)?(t=u,o=-o,a=f.length):(t=f,r=c,a=u.length),o>(n=Math.max(Math.ceil(s/7),a)+2)&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for((d=(n=u.length)<(a=f.length))&&(a=n),n=0;n<a;n++)if(u[n]!=f[n]){d=u[n]<f[n];break}o=0}for(d&&(t=u,u=f,f=t,e.s=-e.s),a=u.length,n=f.length-a;n>0;--n)u[a++]=0;for(n=f.length;n>o;){if(u[--n]<f[n]){for(i=n;i&&0===u[--i];)u[i]=1e7-1;--u[i],u[n]+=1e7}u[n]-=f[n]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--r;return u[0]?(e.d=u,e.e=K(u,r),N?G(e,s,l):e):new p(3===l?-0:0)},V.modulo=V.mod=function(e){var t,r=this.constructor;return e=new r(e),this.d&&e.s&&(!e.d||e.d[0])?e.d&&(!this.d||this.d[0])?(N=!1,9==r.modulo?(t=q(this,e.abs(),0,3,1),t.s*=e.s):t=q(this,e,0,r.modulo,1),t=t.times(e),N=!0,this.minus(t)):G(new r(this),r.precision,r.rounding):new r(NaN)},V.naturalExponential=V.exp=function(){return ei(this)},V.naturalLogarithm=V.ln=function(){return eo(this)},V.negated=V.neg=function(){var e=new this.constructor(this);return e.s=-e.s,G(e)},V.plus=V.add=function(e){var t,r,n,i,o,a,s,l,u,c,d=this.constructor;if(e=new d(e),!this.d||!e.d)return this.s&&e.s?this.d||(e=new d(e.d||this.s===e.s?this:NaN)):e=new d(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.minus(e);if(u=this.d,c=e.d,s=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(e=new d(this)),N?G(e,s,l):e;if(o=A(this.e/7),n=A(e.e/7),u=u.slice(),i=o-n){for(i<0?(r=u,i=-i,a=c.length):(r=c,n=o,a=u.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((a=u.length)-(i=c.length)<0&&(i=a,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/1e7|0,u[i]%=1e7;for(t&&(u.unshift(t),++n),a=u.length;0==u[--a];)u.pop();return e.d=u,e.e=K(u,n),N?G(e,s,l):e},V.precision=V.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(L+e);return this.d?(t=Q(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},V.round=function(){var e=this.constructor;return G(new e(this),this.e+1,e.rounding)},V.sine=V.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:el(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=el(e,2,t=t.times(1/eu(5,r)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(n,ec(n,r)),n.precision=e,n.rounding=t,G(j>2?r.neg():r,e,t,!0)):new n(NaN)},V.squareRoot=V.sqrt=function(){var e,t,r,n,i,o,a=this.d,s=this.e,l=this.s,u=this.constructor;if(1!==l||!a||!a[0])return new u(!l||l<0&&(!a||a[0])?NaN:a?this:1/0);for(N=!1,0==(l=Math.sqrt(+this))||l==1/0?(((t=$(a)).length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=A((s+1)/2)-(s<0||s%2),n=new u(t=l==1/0?"5e"+s:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+s)):n=new u(l.toString()),r=(s=u.precision)+3;;)if(n=(o=n).plus(q(this,o,r+2,1)).times(.5),$(o.d).slice(0,r)===(t=$(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(G(n,s+1,1),e=!n.times(n).eq(this));break}if(!i&&(G(o,s+1,0),o.times(o).eq(this))){n=o;break}r+=4,i=1}return N=!0,G(n,s,u.rounding,e)},V.tangent=V.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,G(2==j||4==j?r.neg():r,e,t,!0)):new n(NaN)},V.times=V.mul=function(e){var t,r,n,i,o,a,s,l,u,c=this.constructor,d=this.d,f=(e=new c(e)).d;if(e.s*=this.s,!d||!d[0]||!f||!f[0])return new c(e.s&&(!d||d[0]||f)&&(!f||f[0]||d)?d&&f?0*e.s:e.s/0:NaN);for(r=A(this.e/7)+A(e.e/7),(l=d.length)<(u=f.length)&&(o=d,d=f,f=o,a=l,l=u,u=a),o=[],n=a=l+u;n--;)o.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)s=o[i]+f[n]*d[i-n-1]+t,o[i--]=s%1e7|0,t=s/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=K(o,r),N?G(e,c.precision,c.rounding):e},V.toBinary=function(e,t){return ed(this,2,e,t)},V.toDecimalPlaces=V.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(H(e,0,1e9),void 0===t?t=n.rounding:H(t,0,8),G(r,e+r.e+1,t))},V.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=Y(n,!0):(H(e,0,1e9),void 0===t?t=i.rounding:H(t,0,8),r=Y(n=G(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},V.toFixed=function(e,t){var r,n,i=this.constructor;return void 0===e?r=Y(this):(H(e,0,1e9),void 0===t?t=i.rounding:H(t,0,8),r=Y(n=G(new i(this),e+this.e+1,t),!1,e+n.e+1)),this.isNeg()&&!this.isZero()?"-"+r:r},V.toFraction=function(e){var t,r,n,i,o,a,s,l,u,c,d,f,p=this.d,h=this.constructor;if(!p)return new h(this);if(u=r=new h(1),n=l=new h(0),a=(o=(t=new h(n)).e=Q(p)-this.e-1)%7,t.d[0]=I(10,a<0?7+a:a),null==e)e=o>0?t:u;else{if(!(s=new h(e)).isInt()||s.lt(u))throw Error(L+s);e=s.gt(t)?o>0?t:u:s}for(N=!1,s=new h($(p)),c=h.precision,h.precision=o=14*p.length;d=q(s,t,0,1,1),1!=(i=r.plus(d.times(n))).cmp(e);)r=n,n=i,i=u,u=l.plus(d.times(i)),l=i,i=t,t=s.minus(d.times(i)),s=i;return i=q(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=this.s,f=1>q(u,n,o,1).minus(this).abs().cmp(q(l,r,o,1).minus(this).abs())?[u,n]:[l,r],h.precision=c,N=!0,f},V.toHexadecimal=V.toHex=function(e,t){return ed(this,16,e,t)},V.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:H(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=q(r,e,0,t,1).times(e),N=!0,G(r)):(e.s=r.s,r=e),r},V.toNumber=function(){return+this},V.toOctal=function(e,t){return ed(this,8,e,t)},V.toPower=V.pow=function(e){var t,r,n,i,o,a,s=this,l=s.constructor,u=+(e=new l(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new l(I(+s,u));if((s=new l(s)).eq(1))return s;if(n=l.precision,o=l.rounding,e.eq(1))return G(s,n,o);if((t=A(e.e/7))>=e.d.length-1&&(r=u<0?-u:u)<=9007199254740991)return i=et(l,s,r,n),e.s<0?new l(1).div(i):G(i,n,o);if((a=s.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(r=I(+s,u))&&isFinite(r)?new l(r+"").e:A(u*(Math.log("0."+$(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(N=!1,l.rounding=s.s=1,r=Math.min(12,(t+"").length),(i=ei(e.times(eo(s,n+r)),n)).d&&Z((i=G(i,n+5,1)).d,n,o)&&(t=n+10,+$((i=G(ei(e.times(eo(s,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=G(i,n+1,0))),i.s=a,N=!0,l.rounding=o,G(i,n,o))},V.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=Y(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(H(e,1,1e9),void 0===t?t=i.rounding:H(t,0,8),r=Y(n=G(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},V.toSignificantDigits=V.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(H(e,1,1e9),void 0===t?t=r.rounding:H(t,0,8)),G(new r(this),e,t)},V.toString=function(){var e=this.constructor,t=Y(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},V.truncated=V.trunc=function(){return G(new this.constructor(this),this.e+1,1)},V.valueOf=V.toJSON=function(){var e=this.constructor,t=Y(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var q=function(){function e(e,t,r){var n,i=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+i,e[o]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,o,a,s,l){var u,c,d,f,p,h,m,g,v,y,x,b,w,j,C,k,E,S,N,P,L=n.constructor,T=n.s==i.s?1:-1,O=n.d,R=i.d;if(!O||!O[0]||!R||!R[0])return new L(n.s&&i.s&&(O?!R||O[0]!=R[0]:R)?O&&0==O[0]||!R?0*T:T/0:NaN);for(l?(p=1,c=n.e-i.e):(l=1e7,p=7,c=A(n.e/p)-A(i.e/p)),N=R.length,E=O.length,y=(v=new L(T)).d=[],d=0;R[d]==(O[d]||0);d++);if(R[d]>(O[d]||0)&&c--,null==o?(j=o=L.precision,a=L.rounding):j=s?o+(n.e-i.e)+1:o,j<0)y.push(1),h=!0;else{if(j=j/p+2|0,d=0,1==N){for(f=0,R=R[0],j++;(d<E||f)&&j--;d++)C=f*l+(O[d]||0),y[d]=C/R|0,f=C%R|0;h=f||d<E}else{for((f=l/(R[0]+1)|0)>1&&(R=e(R,f,l),O=e(O,f,l),N=R.length,E=O.length),k=N,b=(x=O.slice(0,N)).length;b<N;)x[b++]=0;(P=R.slice()).unshift(0),S=R[0],R[1]>=l/2&&++S;do f=0,(u=t(R,x,N,b))<0?(w=x[0],N!=b&&(w=w*l+(x[1]||0)),(f=w/S|0)>1?(f>=l&&(f=l-1),g=(m=e(R,f,l)).length,b=x.length,1==(u=t(m,x,g,b))&&(f--,r(m,N<g?P:R,g,l))):(0==f&&(u=f=1),m=R.slice()),(g=m.length)<b&&m.unshift(0),r(x,m,b,l),-1==u&&(b=x.length,(u=t(R,x,N,b))<1&&(f++,r(x,N<b?P:R,b,l))),b=x.length):0===u&&(f++,x=[0]),y[d++]=f,u&&x[0]?x[b++]=O[k]||0:(x=[O[k]],b=1);while((k++<E||void 0!==x[0])&&j--);h=void 0!==x[0]}y[0]||y.shift()}if(1==p)v.e=c,_=h;else{for(d=1,f=y[0];f>=10;f/=10)d++;v.e=d+c*p-1,G(v,s?o+v.e+1:o,a,h)}return v}}();function G(e,t,r,n){var i,o,a,s,l,u,c,d,f,p=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,l=(c=d[f=0])/I(10,i-a-1)%10|0;else if((f=Math.ceil((o+1)/7))>=(s=d.length)){if(n){for(;s++<=f;)d.push(0);c=l=0,i=1,o%=7,a=o-7+1}else break e}else{for(c=s=d[f],i=1;s>=10;s/=10)i++;o%=7,l=(a=o-7+i)<0?0:c/I(10,i-a-1)%10|0}if(n=n||t<0||void 0!==d[f+1]||(a<0?c:c%I(10,i-a-1)),u=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(o>0?a>0?c/I(10,i-a):0:d[f-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,u?(t-=e.e+1,d[0]=I(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=f,s=1,f--):(d.length=f+1,s=I(10,7-o),d[f]=a>0?(c/I(10,i-a)%I(10,a)|0)*s:0),u)for(;;)if(0==f){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,1e7==d[0]&&(d[0]=1));break}else{if(d[f]+=s,1e7!=d[f])break;d[f--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return N&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function Y(e,t,r){if(!e.isFinite())return ea(e);var n,i=e.e,o=$(e.d),a=o.length;return t?(r&&(n=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+ee(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ee(-i-1)+o,r&&(n=r-a)>0&&(o+=ee(n))):i>=a?(o+=ee(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+ee(n))):((n=i+1)<a&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(o+="."),o+=ee(n))),o}function K(e,t){var r=e[0];for(t*=7;r>=10;r/=10)t++;return t}function X(e,t,r){if(t>B)throw N=!0,r&&(e.precision=r),Error(T);return G(new e(k),t,1,!0)}function J(e,t,r){if(t>U)throw Error(T);return G(new e(E),t,r,!0)}function Q(e){var t=e.length-1,r=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ee(e){for(var t="";e--;)t+="0";return t}function et(e,t,r,n){var i,o=new e(1),a=Math.ceil(n/7+4);for(N=!1;;){if(r%2&&ef((o=o.times(t)).d,a)&&(i=!0),0===(r=A(r/2))){r=o.d.length-1,i&&0===o.d[r]&&++o.d[r];break}ef((t=t.times(t)).d,a)}return N=!0,o}function er(e){return 1&e.d[e.d.length-1]}function en(e,t,r){for(var n,i=new e(t[0]),o=0;++o<t.length;)if((n=new e(t[o])).s)i[r](n)&&(i=n);else{i=n;break}return i}function ei(e,t){var r,n,i,o,a,s,l,u=0,c=0,d=0,f=e.constructor,p=f.rounding,h=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(N=!1,l=h):l=t,s=new f(.03125);e.e>-2;)e=e.times(s),d+=5;for(l+=n=Math.log(I(2,d))/Math.LN10*2+5|0,r=o=a=new f(1),f.precision=l;;){if(o=G(o.times(e),l,1),r=r.times(++c),$((s=a.plus(q(o,r,l,1))).d).slice(0,l)===$(a.d).slice(0,l)){for(i=d;i--;)a=G(a.times(a),l,1);if(null!=t)return f.precision=h,a;if(!(u<3&&Z(a.d,l-n,p,u)))return G(a,f.precision=h,p,N=!0);f.precision=l+=10,r=o=s=new f(1),c=0,u++}a=s}}function eo(e,t){var r,n,i,o,a,s,l,u,c,d,f,p=1,h=e,m=h.d,g=h.constructor,v=g.rounding,y=g.precision;if(h.s<0||!m||!m[0]||!h.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=h.s?NaN:m?0:h);if(null==t?(N=!1,c=y):c=t,g.precision=c+=10,n=(r=$(m)).charAt(0),!(15e14>Math.abs(o=h.e)))return u=X(g,c+2,y).times(o+""),h=eo(new g(n+"."+r.slice(1)),c-10).plus(u),g.precision=y,null==t?G(h,y,v,N=!0):h;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=$((h=h.times(e)).d)).charAt(0),p++;for(o=h.e,n>1?(h=new g("0."+r),o++):h=new g(n+"."+r.slice(1)),d=h,l=a=h=q(h.minus(1),h.plus(1),c,1),f=G(h.times(h),c,1),i=3;;){if(a=G(a.times(f),c,1),$((u=l.plus(q(a,new g(i),c,1))).d).slice(0,c)===$(l.d).slice(0,c)){if(l=l.times(2),0!==o&&(l=l.plus(X(g,c+2,y).times(o+""))),l=q(l,new g(p),c,1),null!=t)return g.precision=y,l;if(!Z(l.d,c-10,v,s))return G(l,g.precision=y,v,N=!0);g.precision=c+=10,u=a=h=q(d.minus(1),d.plus(1),c,1),f=G(h.times(h),c,1),i=s=1}l=u,i+=2}}function ea(e){return String(e.s*e.s/0)}function es(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),N&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function el(e,t,r,n,i){var o,a,s,l,u=e.precision,c=Math.ceil(u/7);for(N=!1,l=r.times(r),s=new e(n);;){if(a=q(s.times(l),new e(t++*t++),u,1),s=i?n.plus(a):n.minus(a),n=q(a.times(l),new e(t++*t++),u,1),void 0!==(a=s.plus(n)).d[c]){for(o=c;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=n,n=a,a=o}return N=!0,a.d.length=c+1,a}function eu(e,t){for(var r=e;--t;)r*=e;return r}function ec(e,t){var r,n=t.s<0,i=J(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return j=n?4:1,t;if((r=t.divToInt(i)).isZero())j=n?3:2;else{if((t=t.minus(r.times(i))).lte(o))return j=er(r)?n?2:3:n?4:1,t;j=er(r)?n?1:4:n?3:2}return t.minus(i).abs()}function ed(e,t,r,n){var i,o,a,s,l,u,c,d,f,p=e.constructor,h=void 0!==r;if(h?(H(r,1,1e9),void 0===n?n=p.rounding:H(n,0,8)):(r=p.precision,n=p.rounding),e.isFinite()){for(a=(c=Y(e)).indexOf("."),h?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,a>=0&&(c=c.replace(".",""),(f=new p(1)).e=c.length-a,f.d=W(Y(f),10,i),f.e=f.d.length),o=l=(d=W(c,10,i)).length;0==d[--l];)d.pop();if(d[0]){if(a<0?o--:((e=new p(e)).d=d,e.e=o,d=(e=q(e,f,r,n,0,i)).d,o=e.e,u=_),a=d[r],s=i/2,u=u||void 0!==d[r+1],u=n<4?(void 0!==a||u)&&(0===n||n===(e.s<0?3:2)):a>s||a===s&&(4===n||u||6===n&&1&d[r-1]||n===(e.s<0?8:7)),d.length=r,u)for(;++d[--r]>i-1;)d[r]=0,r||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(a=0,c="";a<l;a++)c+=C.charAt(d[a]);if(h){if(l>1){if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)c+="0";for(l=(d=W(c,i,t)).length;!d[l-1];--l);for(a=1,c="1.";a<l;a++)c+=C.charAt(d[a])}else c=c.charAt(0)+"."+c.slice(1)}c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>l)for(o-=l;o--;)c+="0";else o<l&&(c=c.slice(0,o)+"."+c.slice(o))}else c=h?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=ea(e);return e.s<0?"-"+c:c}function ef(e,t){if(e.length>t)return e.length=t,!0}function ep(e){return new this(e).abs()}function eh(e){return new this(e).acos()}function em(e){return new this(e).acosh()}function eg(e,t){return new this(e).plus(t)}function ev(e){return new this(e).asin()}function ey(e){return new this(e).asinh()}function ex(e){return new this(e).atan()}function eb(e){return new this(e).atanh()}function ew(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?J(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=J(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=J(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)):(r=J(this,o,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function e_(e){return new this(e).cbrt()}function ej(e){return G(e=new this(e),e.e+1,2)}function eC(e,t,r){return new this(e).clamp(t,r)}function ek(e){if(!e||"object"!=typeof e)throw Error(P+"Object expected");var t,r,n,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],i&&(this[r]=S[r]),void 0!==(n=e[r])){if(A(n)===n&&n>=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(L+r+": "+n)}if(r="crypto",i&&(this[r]=S[r]),void 0!==(n=e[r])){if(!0===n||!1===n||0===n||1===n){if(n){if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(O)}else this[r]=!1}else throw Error(L+r+": "+n)}return this}function eE(e){return new this(e).cos()}function eS(e){return new this(e).cosh()}function eN(e,t){return new this(e).div(t)}function eP(e){return new this(e).exp()}function eL(e){return G(e=new this(e),e.e+1,3)}function eT(){var e,t,r=new this(0);for(N=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return N=!0,new this(1/0);r=t}return N=!0,r.sqrt()}function eO(e){return e instanceof eQ||e&&e.toStringTag===R||!1}function eR(e){return new this(e).ln()}function eA(e,t){return new this(e).log(t)}function eI(e){return new this(e).log(2)}function eM(e){return new this(e).log(10)}function eD(){return en(this,arguments,"lt")}function eF(){return en(this,arguments,"gt")}function ez(e,t){return new this(e).mod(t)}function eB(e,t){return new this(e).mul(t)}function eU(e,t){return new this(e).pow(t)}function eV(e){var t,r,n,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:H(e,1,1e9),n=Math.ceil(e/7),this.crypto){if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));o<n;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o<n;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=n/4}else throw Error(O)}else for(;o<n;)s[o++]=1e7*Math.random()|0;for(n=s[--o],e%=7,n&&e&&(i=I(10,7-e),s[o]=(n/i|0)*i);0===s[o];o--)s.pop();if(o<0)r=0,s=[0];else{for(r=-1;0===s[0];r-=7)s.shift();for(n=1,i=s[0];i>=10;i/=10)n++;n<7&&(r-=7-n)}return a.e=r,a.d=s,a}function e$(e){return G(e=new this(e),e.e+1,this.rounding)}function eH(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function eZ(e){return new this(e).sin()}function eW(e){return new this(e).sinh()}function eq(e){return new this(e).sqrt()}function eG(e,t){return new this(e).sub(t)}function eY(){var e=0,t=arguments,r=new this(t[0]);for(N=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return N=!0,G(r,this.precision,this.rounding)}function eK(e){return new this(e).tan()}function eX(e){return new this(e).tanh()}function eJ(e){return G(e=new this(e),e.e+1,1)}V[Symbol.for("nodejs.util.inspect.custom")]=V.toString,V[Symbol.toStringTag]="Decimal";var eQ=V.constructor=function e(t){var r,n,i;function o(e){var t,r,n;if(!(this instanceof o))return new o(e);if(this.constructor=o,eO(e)){this.s=e.s,N?!e.d||e.e>o.maxE?(this.e=NaN,this.d=null):e.e<o.minE?(this.e=0,this.d=[0]):(this.e=e.e,this.d=e.d.slice()):(this.e=e.e,this.d=e.d?e.d.slice():e.d);return}if("number"==(n=typeof e)){if(0===e){this.s=1/e<0?-1:1,this.e=0,this.d=[0];return}if(e<0?(e=-e,this.s=-1):this.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;N?t>o.maxE?(this.e=NaN,this.d=null):t<o.minE?(this.e=0,this.d=[0]):(this.e=t,this.d=[e]):(this.e=t,this.d=[e]);return}if(0*e!=0){e||(this.s=NaN),this.e=NaN,this.d=null;return}return es(this,e.toString())}if("string"!==n)throw Error(L+e);return 45===(r=e.charCodeAt(0))?(e=e.slice(1),this.s=-1):(43===r&&(e=e.slice(1)),this.s=1),z.test(e)?es(this,e):function(e,t){var r,n,i,o,a,s,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),z.test(t))return es(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(D.test(t))r=16,t=t.toLowerCase();else if(M.test(t))r=2;else if(F.test(t))r=8;else throw Error(L+t);for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,n=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=et(n,new n(r),o,2*o)),o=c=(u=W(t,r,1e7)).length-1;0===u[o];--o)u.pop();return o<0?new n(0*e.s):(e.e=K(u,c),e.d=u,N=!1,a&&(e=q(e,i,4*s)),l&&(e=e.times(54>Math.abs(l)?I(2,l):eQ.pow(2,l))),N=!0,e)}(this,e)}if(o.prototype=V,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=ek,o.clone=e,o.isDecimal=eO,o.abs=ep,o.acos=eh,o.acosh=em,o.add=eg,o.asin=ev,o.asinh=ey,o.atan=ex,o.atanh=eb,o.atan2=ew,o.cbrt=e_,o.ceil=ej,o.clamp=eC,o.cos=eE,o.cosh=eS,o.div=eN,o.exp=eP,o.floor=eL,o.hypot=eT,o.ln=eR,o.log=eA,o.log10=eM,o.log2=eI,o.max=eD,o.min=eF,o.mod=ez,o.mul=eB,o.pow=eU,o.random=eV,o.round=e$,o.sign=eH,o.sin=eZ,o.sinh=eW,o.sqrt=eq,o.sub=eG,o.sum=eY,o.tan=eK,o.tanh=eX,o.trunc=eJ,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return o.config(t),o}(S);k=new eQ(k),E=new eQ(E);var e0=eQ},62469:function(e,t,r){"use strict";r.d(t,{$2U:function(){return H},AjK:function(){return A},BNd:function(){return f},JtS:function(){return K},LPM:function(){return M},LZ3:function(){return l},NhS:function(){return y},Pxu:function(){return L},QUb:function(){return h},SPS:function(){return J},Sd5:function(){return er},TIy:function(){return E},VAA:function(){return c},XBm:function(){return B},XCv:function(){return _},Y4O:function(){return a},_Ve:function(){return W},g8U:function(){return C},jXb:function(){return O},kDh:function(){return G},nQG:function(){return g},pjG:function(){return ee},pso:function(){return F},qDj:function(){return V},v4q:function(){return b},ypG:function(){return N}});var n=r(67294);function i(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}var o=["color"],a=(0,n.forwardRef)(function(e,t){var r=e.color,a=i(e,o);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:t}),(0,n.createElement)("path",{d:"M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),s=["color"],l=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,s);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),u=["color"],c=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,u);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),d=["color"],f=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,d);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M8.81809 4.18179C8.99383 4.35753 8.99383 4.64245 8.81809 4.81819L6.13629 7.49999L8.81809 10.1818C8.99383 10.3575 8.99383 10.6424 8.81809 10.8182C8.64236 10.9939 8.35743 10.9939 8.1817 10.8182L5.1817 7.81819C5.09731 7.73379 5.0499 7.61933 5.0499 7.49999C5.0499 7.38064 5.09731 7.26618 5.1817 7.18179L8.1817 4.18179C8.35743 4.00605 8.64236 4.00605 8.81809 4.18179Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),p=["color"],h=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,p);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M6.18194 4.18185C6.35767 4.00611 6.6426 4.00611 6.81833 4.18185L9.81833 7.18185C9.90272 7.26624 9.95013 7.3807 9.95013 7.50005C9.95013 7.6194 9.90272 7.73386 9.81833 7.81825L6.81833 10.8182C6.6426 10.994 6.35767 10.994 6.18194 10.8182C6.0062 10.6425 6.0062 10.3576 6.18194 10.1819L8.86374 7.50005L6.18194 4.81825C6.0062 4.64251 6.0062 4.35759 6.18194 4.18185Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),m=["color"],g=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,m);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),v=["color"],y=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,v);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),x=["color"],b=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,x);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),w=["color"],_=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,w);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),j=["color"],C=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,j);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),k=["color"],E=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,k);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),S=["color"],N=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,S);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),P=["color"],L=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,P);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),T=["color"],O=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,T);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:void 0===r?"currentColor":r}))}),R=["color"],A=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,R);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M8.625 2.5C8.625 3.12132 8.12132 3.625 7.5 3.625C6.87868 3.625 6.375 3.12132 6.375 2.5C6.375 1.87868 6.87868 1.375 7.5 1.375C8.12132 1.375 8.625 1.87868 8.625 2.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM7.5 13.625C8.12132 13.625 8.625 13.1213 8.625 12.5C8.625 11.8787 8.12132 11.375 7.5 11.375C6.87868 11.375 6.375 11.8787 6.375 12.5C6.375 13.1213 6.87868 13.625 7.5 13.625Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),I=["color"],M=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,I);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),D=["color"],F=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,D);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M12.5 2H8V7H13V2.5C13 2.22386 12.7761 2 12.5 2ZM13 8H8V13H12.5C12.7761 13 13 12.7761 13 12.5V8ZM7 7V2H2.5C2.22386 2 2 2.22386 2 2.5V7H7ZM2 8V12.5C2 12.7761 2.22386 13 2.5 13H7V8H2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),z=["color"],B=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,z);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),U=["color"],V=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,U);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),$=["color"],H=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,$);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M13.9 0.499976C13.9 0.279062 13.7209 0.0999756 13.5 0.0999756C13.2791 0.0999756 13.1 0.279062 13.1 0.499976V1.09998H12.5C12.2791 1.09998 12.1 1.27906 12.1 1.49998C12.1 1.72089 12.2791 1.89998 12.5 1.89998H13.1V2.49998C13.1 2.72089 13.2791 2.89998 13.5 2.89998C13.7209 2.89998 13.9 2.72089 13.9 2.49998V1.89998H14.5C14.7209 1.89998 14.9 1.72089 14.9 1.49998C14.9 1.27906 14.7209 1.09998 14.5 1.09998H13.9V0.499976ZM11.8536 3.14642C12.0488 3.34168 12.0488 3.65826 11.8536 3.85353L10.8536 4.85353C10.6583 5.04879 10.3417 5.04879 10.1465 4.85353C9.9512 4.65827 9.9512 4.34169 10.1465 4.14642L11.1464 3.14643C11.3417 2.95116 11.6583 2.95116 11.8536 3.14642ZM9.85357 5.14642C10.0488 5.34168 10.0488 5.65827 9.85357 5.85353L2.85355 12.8535C2.65829 13.0488 2.34171 13.0488 2.14645 12.8535C1.95118 12.6583 1.95118 12.3417 2.14645 12.1464L9.14646 5.14642C9.34172 4.95116 9.65831 4.95116 9.85357 5.14642ZM13.5 5.09998C13.7209 5.09998 13.9 5.27906 13.9 5.49998V6.09998H14.5C14.7209 6.09998 14.9 6.27906 14.9 6.49998C14.9 6.72089 14.7209 6.89998 14.5 6.89998H13.9V7.49998C13.9 7.72089 13.7209 7.89998 13.5 7.89998C13.2791 7.89998 13.1 7.72089 13.1 7.49998V6.89998H12.5C12.2791 6.89998 12.1 6.72089 12.1 6.49998C12.1 6.27906 12.2791 6.09998 12.5 6.09998H13.1V5.49998C13.1 5.27906 13.2791 5.09998 13.5 5.09998ZM8.90002 0.499976C8.90002 0.279062 8.72093 0.0999756 8.50002 0.0999756C8.2791 0.0999756 8.10002 0.279062 8.10002 0.499976V1.09998H7.50002C7.2791 1.09998 7.10002 1.27906 7.10002 1.49998C7.10002 1.72089 7.2791 1.89998 7.50002 1.89998H8.10002V2.49998C8.10002 2.72089 8.2791 2.89998 8.50002 2.89998C8.72093 2.89998 8.90002 2.72089 8.90002 2.49998V1.89998H9.50002C9.72093 1.89998 9.90002 1.72089 9.90002 1.49998C9.90002 1.27906 9.72093 1.09998 9.50002 1.09998H8.90002V0.499976Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),Z=["color"],W=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,Z);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),q=["color"],G=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,q);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 13C12.5523 13 13 12.5523 13 12V3C13 2.44771 12.5523 2 12 2H3C2.44771 2 2 2.44771 2 3V6.5C2 6.77614 2.22386 7 2.5 7C2.77614 7 3 6.77614 3 6.5V3H12V12H8.5C8.22386 12 8 12.2239 8 12.5C8 12.7761 8.22386 13 8.5 13H12ZM9 6.5C9 6.5001 9 6.50021 9 6.50031V6.50035V9.5C9 9.77614 8.77614 10 8.5 10C8.22386 10 8 9.77614 8 9.5V7.70711L2.85355 12.8536C2.65829 13.0488 2.34171 13.0488 2.14645 12.8536C1.95118 12.6583 1.95118 12.3417 2.14645 12.1464L7.29289 7H5.5C5.22386 7 5 6.77614 5 6.5C5 6.22386 5.22386 6 5.5 6H8.5C8.56779 6 8.63244 6.01349 8.69139 6.03794C8.74949 6.06198 8.80398 6.09744 8.85143 6.14433C8.94251 6.23434 8.9992 6.35909 8.99999 6.49708L8.99999 6.49738",fill:void 0===r?"currentColor":r}))}),Y=["color"],K=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,Y);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M11.8536 1.14645C11.6583 0.951184 11.3417 0.951184 11.1465 1.14645L3.71455 8.57836C3.62459 8.66832 3.55263 8.77461 3.50251 8.89155L2.04044 12.303C1.9599 12.491 2.00189 12.709 2.14646 12.8536C2.29103 12.9981 2.50905 13.0401 2.69697 12.9596L6.10847 11.4975C6.2254 11.4474 6.3317 11.3754 6.42166 11.2855L13.8536 3.85355C14.0488 3.65829 14.0488 3.34171 13.8536 3.14645L11.8536 1.14645ZM4.42166 9.28547L11.5 2.20711L12.7929 3.5L5.71455 10.5784L4.21924 11.2192L3.78081 10.7808L4.42166 9.28547Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),X=["color"],J=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,X);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),Q=["color"],ee=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,Q);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))}),et=["color"],er=(0,n.forwardRef)(function(e,t){var r=e.color,o=i(e,et);return(0,n.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,n.createElement)("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159ZM4.25 6.5C4.25 6.22386 4.47386 6 4.75 6H6V4.75C6 4.47386 6.22386 4.25 6.5 4.25C6.77614 4.25 7 4.47386 7 4.75V6H8.25C8.52614 6 8.75 6.22386 8.75 6.5C8.75 6.77614 8.52614 7 8.25 7H7V8.25C7 8.52614 6.77614 8.75 6.5 8.75C6.22386 8.75 6 8.52614 6 8.25V7H4.75C4.47386 7 4.25 6.77614 4.25 6.5Z",fill:void 0===r?"currentColor":r,fillRule:"evenodd",clipRule:"evenodd"}))})},23541:function(e,t,r){"use strict";r.d(t,{Ry:function(){return u}});var n=new WeakMap,i=new WeakMap,o={},a=0,s=function(e){return e&&(e.host||s(e.parentNode))},l=function(e,t,r,l){var u=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=s(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});o[r]||(o[r]=new WeakMap);var c=o[r],d=[],f=new Set,p=new Set(u),h=function(e){!e||f.has(e)||(f.add(e),h(e.parentNode))};u.forEach(h);var m=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(f.has(e))m(e);else try{var t=e.getAttribute(l),o=null!==t&&"false"!==t,a=(n.get(e)||0)+1,s=(c.get(e)||0)+1;n.set(e,a),c.set(e,s),d.push(e),1===a&&o&&i.set(e,!0),1===s&&e.setAttribute(r,"true"),o||e.setAttribute(l,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(t),f.clear(),a++,function(){d.forEach(function(e){var t=n.get(e)-1,o=c.get(e)-1;n.set(e,t),c.set(e,o),t||(i.has(e)||e.removeAttribute(l),i.delete(e)),o||e.removeAttribute(r)}),--a||(n=new WeakMap,n=new WeakMap,i=new WeakMap,o={})}},u=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),l(n,i,r,"aria-hidden")):function(){return null}}},9669:function(e,t,r){e.exports=r(51609)},55448:function(e,t,r){"use strict";var n=r(64867),i=r(36026),o=r(4372),a=r(15327),s=r(94097),l=r(84109),u=r(67985),c=r(77874),d=r(82648),f=r(60644),p=r(90205);e.exports=function(e){return new Promise(function(t,r){var h,m=e.data,g=e.headers,v=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}n.isFormData(m)&&n.isStandardBrowserEnv()&&delete g["Content-Type"];var x=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+w)}var _=s(e.baseURL,e.url);function j(){if(x){var n="getAllResponseHeaders"in x?l(x.getAllResponseHeaders()):null;i(function(e){t(e),y()},function(e){r(e),y()},{data:v&&"text"!==v&&"json"!==v?x.response:x.responseText,status:x.status,statusText:x.statusText,headers:n,config:e,request:x}),x=null}}if(x.open(e.method.toUpperCase(),a(_,e.params,e.paramsSerializer),!0),x.timeout=e.timeout,"onloadend"in x?x.onloadend=j:x.onreadystatechange=function(){x&&4===x.readyState&&(0!==x.status||x.responseURL&&0===x.responseURL.indexOf("file:"))&&setTimeout(j)},x.onabort=function(){x&&(r(new d("Request aborted",d.ECONNABORTED,e,x)),x=null)},x.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,x,x)),x=null},x.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,n.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,x)),x=null},n.isStandardBrowserEnv()){var C=(e.withCredentials||u(_))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;C&&(g[e.xsrfHeaderName]=C)}"setRequestHeader"in x&&n.forEach(g,function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete g[t]:x.setRequestHeader(t,e)}),n.isUndefined(e.withCredentials)||(x.withCredentials=!!e.withCredentials),v&&"json"!==v&&(x.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&x.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&x.upload&&x.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){x&&(r(!e||e&&e.type?new f:e),x.abort(),x=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),m||(m=null);var k=p(_);if(k&&-1===["http","https","file"].indexOf(k)){r(new d("Unsupported protocol "+k+":",d.ERR_BAD_REQUEST,e));return}x.send(m)})}},51609:function(e,t,r){"use strict";var n=r(64867),i=r(91849),o=r(30321),a=r(47185),s=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(45546));s.Axios=o,s.CanceledError=r(60644),s.CancelToken=r(14972),s.isCancel=r(26502),s.VERSION=r(97288).version,s.toFormData=r(47675),s.AxiosError=r(82648),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=r(8713),s.isAxiosError=r(16268),e.exports=s,e.exports.default=s},14972:function(e,t,r){"use strict";var n=r(60644);function i(e){if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});var t,r=this;this.promise.then(function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},60644:function(e,t,r){"use strict";var n=r(82648);function i(e){n.call(this,null==e?"canceled":e,n.ERR_CANCELED),this.name="CanceledError"}r(64867).inherits(i,n,{__CANCEL__:!0}),e.exports=i},26502:function(e){"use strict";e.exports=function(e){return!!(e&&e.__CANCEL__)}},30321:function(e,t,r){"use strict";var n=r(64867),i=r(15327),o=r(80782),a=r(13572),s=r(47185),l=r(94097),u=r(54875),c=u.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r,n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var i=[],o=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(o=o&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});var l=[];if(this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)}),!o){var d=[a,void 0];for(Array.prototype.unshift.apply(d,i),d=d.concat(l),r=Promise.resolve(t);d.length;)r=r.then(d.shift(),d.shift());return r}for(var f=t;i.length;){var p=i.shift(),h=i.shift();try{f=p(f)}catch(e){h(e);break}}try{r=a(f)}catch(e){return Promise.reject(e)}for(;l.length;)r=r.then(l.shift(),l.shift());return r},d.prototype.getUri=function(e){return i(l((e=s(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],function(e){d.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}}),n.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)}),e.exports=d},82648:function(e,t,r){"use strict";var n=r(64867);function i(e,t,r,n,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(e){a[e]={value:e}}),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,r,a,s,l){var u=Object.create(o);return n.toFlatObject(e,u,function(e){return e!==Error.prototype}),i.call(u,e.message,t,r,a,s),u.name=e.name,l&&Object.assign(u,l),u},e.exports=i},80782:function(e,t,r){"use strict";var n=r(64867);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},94097:function(e,t,r){"use strict";var n=r(91793),i=r(7303);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},13572:function(e,t,r){"use strict";var n=r(64867),i=r(18527),o=r(26502),a=r(45546),s=r(60644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return!o(t)&&(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},47185:function(e,t,r){"use strict";var n=r(64867);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function l(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return n.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=u[e]||o,i=t(e);n.isUndefined(i)&&t!==l||(r[e]=i)}),r}},36026:function(e,t,r){"use strict";var n=r(82648);e.exports=function(e,t,r){var i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}},18527:function(e,t,r){"use strict";var n=r(64867),i=r(45546);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,function(r){e=r.call(o,e,t)}),e}},45546:function(e,t,r){"use strict";var n,i=r(34155),o=r(64867),a=r(16016),s=r(82648),l=r(77874),u=r(47675),c={"Content-Type":"application/x-www-form-urlencoded"};function d(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var f={transitional:l,adapter:("undefined"!=typeof XMLHttpRequest?n=r(55448):void 0!==i&&"[object process]"===Object.prototype.toString.call(i)&&(n=r(55448)),n),transformRequest:[function(e,t){if(a(t,"Accept"),a(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e))return e;if(o.isArrayBufferView(e))return e.buffer;if(o.isURLSearchParams(e))return d(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=o.isObject(e),i=t&&t["Content-Type"];if((r=o.isFileList(e))||n&&"multipart/form-data"===i){var s=this.env&&this.env.FormData;return u(r?{"files[]":e}:e,s&&new s)}return n||"application/json"===i?(d(t,"application/json"),function(e,t,r){if(o.isString(e))try{return(0,JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||f.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw s.from(e,s.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:r(91623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],function(e){f.headers[e]={}}),o.forEach(["post","put","patch"],function(e){f.headers[e]=o.merge(c)}),e.exports=f},77874:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},97288:function(e){e.exports={version:"0.27.2"}},91849:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},15327:function(e,t,r){"use strict";var n=r(64867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var o,a=[];n.forEach(t,function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))}))}),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:function(e,t,r){"use strict";var n=r(64867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},16268:function(e,t,r){"use strict";var n=r(64867);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},67985:function(e,t,r){"use strict";var n=r(64867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16016:function(e,t,r){"use strict";var n=r(64867);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},91623:function(e){e.exports=null},84109:function(e,t,r){"use strict";var n=r(64867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e&&n.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t&&!(a[t]&&i.indexOf(t)>=0)&&("set-cookie"===t?a[t]=(a[t]?a[t]:[]).concat([r]):a[t]=a[t]?a[t]+", "+r:r)}),a}},90205:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},47675:function(e,t,r){"use strict";var n=r(48764).Buffer,i=r(64867);e.exports=function(e,t){t=t||new FormData;var r=[];function o(e){return null===e?"":i.isDate(e)?e.toISOString():i.isArrayBuffer(e)||i.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):n.from(e):e}return!function e(n,a){if(i.isPlainObject(n)||i.isArray(n)){if(-1!==r.indexOf(n))throw Error("Circular reference detected in "+a);r.push(n),i.forEach(n,function(r,n){if(!i.isUndefined(r)){var s,l=a?a+"."+n:n;if(r&&!a&&"object"==typeof r){if(i.endsWith(n,"{}"))r=JSON.stringify(r);else if(i.endsWith(n,"[]")&&(s=i.toArray(r))){s.forEach(function(e){i.isUndefined(e)||t.append(l,o(e))});return}}e(r,l)}}),r.pop()}else t.append(a,o(n))}(e),t}},54875:function(e,t,r){"use strict";var n=r(97288).version,i=r(82648),o={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var a={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new i(o(n," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!a[n]&&(a[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var a=n[o],s=t[a];if(s){var l=e[a],u=void 0===l||s(l,a,e);if(!0!==u)throw new i("option "+a+" must be "+u,i.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new i("Unknown option "+a,i.ERR_BAD_OPTION)}},validators:o}},64867:function(e,t,r){"use strict";var n,i,o=r(91849),a=Object.prototype.toString,s=(n=Object.create(null),function(e){var t=a.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function l(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function u(e){return Array.isArray(e)}function c(e){return void 0===e}var d=l("ArrayBuffer");function f(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=l("Date"),m=l("File"),g=l("Blob"),v=l("FileList");function y(e){return"[object Function]"===a.call(e)}var x=l("URLSearchParams");function b(e,t){if(null!=e){if("object"!=typeof e&&(e=[e]),u(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}}var w=(i="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return i&&e instanceof i});e.exports={isArray:u,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||a.call(e)===t||y(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:f,isPlainObject:p,isUndefined:c,isDate:h,isFile:m,isBlob:g,isFunction:y,isStream:function(e){return f(e)&&y(e.pipe)},isURLSearchParams:x,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function e(){var t={};function r(r,n){p(t[n])&&p(r)?t[n]=e(t[n],r):p(r)?t[n]=e({},r):u(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)b(arguments[n],r);return t},extend:function(e,t,r){return b(t,function(t,n){r&&"function"==typeof t?e[n]=o(t,r):e[n]=t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r){var n,i,o,a={};t=t||{};do{for(i=(n=Object.getOwnPropertyNames(e)).length;i-- >0;)a[o=n[i]]||(t[o]=e[o],a[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:l,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return -1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var r=Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:w,isFileList:v}},79742:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),a=o[0],s=o[1],u=new i((a+s)*3/4-s),c=0,d=s>0?a-4:a;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(function(e,t,n){for(var i,o=[],a=t;a<n;a+=3)o.push(r[(i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:function(e,t,r){"use strict";var n=r(79742),i=r(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(P(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(P(e,ArrayBuffer)||e&&P(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(P(e,SharedArrayBuffer)||e&&P(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);var i=function(e){if(s.isBuffer(e)){var t,r=0|p(e.length),n=a(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|p(e))}function d(e){for(var t=e.length<0?0:0|p(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),n}function p(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||P(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(e).length;default:if(i)return n?-1:E(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var i,o,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=L[e[o]];return i}(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=t,o=r,0===i&&o===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else -1!==c&&(o-=o-c),c=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){for(var d=!0,f=0;f<l;f++)if(u(e,o+f)!==u(t,f)){d=!1;break}if(d)return o}return -1}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,l,u=e[i],c=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],(192&o)==128&&(192&a)==128&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],(192&o)==128&&(192&a)==128&&(192&s)==128&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,i,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function _(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||_(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function C(e,t,r,n,o){return t=+t,r>>>=0,o||_(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(u(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(P(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),P(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(P(o,Uint8Array))i+o.length>n.length?s.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else if(s.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?x(this,0,e):m.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(P(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,l=Math.min(o,a),u=this.slice(n,i),c=e.slice(t,r),d=0;d<l;++d)if(u[d]!==c[d]){o=u[d],a=c[d];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,l,u,c,d,f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(s!=s)break;e[r+a]=s}return a}(this,e,t,r);case"utf8":case"utf-8":return i=t,o=r,N(E(e,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return a=t,s=r,N(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,s);case"base64":return l=t,u=r,N(S(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,d=r,N(function(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,d);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),l=a.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%l]}return this};var k=/[^+/0-9A-Za-z-_]/g;function E(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function S(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function P(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var L=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},86010:function(e,t,r){"use strict";function n(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n);else for(r in t)t[r]&&(i&&(i+=" "),i+=r)}return i}(e))&&(n&&(n+=" "),n+=t);return n}r.d(t,{W:function(){return n}}),t.Z=n},76489:function(e,t){"use strict";t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var n={},i=e.split(";"),o=(t||{}).decode||r,a=0;a<i.length;a++){var s=i[a],l=s.indexOf("=");if(!(l<0)){var u=s.substring(0,l).trim();if(void 0==n[u]){var c=s.substring(l+1,s.length).trim();'"'===c[0]&&(c=c.slice(1,-1)),n[u]=function(e,t){try{return t(e)}catch(t){return e}}(c,o)}}}return n},t.serialize=function(e,t,r){var o=r||{},a=o.encode||n;if("function"!=typeof a)throw TypeError("option encode is invalid");if(!i.test(e))throw TypeError("argument name is invalid");var s=a(t);if(s&&!i.test(s))throw TypeError("argument val is invalid");var l=e+"="+s;if(null!=o.maxAge){var u=o.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(u)}if(o.domain){if(!i.test(o.domain))throw TypeError("option domain is invalid");l+="; Domain="+o.domain}if(o.path){if(!i.test(o.path))throw TypeError("option path is invalid");l+="; Path="+o.path}if(o.expires){if("function"!=typeof o.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(l+="; HttpOnly"),o.secure&&(l+="; Secure"),o.sameSite)switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return l};var r=decodeURIComponent,n=encodeURIComponent,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},47041:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCookie=t.deleteCookie=t.setCookie=t.getCookie=t.getCookies=void 0;var o=r(76489),a=function(){return"undefined"!=typeof window},s=function(e){return!!e&&"set"in e&&"function"==typeof e.getAll&&"function"==typeof e.set},l=function(e){return!!(null==e?void 0:e.req)&&"cookies"in e.req&&s(null==e?void 0:e.req.cookies)||!!(null==e?void 0:e.res)&&"cookies"in e.res&&s(null==e?void 0:e.res.cookies)},u=function(e){var t={};return e.getAll().forEach(function(e){var r=e.name,n=e.value;t[r]=n}),t},c=function(e){void 0===e&&(e="");try{var t=JSON.stringify(e);return/^[\{\[]/.test(t)?t:e}catch(t){return e}};t.getCookies=function(e){if(l(e)&&(null==e?void 0:e.req))return u(e.req.cookies);if(e&&(t=e.req),!a())return t&&t.cookies?t.cookies:t&&t.headers.cookie?(0,o.parse)(t.headers.cookie):{};for(var t,r={},n=document.cookie?document.cookie.split("; "):[],i=0,s=n.length;i<s;i++){var c=n[i].split("="),d=c.slice(1).join("=");r[c[0]]=d}return r},t.getCookie=function(e,r){var n=(0,t.getCookies)(r)[e];if(void 0!==n)return n?n.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent):n},t.setCookie=function(e,t,r){if(l(r)){var s,u,d,f=r.req,p=r.res,h=i(r,["req","res"]),m=n({name:e,value:t},h);f&&f.cookies.set(m),p&&p.cookies.set(m);return}if(r){var f=r.req,p=r.res,g=i(r,["req","res"]);u=f,d=p,s=g}var v=(0,o.serialize)(e,c(t),n({path:"/"},s));if(a())document.cookie=v;else if(d&&u){var y=d.getHeader("Set-Cookie");if(Array.isArray(y)||(y=y?[String(y)]:[]),d.setHeader("Set-Cookie",y.concat(v)),u&&u.cookies){var x=u.cookies;""===t?delete x[e]:x[e]=c(t)}if(u&&u.headers&&u.headers.cookie){var x=(0,o.parse)(u.headers.cookie);""===t?delete x[e]:x[e]=c(t),u.headers.cookie=Object.entries(x).reduce(function(e,t){return e.concat("".concat(t[0],"=").concat(t[1],";"))},"")}}},t.deleteCookie=function(e,r){return(0,t.setCookie)(e,"",n(n({},r),{maxAge:-1}))},t.hasCookie=function(e,r){return!!e&&(0,t.getCookies)(r).hasOwnProperty(e)}},58875:function(e,t,r){var n,i,o;o={canUseDOM:i=!!("undefined"!=typeof window&&window.document&&window.document.createElement),canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!!(window.addEventListener||window.attachEvent),canUseViewport:i&&!!window.screen},void 0!==(n=(function(){return o}).call(t,r,t,e))&&(e.exports=n)},8679:function(e,t,r){"use strict";var n=r(59864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(h){var i=p(r);i&&i!==h&&e(t,i,n)}var a=c(r);d&&(a=a.concat(d(r)));for(var s=l(t),m=l(r),g=0;g<a.length;++g){var v=a[g];if(!o[v]&&!(n&&n[v])&&!(m&&m[v])&&!(s&&s[v])){var y=f(r,v);try{u(t,v,y)}catch(e){}}}}return t}},80645:function(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,d=r?i-1:0,f=r?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=u}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,d=c>>1,f=23===i?5960464477539062e-23:0,p=n?0:o-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+p]=255&a,p+=h,a/=256,u-=8);e[r+p-h]|=128*m}},38554:function(e,t,r){e=r.nmd(e);var n,i,o,a,s,l,u,c,d,f,p,h="__lodash_hash_undefined__",m="[object Arguments]",g="[object Function]",v="[object Object]",y=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[m]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[g]=b["[object Map]"]=b["[object Number]"]=b[v]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var w="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,_="object"==typeof self&&self&&self.Object===Object&&self,j=w||_||Function("return this")(),C=t&&!t.nodeType&&t,k=C&&e&&!e.nodeType&&e,E=k&&k.exports===C,S=E&&w.process,N=function(){try{var e=k&&k.require&&k.require("util").types;if(e)return e;return S&&S.binding&&S.binding("util")}catch(e){}}(),P=N&&N.isTypedArray,L=Array.prototype,T=Function.prototype,O=Object.prototype,R=j["__core-js_shared__"],A=T.toString,I=O.hasOwnProperty,M=(u=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",D=O.toString,F=A.call(Object),z=RegExp("^"+A.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=E?j.Buffer:void 0,U=j.Symbol,V=j.Uint8Array,$=B?B.allocUnsafe:void 0,H=(c=Object.getPrototypeOf,d=Object,function(e){return c(d(e))}),Z=Object.create,W=O.propertyIsEnumerable,q=L.splice,G=U?U.toStringTag:void 0,Y=function(){try{var e=ep(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),K=B?B.isBuffer:void 0,X=Math.max,J=Date.now,Q=ep(j,"Map"),ee=ep(Object,"create"),et=function(){function e(){}return function(t){if(!ek(t))return{};if(Z)return Z(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function er(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function en(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ei(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eo(e){var t=this.__data__=new en(e);this.size=t.size}function ea(e,t,r){(void 0===r||ey(e[t],r))&&(void 0!==r||t in e)||el(e,t,r)}function es(e,t){for(var r=e.length;r--;)if(ey(e[r][0],t))return r;return -1}function el(e,t,r){"__proto__"==t&&Y?Y(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}er.prototype.clear=function(){this.__data__=ee?ee(null):{},this.size=0},er.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},er.prototype.get=function(e){var t=this.__data__;if(ee){var r=t[e];return r===h?void 0:r}return I.call(t,e)?t[e]:void 0},er.prototype.has=function(e){var t=this.__data__;return ee?void 0!==t[e]:I.call(t,e)},er.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ee&&void 0===t?h:t,this},en.prototype.clear=function(){this.__data__=[],this.size=0},en.prototype.delete=function(e){var t=this.__data__,r=es(t,e);return!(r<0)&&(r==t.length-1?t.pop():q.call(t,r,1),--this.size,!0)},en.prototype.get=function(e){var t=this.__data__,r=es(t,e);return r<0?void 0:t[r][1]},en.prototype.has=function(e){return es(this.__data__,e)>-1},en.prototype.set=function(e,t){var r=this.__data__,n=es(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},ei.prototype.clear=function(){this.size=0,this.__data__={hash:new er,map:new(Q||en),string:new er}},ei.prototype.delete=function(e){var t=ef(this,e).delete(e);return this.size-=t?1:0,t},ei.prototype.get=function(e){return ef(this,e).get(e)},ei.prototype.has=function(e){return ef(this,e).has(e)},ei.prototype.set=function(e,t){var r=ef(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},eo.prototype.clear=function(){this.__data__=new en,this.size=0},eo.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eo.prototype.get=function(e){return this.__data__.get(e)},eo.prototype.has=function(e){return this.__data__.has(e)},eo.prototype.set=function(e,t){var r=this.__data__;if(r instanceof en){var n=r.__data__;if(!Q||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ei(n)}return r.set(e,t),this.size=r.size,this};var eu=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var s=o[++n];if(!1===t(i[s],s,i))break}return e};function ec(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":G&&G in Object(e)?function(e){var t=I.call(e,G),r=e[G];try{e[G]=void 0;var n=!0}catch(e){}var i=D.call(e);return n&&(t?e[G]=r:delete e[G]),i}(e):D.call(e)}function ed(e){return eE(e)&&ec(e)==m}function ef(e,t){var r,n=e.__data__;return("string"==(r=typeof t)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function ep(e,t){var r=null==e?void 0:e[t];return!(!ek(r)||M&&M in r)&&(ej(r)?z:y).test(function(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(r))?r:void 0}function eh(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&x.test(e))&&e>-1&&e%1==0&&e<t}function em(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||O)}function eg(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ev=(n=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:eL,i=0,o=0,function(){var e=J(),t=16-(e-o);if(o=e,t>0){if(++i>=800)return arguments[0]}else i=0;return n.apply(void 0,arguments)});function ey(e,t){return e===t||e!=e&&t!=t}var ex=ed(function(){return arguments}())?ed:function(e){return eE(e)&&I.call(e,"callee")&&!W.call(e,"callee")},eb=Array.isArray;function ew(e){return null!=e&&eC(e.length)&&!ej(e)}var e_=K||function(){return!1};function ej(e){if(!ek(e))return!1;var t=ec(e);return t==g||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eC(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ek(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eE(e){return null!=e&&"object"==typeof e}var eS=P?function(e){return P(e)}:function(e){return eE(e)&&eC(e.length)&&!!b[ec(e)]};function eN(e){return ew(e)?function(e,t){var r=eb(e),n=!r&&ex(e),i=!r&&!n&&e_(e),o=!r&&!n&&!i&&eS(e),a=r||n||i||o,s=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],l=s.length;for(var u in e)(t||I.call(e,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||eh(u,l)))&&s.push(u);return s}(e,!0):function(e){if(!ek(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=em(e),r=[];for(var n in e)"constructor"==n&&(t||!I.call(e,n))||r.push(n);return r}(e)}var eP=(f=function(e,t,r,n){!function e(t,r,n,i,o){t!==r&&eu(r,function(a,s){if(o||(o=new eo),ek(a))(function(e,t,r,n,i,o,a){var s=eg(e,r),l=eg(t,r),u=a.get(l);if(u){ea(e,r,u);return}var c=o?o(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var f,p,h,m=eb(l),g=!m&&e_(l),y=!m&&!g&&eS(l);c=l,m||g||y?eb(s)?c=s:eE(s)&&ew(s)?c=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(s):g?(d=!1,c=function(e,t){if(t)return e.slice();var r=e.length,n=$?$(r):new e.constructor(r);return e.copy(n),n}(l,!0)):y?(d=!1,new V(p=new(f=l.buffer).constructor(f.byteLength)).set(new V(f)),h=p,c=new l.constructor(h,l.byteOffset,l.length)):c=[]:function(e){if(!eE(e)||ec(e)!=v)return!1;var t=H(e);if(null===t)return!0;var r=I.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&A.call(r)==F}(l)||ex(l)?(c=s,ex(s)?c=function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;void 0===l&&(l=e[s]),i?el(r,s,l):function(e,t,r){var n=e[t];I.call(e,t)&&ey(n,r)&&(void 0!==r||t in e)||el(e,t,r)}(r,s,l)}return r}(s,eN(s)):(!ek(s)||ej(s))&&(c="function"!=typeof l.constructor||em(l)?{}:et(H(l)))):d=!1}d&&(a.set(l,c),i(c,l,n,o,a),a.delete(l)),ea(e,r,c)})(t,r,s,n,e,i,o);else{var l=i?i(eg(t,s),a,s+"",t,r,o):void 0;void 0===l&&(l=a),ea(t,s,l)}},eN)}(e,t,r,n)},ev((a=p=function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=f.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!ek(r))return!1;var n=typeof t;return("number"==n?!!(ew(r)&&eh(t,r.length)):"string"==n&&(t in r))&&ey(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var a=t[r];a&&f(e,a,r,i)}return e},s=void 0,l=eL,s=X(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=X(e.length-s,0),n=Array(r);++t<r;)n[t]=e[s+t];t=-1;for(var i=Array(s+1);++t<s;)i[t]=e[t];return i[s]=l(n),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(a,this,i)}),p+""));function eL(e){return e}e.exports=eP},62705:function(e,t,r){var n=r(55639).Symbol;e.exports=n},44239:function(e,t,r){var n=r(62705),i=r(89607),o=r(2333),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},27561:function(e,t,r){var n=r(67990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},31957:function(e,t,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},89607:function(e,t,r){var n=r(62705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:function(e,t,r){var n=r(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},67990:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},23279:function(e,t,r){var n=r(13218),i=r(7771),o=r(14841),a=Math.max,s=Math.min;e.exports=function(e,t,r){var l,u,c,d,f,p,h=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=l,n=u;return l=u=void 0,h=t,d=e.apply(n,r)}function x(e){var r=e-p,n=e-h;return void 0===p||r>=t||r<0||g&&n>=c}function b(){var e,r,n,o=i();if(x(o))return w(o);f=setTimeout(b,(e=o-p,r=o-h,n=t-e,g?s(n,c-r):n))}function w(e){return(f=void 0,v&&l)?y(e):(l=u=void 0,d)}function _(){var e,r=i(),n=x(r);if(l=arguments,u=this,p=r,n){if(void 0===f)return h=e=p,f=setTimeout(b,t),m?y(e):d;if(g)return clearTimeout(f),f=setTimeout(b,t),y(p)}return void 0===f&&(f=setTimeout(b,t)),d}return t=o(t)||0,n(r)&&(m=!!r.leading,c=(g="maxWait"in r)?a(o(r.maxWait)||0,t):c,v="trailing"in r?!!r.trailing:v),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,l=p=u=f=void 0},_.flush=function(){return void 0===f?d:w(i())},_}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,t,r){var n=r(44239),i=r(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},96486:function(e,t,r){var n;e=r.nmd(e),(function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=1/0,u=0/0,c=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],d="[object Arguments]",f="[object Array]",p="[object Boolean]",h="[object Date]",m="[object Error]",g="[object Function]",v="[object GeneratorFunction]",y="[object Map]",x="[object Number]",b="[object Object]",w="[object Promise]",_="[object RegExp]",j="[object Set]",C="[object String]",k="[object Symbol]",E="[object WeakMap]",S="[object ArrayBuffer]",N="[object DataView]",P="[object Float32Array]",L="[object Float64Array]",T="[object Int8Array]",O="[object Int16Array]",R="[object Int32Array]",A="[object Uint8Array]",I="[object Uint8ClampedArray]",M="[object Uint16Array]",D="[object Uint32Array]",F=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,U=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,$=RegExp(U.source),H=RegExp(V.source),Z=/<%-([\s\S]+?)%>/g,W=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,J=RegExp(X.source),Q=/^\s+/,ee=/\s/,et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,er=/\{\n\/\* \[wrapped with (.+)\] \*/,en=/,? & /,ei=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eo=/[()=,{}\[\]\/\s]/,ea=/\\(\\)?/g,es=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,el=/\w*$/,eu=/^[-+]0x[0-9a-f]+$/i,ec=/^0b[01]+$/i,ed=/^\[object .+?Constructor\]$/,ef=/^0o[0-7]+$/i,ep=/^(?:0|[1-9]\d*)$/,eh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,em=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ev="\ud800-\udfff",ey="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ex="\\u2700-\\u27bf",eb="a-z\\xdf-\\xf6\\xf8-\\xff",ew="A-Z\\xc0-\\xd6\\xd8-\\xde",e_="\\ufe0e\\ufe0f",ej="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eC="['’]",ek="["+ej+"]",eE="["+ey+"]",eS="["+eb+"]",eN="[^"+ev+ej+"\\d+"+ex+eb+ew+"]",eP="\ud83c[\udffb-\udfff]",eL="[^"+ev+"]",eT="(?:\ud83c[\udde6-\uddff]){2}",eO="[\ud800-\udbff][\udc00-\udfff]",eR="["+ew+"]",eA="\\u200d",eI="(?:"+eS+"|"+eN+")",eM="(?:"+eC+"(?:d|ll|m|re|s|t|ve))?",eD="(?:"+eC+"(?:D|LL|M|RE|S|T|VE))?",eF="(?:"+eE+"|"+eP+")?",ez="["+e_+"]?",eB="(?:"+eA+"(?:"+[eL,eT,eO].join("|")+")"+ez+eF+")*",eU=ez+eF+eB,eV="(?:"+["["+ex+"]",eT,eO].join("|")+")"+eU,e$="(?:"+[eL+eE+"?",eE,eT,eO,"["+ev+"]"].join("|")+")",eH=RegExp(eC,"g"),eZ=RegExp(eE,"g"),eW=RegExp(eP+"(?="+eP+")|"+e$+eU,"g"),eq=RegExp([eR+"?"+eS+"+"+eM+"(?="+[ek,eR,"$"].join("|")+")","(?:"+eR+"|"+eN+")+"+eD+"(?="+[ek,eR+eI,"$"].join("|")+")",eR+"?"+eI+"+"+eM,eR+"+"+eD,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",eV].join("|"),"g"),eG=RegExp("["+eA+ev+ey+e_+"]"),eY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eX=-1,eJ={};eJ[P]=eJ[L]=eJ[T]=eJ[O]=eJ[R]=eJ[A]=eJ[I]=eJ[M]=eJ[D]=!0,eJ[d]=eJ[f]=eJ[S]=eJ[p]=eJ[N]=eJ[h]=eJ[m]=eJ[g]=eJ[y]=eJ[x]=eJ[b]=eJ[_]=eJ[j]=eJ[C]=eJ[E]=!1;var eQ={};eQ[d]=eQ[f]=eQ[S]=eQ[N]=eQ[p]=eQ[h]=eQ[P]=eQ[L]=eQ[T]=eQ[O]=eQ[R]=eQ[y]=eQ[x]=eQ[b]=eQ[_]=eQ[j]=eQ[C]=eQ[k]=eQ[A]=eQ[I]=eQ[M]=eQ[D]=!0,eQ[m]=eQ[g]=eQ[E]=!1;var e0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e1=parseFloat,e2=parseInt,e5="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,e4="object"==typeof self&&self&&self.Object===Object&&self,e3=e5||e4||Function("return this")(),e6=t&&!t.nodeType&&t,e8=e6&&e&&!e.nodeType&&e,e7=e8&&e8.exports===e6,e9=e7&&e5.process,te=function(){try{var e=e8&&e8.require&&e8.require("util").types;if(e)return e;return e9&&e9.binding&&e9.binding("util")}catch(e){}}(),tt=te&&te.isArrayBuffer,tr=te&&te.isDate,tn=te&&te.isMap,ti=te&&te.isRegExp,to=te&&te.isSet,ta=te&&te.isTypedArray;function ts(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function tl(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function tu(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function tc(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function td(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function tf(e,t){return!!(null==e?0:e.length)&&t_(e,t,0)>-1}function tp(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function th(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function tm(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function tg(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function tv(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function ty(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var tx=tE("length");function tb(e,t,r){var n;return r(e,function(e,r,i){if(t(e,r,i))return n=r,!1}),n}function tw(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return -1}function t_(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}(e,t,r):tw(e,tC,r)}function tj(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return -1}function tC(e){return e!=e}function tk(e,t){var r=null==e?0:e.length;return r?tP(e,t)/r:u}function tE(e){return function(t){return null==t?i:t[e]}}function tS(e){return function(t){return null==e?i:e[t]}}function tN(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}function tP(e,t){for(var r,n=-1,o=e.length;++n<o;){var a=t(e[n]);i!==a&&(r=i===r?a:r+a)}return r}function tL(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function tT(e){return e?e.slice(0,tq(e)+1).replace(Q,""):e}function tO(e){return function(t){return e(t)}}function tR(e,t){return th(t,function(t){return e[t]})}function tA(e,t){return e.has(t)}function tI(e,t){for(var r=-1,n=e.length;++r<n&&t_(t,e[r],0)>-1;);return r}function tM(e,t){for(var r=e.length;r--&&t_(t,e[r],0)>-1;);return r}var tD=tS({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"}),tF=tS({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function tz(e){return"\\"+e0[e]}function tB(e){return eG.test(e)}function tU(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function tV(e,t){return function(r){return e(t(r))}}function t$(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];(a===t||a===s)&&(e[r]=s,o[i++]=r)}return o}function tH(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function tZ(e){return tB(e)?function(e){for(var t=eW.lastIndex=0;eW.test(e);)++t;return t}(e):tx(e)}function tW(e){return tB(e)?e.match(eW)||[]:e.split("")}function tq(e){for(var t=e.length;t--&&ee.test(e.charAt(t)););return t}var tG=tS({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),tY=function e(t){var r,n,ee,ev,ey=(t=null==t?e3:tY.defaults(e3.Object(),t,tY.pick(e3,eK))).Array,ex=t.Date,eb=t.Error,ew=t.Function,e_=t.Math,ej=t.Object,eC=t.RegExp,ek=t.String,eE=t.TypeError,eS=ey.prototype,eN=ew.prototype,eP=ej.prototype,eL=t["__core-js_shared__"],eT=eN.toString,eO=eP.hasOwnProperty,eR=0,eA=(r=/[^.]+$/.exec(eL&&eL.keys&&eL.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",eI=eP.toString,eM=eT.call(ej),eD=e3._,eF=eC("^"+eT.call(eO).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ez=e7?t.Buffer:i,eB=t.Symbol,eU=t.Uint8Array,eV=ez?ez.allocUnsafe:i,e$=tV(ej.getPrototypeOf,ej),eW=ej.create,eG=eP.propertyIsEnumerable,e0=eS.splice,e5=eB?eB.isConcatSpreadable:i,e4=eB?eB.iterator:i,e6=eB?eB.toStringTag:i,e8=function(){try{var e=ih(ej,"defineProperty");return e({},"",{}),e}catch(e){}}(),e9=t.clearTimeout!==e3.clearTimeout&&t.clearTimeout,te=ex&&ex.now!==e3.Date.now&&ex.now,tx=t.setTimeout!==e3.setTimeout&&t.setTimeout,tS=e_.ceil,tK=e_.floor,tX=ej.getOwnPropertySymbols,tJ=ez?ez.isBuffer:i,tQ=t.isFinite,t0=eS.join,t1=tV(ej.keys,ej),t2=e_.max,t5=e_.min,t4=ex.now,t3=t.parseInt,t6=e_.random,t8=eS.reverse,t7=ih(t,"DataView"),t9=ih(t,"Map"),re=ih(t,"Promise"),rt=ih(t,"Set"),rr=ih(t,"WeakMap"),rn=ih(ej,"create"),ri=rr&&new rr,ro={},ra=iz(t7),rs=iz(t9),rl=iz(re),ru=iz(rt),rc=iz(rr),rd=eB?eB.prototype:i,rf=rd?rd.valueOf:i,rp=rd?rd.toString:i;function rh(e){if(oW(e)&&!oI(e)&&!(e instanceof ry)){if(e instanceof rv)return e;if(eO.call(e,"__wrapped__"))return iB(e)}return new rv(e)}var rm=function(){function e(){}return function(t){if(!oZ(t))return{};if(eW)return eW(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function rg(){}function rv(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function ry(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function rx(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rb(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function r_(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new rw;++t<r;)this.add(e[t])}function rj(e){var t=this.__data__=new rb(e);this.size=t.size}function rC(e,t){var r=oI(e),n=!r&&oA(e),i=!r&&!n&&oz(e),o=!r&&!n&&!i&&o0(e),a=r||n||i||o,s=a?tL(e.length,ek):[],l=s.length;for(var u in e)(t||eO.call(e,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||iw(u,l)))&&s.push(u);return s}function rk(e){var t=e.length;return t?e[nu(0,t-1)]:i}function rE(e,t,r){(i===r||oT(e[t],r))&&(i!==r||t in e)||rT(e,t,r)}function rS(e,t,r){var n=e[t];eO.call(e,t)&&oT(n,r)&&(i!==r||t in e)||rT(e,t,r)}function rN(e,t){for(var r=e.length;r--;)if(oT(e[r][0],t))return r;return -1}function rP(e,t,r,n){return rF(e,function(e,i,o){t(n,e,r(e),o)}),n}function rL(e,t){return e&&nU(t,af(t),e)}function rT(e,t,r){"__proto__"==t&&e8?e8(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rO(e,t){for(var r=-1,n=t.length,o=ey(n),a=null==e;++r<n;)o[r]=a?i:as(e,t[r]);return o}function rR(e,t,r){return e==e&&(i!==r&&(e=e<=r?e:r),i!==t&&(e=e>=t?e:t)),e}function rA(e,t,r,n,o,a){var s,l=1&t,u=2&t,c=4&t;if(r&&(s=o?r(e,n,o,a):r(e)),i!==s)return s;if(!oZ(e))return e;var f=oI(e);if(f){if(m=e.length,w=new e.constructor(m),m&&"string"==typeof e[0]&&eO.call(e,"index")&&(w.index=e.index,w.input=e.input),s=w,!l)return nB(e,s)}else{var m,w,E,F,z,B=iv(e),U=B==g||B==v;if(oz(e))return nA(e,l);if(B==b||B==d||U&&!o){if(s=u||U?{}:ix(e),!l)return u?(E=(z=s)&&nU(e,ap(e),z),nU(e,ig(e),E)):(F=rL(s,e),nU(e,im(e),F))}else{if(!eQ[B])return o?e:{};s=function(e,t,r){var n,i,o=e.constructor;switch(t){case S:return nI(e);case p:case h:return new o(+e);case N:return n=r?nI(e.buffer):e.buffer,new e.constructor(n,e.byteOffset,e.byteLength);case P:case L:case T:case O:case R:case A:case I:case M:case D:return nM(e,r);case y:return new o;case x:case C:return new o(e);case _:return(i=new e.constructor(e.source,el.exec(e))).lastIndex=e.lastIndex,i;case j:return new o;case k:return rf?ej(rf.call(e)):{}}}(e,B,l)}}a||(a=new rj);var V=a.get(e);if(V)return V;a.set(e,s),oX(e)?e.forEach(function(n){s.add(rA(n,t,r,n,e,a))}):oq(e)&&e.forEach(function(n,i){s.set(i,rA(n,t,r,i,e,a))});var $=c?u?ia:io:u?ap:af,H=f?i:$(e);return tu(H||e,function(n,i){H&&(n=e[i=n]),rS(s,i,rA(n,t,r,i,e,a))}),s}function rI(e,t,r){var n=r.length;if(null==e)return!n;for(e=ej(e);n--;){var o=r[n],a=t[o],s=e[o];if(i===s&&!(o in e)||!a(s))return!1}return!0}function rM(e,t,r){if("function"!=typeof e)throw new eE(o);return iO(function(){e.apply(i,r)},t)}function rD(e,t,r,n){var i=-1,o=tf,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=th(t,tO(r))),n?(o=tp,a=!1):t.length>=200&&(o=tA,a=!1,t=new r_(t));t:for(;++i<s;){var c=e[i],d=null==r?c:r(c);if(c=n||0!==c?c:0,a&&d==d){for(var f=u;f--;)if(t[f]===d)continue t;l.push(c)}else o(t,d,n)||l.push(c)}return l}rh.templateSettings={escape:Z,evaluate:W,interpolate:q,variable:"",imports:{_:rh}},rh.prototype=rg.prototype,rh.prototype.constructor=rh,rv.prototype=rm(rg.prototype),rv.prototype.constructor=rv,ry.prototype=rm(rg.prototype),ry.prototype.constructor=ry,rx.prototype.clear=function(){this.__data__=rn?rn(null):{},this.size=0},rx.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},rx.prototype.get=function(e){var t=this.__data__;if(rn){var r=t[e];return r===a?i:r}return eO.call(t,e)?t[e]:i},rx.prototype.has=function(e){var t=this.__data__;return rn?i!==t[e]:eO.call(t,e)},rx.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=rn&&i===t?a:t,this},rb.prototype.clear=function(){this.__data__=[],this.size=0},rb.prototype.delete=function(e){var t=this.__data__,r=rN(t,e);return!(r<0)&&(r==t.length-1?t.pop():e0.call(t,r,1),--this.size,!0)},rb.prototype.get=function(e){var t=this.__data__,r=rN(t,e);return r<0?i:t[r][1]},rb.prototype.has=function(e){return rN(this.__data__,e)>-1},rb.prototype.set=function(e,t){var r=this.__data__,n=rN(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},rw.prototype.clear=function(){this.size=0,this.__data__={hash:new rx,map:new(t9||rb),string:new rx}},rw.prototype.delete=function(e){var t=id(this,e).delete(e);return this.size-=t?1:0,t},rw.prototype.get=function(e){return id(this,e).get(e)},rw.prototype.has=function(e){return id(this,e).has(e)},rw.prototype.set=function(e,t){var r=id(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},r_.prototype.add=r_.prototype.push=function(e){return this.__data__.set(e,a),this},r_.prototype.has=function(e){return this.__data__.has(e)},rj.prototype.clear=function(){this.__data__=new rb,this.size=0},rj.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},rj.prototype.get=function(e){return this.__data__.get(e)},rj.prototype.has=function(e){return this.__data__.has(e)},rj.prototype.set=function(e,t){var r=this.__data__;if(r instanceof rb){var n=r.__data__;if(!t9||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new rw(n)}return r.set(e,t),this.size=r.size,this};var rF=nH(rW),rz=nH(rq,!0);function rB(e,t){var r=!0;return rF(e,function(e,n,i){return r=!!t(e,n,i)}),r}function rU(e,t,r){for(var n=-1,o=e.length;++n<o;){var a=e[n],s=t(a);if(null!=s&&(i===l?s==s&&!oQ(s):r(s,l)))var l=s,u=a}return u}function rV(e,t){var r=[];return rF(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function r$(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=ib),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?r$(s,t-1,r,n,i):tm(i,s):n||(i[i.length]=s)}return i}var rH=nZ(),rZ=nZ(!0);function rW(e,t){return e&&rH(e,t,af)}function rq(e,t){return e&&rZ(e,t,af)}function rG(e,t){return td(t,function(t){return oV(e[t])})}function rY(e,t){t=nT(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[iF(t[r++])];return r&&r==n?e:i}function rK(e,t,r){var n=t(e);return oI(e)?n:tm(n,r(e))}function rX(e){return null==e?i===e?"[object Undefined]":"[object Null]":e6&&e6 in ej(e)?function(e){var t=eO.call(e,e6),r=e[e6];try{e[e6]=i;var n=!0}catch(e){}var o=eI.call(e);return n&&(t?e[e6]=r:delete e[e6]),o}(e):eI.call(e)}function rJ(e,t){return e>t}function rQ(e,t){return null!=e&&eO.call(e,t)}function r0(e,t){return null!=e&&t in ej(e)}function r1(e,t,r){for(var n=r?tp:tf,o=e[0].length,a=e.length,s=a,l=ey(a),u=1/0,c=[];s--;){var d=e[s];s&&t&&(d=th(d,tO(t))),u=t5(d.length,u),l[s]=!r&&(t||o>=120&&d.length>=120)?new r_(s&&d):i}d=e[0];var f=-1,p=l[0];t:for(;++f<o&&c.length<u;){var h=d[f],m=t?t(h):h;if(h=r||0!==h?h:0,!(p?tA(p,m):n(c,m,r))){for(s=a;--s;){var g=l[s];if(!(g?tA(g,m):n(e[s],m,r)))continue t}p&&p.push(m),c.push(h)}}return c}function r2(e,t,r){t=nT(t,e);var n=null==(e=iP(e,t))?e:e[iF(iX(t))];return null==n?i:ts(n,e,r)}function r5(e){return oW(e)&&rX(e)==d}function r4(e,t,r,n,o){return e===t||(null!=e&&null!=t&&(oW(e)||oW(t))?function(e,t,r,n,o,a){var s=oI(e),l=oI(t),u=s?f:iv(e),c=l?f:iv(t);u=u==d?b:u,c=c==d?b:c;var g=u==b,v=c==b,w=u==c;if(w&&oz(e)){if(!oz(t))return!1;s=!0,g=!1}if(w&&!g)return a||(a=new rj),s||o0(e)?ir(e,t,r,n,o,a):function(e,t,r,n,i,o,a){switch(r){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case S:if(e.byteLength!=t.byteLength||!o(new eU(e),new eU(t)))break;return!0;case p:case h:case x:return oT(+e,+t);case m:return e.name==t.name&&e.message==t.message;case _:case C:return e==t+"";case y:var s=tU;case j:var l=1&n;if(s||(s=tH),e.size!=t.size&&!l)break;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var c=ir(s(e),s(t),n,i,o,a);return a.delete(e),c;case k:if(rf)return rf.call(e)==rf.call(t)}return!1}(e,t,u,r,n,o,a);if(!(1&r)){var E=g&&eO.call(e,"__wrapped__"),P=v&&eO.call(t,"__wrapped__");if(E||P){var L=E?e.value():e,T=P?t.value():t;return a||(a=new rj),o(L,T,r,n,a)}}return!!w&&(a||(a=new rj),function(e,t,r,n,o,a){var s=1&r,l=io(e),u=l.length;if(u!=io(t).length&&!s)return!1;for(var c=u;c--;){var d=l[c];if(!(s?d in t:eO.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var m=s;++c<u;){var g=e[d=l[c]],v=t[d];if(n)var y=s?n(v,g,d,t,e,a):n(g,v,d,e,t,a);if(!(i===y?g===v||o(g,v,r,n,a):y)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var x=e.constructor,b=t.constructor;x!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof b&&b instanceof b)&&(h=!1)}return a.delete(e),a.delete(t),h}(e,t,r,n,o,a))}(e,t,r,n,r4,o):e!=e&&t!=t)}function r3(e,t,r,n){var o=r.length,a=o,s=!n;if(null==e)return!a;for(e=ej(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var u=(l=r[o])[0],c=e[u],d=l[1];if(s&&l[2]){if(i===c&&!(u in e))return!1}else{var f=new rj;if(n)var p=n(c,d,u,e,t,f);if(!(i===p?r4(d,c,3,n,f):p))return!1}}return!0}function r6(e){return!(!oZ(e)||eA&&eA in e)&&(oV(e)?eF:ed).test(iz(e))}function r8(e){return"function"==typeof e?e:null==e?aF:"object"==typeof e?oI(e)?nr(e[0],e[1]):nt(e):aq(e)}function r7(e){if(!iE(e))return t1(e);var t=[];for(var r in ej(e))eO.call(e,r)&&"constructor"!=r&&t.push(r);return t}function r9(e,t){return e<t}function ne(e,t){var r=-1,n=oD(e)?ey(e.length):[];return rF(e,function(e,i,o){n[++r]=t(e,i,o)}),n}function nt(e){var t=ip(e);return 1==t.length&&t[0][2]?iS(t[0][0],t[0][1]):function(r){return r===e||r3(r,e,t)}}function nr(e,t){var r;return ij(e)&&(r=t)==r&&!oZ(r)?iS(iF(e),t):function(r){var n=as(r,e);return i===n&&n===t?al(r,e):r4(t,n,3)}}function nn(e,t,r,n,o){e!==t&&rH(t,function(a,s){if(o||(o=new rj),oZ(a))(function(e,t,r,n,o,a,s){var l=iL(e,r),u=iL(t,r),c=s.get(u);if(c){rE(e,r,c);return}var d=a?a(l,u,r+"",e,t,s):i,f=i===d;if(f){var p=oI(u),h=!p&&oz(u),m=!p&&!h&&o0(u);d=u,p||h||m?oI(l)?d=l:oF(l)?d=nB(l):h?(f=!1,d=nA(u,!0)):m?(f=!1,d=nM(u,!0)):d=[]:oY(u)||oA(u)?(d=l,oA(l)?d=o7(l):(!oZ(l)||oV(l))&&(d=ix(u))):f=!1}f&&(s.set(u,d),o(d,u,n,a,s),s.delete(u)),rE(e,r,d)})(e,t,s,r,nn,n,o);else{var l=n?n(iL(e,s),a,s+"",e,t,o):i;i===l&&(l=a),rE(e,s,l)}},ap)}function ni(e,t){var r=e.length;if(r)return iw(t+=t<0?r:0,r)?e[t]:i}function no(e,t,r){t=t.length?th(t,function(e){return oI(e)?function(t){return rY(t,1===e.length?e[0]:e)}:e}):[aF];var n=-1;return t=th(t,tO(ic())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(ne(e,function(e,r,i){return{criteria:th(t,function(t){return t(e)}),index:++n,value:e}}),function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var l=nD(i[n],o[n]);if(l){if(n>=s)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)})}function na(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=rY(e,a);r(s,a)&&nf(o,nT(a,e),s)}return o}function ns(e,t,r,n){var i=n?tj:t_,o=-1,a=t.length,s=e;for(e===t&&(t=nB(t)),r&&(s=th(e,tO(r)));++o<a;)for(var l=0,u=t[o],c=r?r(u):u;(l=i(s,c,l,n))>-1;)s!==e&&e0.call(s,l,1),e0.call(e,l,1);return e}function nl(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;iw(i)?e0.call(e,i,1):nj(e,i)}}return e}function nu(e,t){return e+tK(t6()*(t-e+1))}function nc(e,t){var r="";if(!e||t<1||t>9007199254740991)return r;do t%2&&(r+=e),(t=tK(t/2))&&(e+=e);while(t);return r}function nd(e,t){return iR(iN(e,t,aF),e+"")}function nf(e,t,r,n){if(!oZ(e))return e;t=nT(t,e);for(var o=-1,a=t.length,s=a-1,l=e;null!=l&&++o<a;){var u=iF(t[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)break;if(o!=s){var d=l[u];c=n?n(d,u,l):i,i===c&&(c=oZ(d)?d:iw(t[o+1])?[]:{})}rS(l,u,c),l=l[u]}return e}var np=ri?function(e,t){return ri.set(e,t),e}:aF,nh=e8?function(e,t){return e8(e,"toString",{configurable:!0,enumerable:!1,value:aI(t),writable:!0})}:aF;function nm(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=ey(i);++n<i;)o[n]=e[n+t];return o}function ng(e,t){var r;return rF(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function nv(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!oQ(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return ny(e,t,aF,r)}function ny(e,t,r,n){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,u=oQ(t),c=i===t;o<a;){var d=tK((o+a)/2),f=r(e[d]),p=i!==f,h=null===f,m=f==f,g=oQ(f);if(s)var v=n||m;else v=c?m&&(n||p):l?m&&p&&(n||!h):u?m&&p&&!h&&(n||!g):!h&&!g&&(n?f<=t:f<t);v?o=d+1:a=d}return t5(a,4294967294)}function nx(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!oT(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function nb(e){return"number"==typeof e?e:oQ(e)?u:+e}function nw(e){if("string"==typeof e)return e;if(oI(e))return th(e,nw)+"";if(oQ(e))return rp?rp.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}function n_(e,t,r){var n=-1,i=tf,o=e.length,a=!0,s=[],l=s;if(r)a=!1,i=tp;else if(o>=200){var u=t?null:n6(e);if(u)return tH(u);a=!1,i=tA,l=new r_}else l=t?[]:s;t:for(;++n<o;){var c=e[n],d=t?t(c):c;if(c=r||0!==c?c:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue t;t&&l.push(d),s.push(c)}else i(l,d,r)||(l!==s&&l.push(d),s.push(c))}return s}function nj(e,t){return t=nT(t,e),null==(e=iP(e,t))||delete e[iF(iX(t))]}function nC(e,t,r,n){return nf(e,t,r(rY(e,t)),n)}function nk(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?nm(e,n?0:o,n?o+1:i):nm(e,n?o+1:0,n?i:o)}function nE(e,t){var r=e;return r instanceof ry&&(r=r.value()),tg(t,function(e,t){return t.func.apply(t.thisArg,tm([e],t.args))},r)}function nS(e,t,r){var n=e.length;if(n<2)return n?n_(e[0]):[];for(var i=-1,o=ey(n);++i<n;)for(var a=e[i],s=-1;++s<n;)s!=i&&(o[i]=rD(o[i]||a,e[s],t,r));return n_(r$(o,1),t,r)}function nN(e,t,r){for(var n=-1,o=e.length,a=t.length,s={};++n<o;){var l=n<a?t[n]:i;r(s,e[n],l)}return s}function nP(e){return oF(e)?e:[]}function nL(e){return"function"==typeof e?e:aF}function nT(e,t){return oI(e)?e:ij(e,t)?[e]:iD(o9(e))}function nO(e,t,r){var n=e.length;return r=i===r?n:r,!t&&r>=n?e:nm(e,t,r)}var nR=e9||function(e){return e3.clearTimeout(e)};function nA(e,t){if(t)return e.slice();var r=e.length,n=eV?eV(r):new e.constructor(r);return e.copy(n),n}function nI(e){var t=new e.constructor(e.byteLength);return new eU(t).set(new eU(e)),t}function nM(e,t){var r=t?nI(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function nD(e,t){if(e!==t){var r=i!==e,n=null===e,o=e==e,a=oQ(e),s=i!==t,l=null===t,u=t==t,c=oQ(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||n&&s&&u||!r&&u||!o)return 1;if(!n&&!a&&!c&&e<t||c&&r&&o&&!n&&!a||l&&r&&o||!s&&o||!u)return -1}return 0}function nF(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,l=t.length,u=t2(o-a,0),c=ey(l+u),d=!n;++s<l;)c[s]=t[s];for(;++i<a;)(d||i<o)&&(c[r[i]]=e[i]);for(;u--;)c[s++]=e[i++];return c}function nz(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,l=-1,u=t.length,c=t2(o-s,0),d=ey(c+u),f=!n;++i<c;)d[i]=e[i];for(var p=i;++l<u;)d[p+l]=t[l];for(;++a<s;)(f||i<o)&&(d[p+r[a]]=e[i++]);return d}function nB(e,t){var r=-1,n=e.length;for(t||(t=ey(n));++r<n;)t[r]=e[r];return t}function nU(e,t,r,n){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=n?n(r[l],e[l],l,r,e):i;i===u&&(u=e[l]),o?rT(r,l,u):rS(r,l,u)}return r}function nV(e,t){return function(r,n){var i=oI(r)?tl:rP,o=t?t():{};return i(r,e,ic(n,2),o)}}function n$(e){return nd(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,s=o>2?r[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&i_(r[0],r[1],s)&&(a=o<3?i:a,o=1),t=ej(t);++n<o;){var l=r[n];l&&e(t,l,n,a)}return t})}function nH(e,t){return function(r,n){if(null==r)return r;if(!oD(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=ej(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function nZ(e){return function(t,r,n){for(var i=-1,o=ej(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}function nW(e){return function(t){var r=tB(t=o9(t))?tW(t):i,n=r?r[0]:t.charAt(0),o=r?nO(r,1).join(""):t.slice(1);return n[e]()+o}}function nq(e){return function(t){return tg(aO(aC(t).replace(eH,"")),e,"")}}function nG(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=rm(e.prototype),n=e.apply(r,t);return oZ(n)?n:r}}function nY(e){return function(t,r,n){var o=ej(t);if(!oD(t)){var a=ic(r,3);t=af(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,n);return s>-1?o[a?t[s]:s]:i}}function nK(e){return ii(function(t){var r=t.length,n=r,a=rv.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new eE(o);if(a&&!l&&"wrapper"==il(s))var l=new rv([],!0)}for(n=l?n:r;++n<r;){var u=il(s=t[n]),c="wrapper"==u?is(s):i;l=c&&iC(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[il(c[0])].apply(l,c[3]):1==s.length&&iC(s)?l[u]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&oI(n))return l.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}})}function nX(e,t,r,n,o,a,s,l,u,c){var d=128&t,f=1&t,p=2&t,h=24&t,m=512&t,g=p?i:nG(e);return function v(){for(var y=arguments.length,x=ey(y),b=y;b--;)x[b]=arguments[b];if(h)var w=iu(v),_=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(x,w);if(n&&(x=nF(x,n,o,h)),a&&(x=nz(x,a,s,h)),y-=_,h&&y<c){var j=t$(x,w);return n4(e,t,nX,v.placeholder,r,x,j,l,u,c-y)}var C=f?r:this,k=p?C[e]:e;return y=x.length,l?x=function(e,t){for(var r=e.length,n=t5(t.length,r),o=nB(e);n--;){var a=t[n];e[n]=iw(a,r)?o[a]:i}return e}(x,l):m&&y>1&&x.reverse(),d&&u<y&&(x.length=u),this&&this!==e3&&this instanceof v&&(k=g||nG(k)),k.apply(C,x)}}function nJ(e,t){return function(r,n){var i,o;return i=t(n),o={},rW(r,function(t,r,n){e(o,i(t),r,n)}),o}}function nQ(e,t){return function(r,n){var o;if(i===r&&i===n)return t;if(i!==r&&(o=r),i!==n){if(i===o)return n;"string"==typeof r||"string"==typeof n?(r=nw(r),n=nw(n)):(r=nb(r),n=nb(n)),o=e(r,n)}return o}}function n0(e){return ii(function(t){return t=th(t,tO(ic())),nd(function(r){var n=this;return e(t,function(e){return ts(e,n,r)})})})}function n1(e,t){var r=(t=i===t?" ":nw(t)).length;if(r<2)return r?nc(t,e):t;var n=nc(t,tS(e/tZ(t)));return tB(t)?nO(tW(n),0,e).join(""):n.slice(0,e)}function n2(e){return function(t,r,n){return n&&"number"!=typeof n&&i_(t,r,n)&&(r=n=i),t=o4(t),i===r?(r=t,t=0):r=o4(r),n=i===n?t<r?1:-1:o4(n),function(e,t,r,n){for(var i=-1,o=t2(tS((t-e)/(r||1)),0),a=ey(o);o--;)a[n?o:++i]=e,e+=r;return a}(t,r,n,e)}}function n5(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=o8(t),r=o8(r)),e(t,r)}}function n4(e,t,r,n,o,a,s,l,u,c){var d=8&t,f=d?s:i,p=d?i:s,h=d?a:i,m=d?i:a;t|=d?32:64,4&(t&=~(d?64:32))||(t&=-4);var g=[e,t,o,h,f,m,p,l,u,c],v=r.apply(i,g);return iC(e)&&iT(v,g),v.placeholder=n,iA(v,e,t)}function n3(e){var t=e_[e];return function(e,r){if(e=o8(e),(r=null==r?0:t5(o3(r),292))&&tQ(e)){var n=(o9(e)+"e").split("e");return+((n=(o9(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var n6=rt&&1/tH(new rt([,-0]))[1]==l?function(e){return new rt(e)}:a$;function n8(e){return function(t){var r,n,i=iv(t);return i==y?tU(t):i==j?(r=-1,n=Array(t.size),t.forEach(function(e){n[++r]=[e,e]}),n):th(e(t),function(e){return[e,t[e]]})}}function n7(e,t,r,n,a,l,u,c){var d=2&t;if(!d&&"function"!=typeof e)throw new eE(o);var f=n?n.length:0;if(f||(t&=-97,n=a=i),u=i===u?u:t2(o3(u),0),c=i===c?c:o3(c),f-=a?a.length:0,64&t){var p=n,h=a;n=a=i}var m=d?i:is(e),g=[e,t,r,n,a,p,h,l,u,c];if(m&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=128==n&&8==r||128==n&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(o||a){1&n&&(e[2]=t[2],i|=1&r?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?nF(u,l,t[4]):l,e[4]=u?t$(e[3],s):t[4]}(l=t[5])&&(u=e[5],e[5]=u?nz(u,l,t[6]):l,e[6]=u?t$(e[5],s):t[6]),(l=t[7])&&(e[7]=l),128&n&&(e[8]=null==e[8]?t[8]:t5(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}}(g,m),e=g[0],t=g[1],r=g[2],n=g[3],a=g[4],(c=g[9]=i===g[9]?d?0:e.length:t2(g[9]-f,0))||!(24&t)||(t&=-25),t&&1!=t)8==t||16==t?(v=e,y=t,x=c,b=nG(v),O=function e(){for(var t=arguments.length,r=ey(t),n=t,o=iu(e);n--;)r[n]=arguments[n];var a=t<3&&r[0]!==o&&r[t-1]!==o?[]:t$(r,o);return(t-=a.length)<x?n4(v,y,nX,e.placeholder,i,r,a,i,i,x-t):ts(this&&this!==e3&&this instanceof e?b:v,this,r)}):32!=t&&33!=t||a.length?O=nX.apply(i,g):(w=e,_=t,j=r,C=n,k=1&_,E=nG(w),O=function e(){for(var t=-1,r=arguments.length,n=-1,i=C.length,o=ey(i+r),a=this&&this!==e3&&this instanceof e?E:w;++n<i;)o[n]=C[n];for(;r--;)o[n++]=arguments[++t];return ts(a,k?j:this,o)});else var v,y,x,b,w,_,j,C,k,E,S,N,P,L,T,O=(S=e,N=t,P=r,L=1&N,T=nG(S),function e(){return(this&&this!==e3&&this instanceof e?T:S).apply(L?P:this,arguments)});return iA((m?np:iT)(O,g),e,t)}function n9(e,t,r,n){return i===e||oT(e,eP[r])&&!eO.call(n,r)?t:e}function ie(e,t,r,n,o,a){return oZ(e)&&oZ(t)&&(a.set(t,e),nn(e,t,i,ie,a),a.delete(t)),e}function it(e){return oY(e)?i:e}function ir(e,t,r,n,o,a){var s=1&r,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,h=2&r?new r_:i;for(a.set(e,t),a.set(t,e);++f<l;){var m=e[f],g=t[f];if(n)var v=s?n(g,m,f,t,e,a):n(m,g,f,e,t,a);if(i!==v){if(v)continue;p=!1;break}if(h){if(!ty(t,function(e,t){if(!tA(h,t)&&(m===e||o(m,e,r,n,a)))return h.push(t)})){p=!1;break}}else if(!(m===g||o(m,g,r,n,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function ii(e){return iR(iN(e,i,iW),e+"")}function io(e){return rK(e,af,im)}function ia(e){return rK(e,ap,ig)}var is=ri?function(e){return ri.get(e)}:a$;function il(e){for(var t=e.name+"",r=ro[t],n=eO.call(ro,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function iu(e){return(eO.call(rh,"placeholder")?rh:e).placeholder}function ic(){var e=rh.iteratee||az;return e=e===az?r8:e,arguments.length?e(arguments[0],arguments[1]):e}function id(e,t){var r,n=e.__data__;return("string"==(r=typeof t)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function ip(e){for(var t=af(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,i==i&&!oZ(i)]}return t}function ih(e,t){var r=null==e?i:e[t];return r6(r)?r:i}var im=tX?function(e){return null==e?[]:td(tX(e=ej(e)),function(t){return eG.call(e,t)})}:aK,ig=tX?function(e){for(var t=[];e;)tm(t,im(e)),e=e$(e);return t}:aK,iv=rX;function iy(e,t,r){t=nT(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=iF(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&oH(i)&&iw(a,i)&&(oI(e)||oA(e))}function ix(e){return"function"!=typeof e.constructor||iE(e)?{}:rm(e$(e))}function ib(e){return oI(e)||oA(e)||!!(e5&&e&&e[e5])}function iw(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ep.test(e))&&e>-1&&e%1==0&&e<t}function i_(e,t,r){if(!oZ(r))return!1;var n=typeof t;return("number"==n?!!(oD(r)&&iw(t,r.length)):"string"==n&&t in r)&&oT(r[t],e)}function ij(e,t){if(oI(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||oQ(e))||Y.test(e)||!G.test(e)||null!=t&&e in ej(t)}function iC(e){var t=il(e),r=rh[t];if("function"!=typeof r||!(t in ry.prototype))return!1;if(e===r)return!0;var n=is(r);return!!n&&e===n[0]}(t7&&iv(new t7(new ArrayBuffer(1)))!=N||t9&&iv(new t9)!=y||re&&iv(re.resolve())!=w||rt&&iv(new rt)!=j||rr&&iv(new rr)!=E)&&(iv=function(e){var t=rX(e),r=t==b?e.constructor:i,n=r?iz(r):"";if(n)switch(n){case ra:return N;case rs:return y;case rl:return w;case ru:return j;case rc:return E}return t});var ik=eL?oV:aX;function iE(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eP)}function iS(e,t){return function(r){return null!=r&&r[e]===t&&(i!==t||e in ej(r))}}function iN(e,t,r){return t=t2(i===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=t2(n.length-t,0),a=ey(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=ey(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),ts(e,this,s)}}function iP(e,t){return t.length<2?e:rY(e,nm(t,0,-1))}function iL(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var iT=iI(np),iO=tx||function(e,t){return e3.setTimeout(e,t)},iR=iI(nh);function iA(e,t,r){var n,i,o=t+"";return iR(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(et,"{\n/* [wrapped with "+t+"] */\n")}(o,(n=(i=o.match(er))?i[1].split(en):[],tu(c,function(e){var t="_."+e[0];r&e[1]&&!tf(n,t)&&n.push(t)}),n.sort())))}function iI(e){var t=0,r=0;return function(){var n=t4(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function iM(e,t){var r=-1,n=e.length,o=n-1;for(t=i===t?n:t;++r<t;){var a=nu(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var iD=(ee=(n=ok(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(K,function(e,r,n,i){t.push(n?i.replace(ea,"$1"):r||e)}),t},function(e){return 500===ee.size&&ee.clear(),e})).cache,n);function iF(e){if("string"==typeof e||oQ(e))return e;var t=e+"";return"0"==t&&1/e==-l?"-0":t}function iz(e){if(null!=e){try{return eT.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function iB(e){if(e instanceof ry)return e.clone();var t=new rv(e.__wrapped__,e.__chain__);return t.__actions__=nB(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var iU=nd(function(e,t){return oF(e)?rD(e,r$(t,1,oF,!0)):[]}),iV=nd(function(e,t){var r=iX(t);return oF(r)&&(r=i),oF(e)?rD(e,r$(t,1,oF,!0),ic(r,2)):[]}),i$=nd(function(e,t){var r=iX(t);return oF(r)&&(r=i),oF(e)?rD(e,r$(t,1,oF,!0),i,r):[]});function iH(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var i=null==r?0:o3(r);return i<0&&(i=t2(n+i,0)),tw(e,ic(t,3),i)}function iZ(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=n-1;return i!==r&&(o=o3(r),o=r<0?t2(n+o,0):t5(o,n-1)),tw(e,ic(t,3),o,!0)}function iW(e){return(null==e?0:e.length)?r$(e,1):[]}function iq(e){return e&&e.length?e[0]:i}var iG=nd(function(e){var t=th(e,nP);return t.length&&t[0]===e[0]?r1(t):[]}),iY=nd(function(e){var t=iX(e),r=th(e,nP);return t===iX(r)?t=i:r.pop(),r.length&&r[0]===e[0]?r1(r,ic(t,2)):[]}),iK=nd(function(e){var t=iX(e),r=th(e,nP);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?r1(r,i,t):[]});function iX(e){var t=null==e?0:e.length;return t?e[t-1]:i}var iJ=nd(iQ);function iQ(e,t){return e&&e.length&&t&&t.length?ns(e,t):e}var i0=ii(function(e,t){var r=null==e?0:e.length,n=rO(e,t);return nl(e,th(t,function(e){return iw(e,r)?+e:e}).sort(nD)),n});function i1(e){return null==e?e:t8.call(e)}var i2=nd(function(e){return n_(r$(e,1,oF,!0))}),i5=nd(function(e){var t=iX(e);return oF(t)&&(t=i),n_(r$(e,1,oF,!0),ic(t,2))}),i4=nd(function(e){var t=iX(e);return t="function"==typeof t?t:i,n_(r$(e,1,oF,!0),i,t)});function i3(e){if(!(e&&e.length))return[];var t=0;return e=td(e,function(e){if(oF(e))return t=t2(e.length,t),!0}),tL(t,function(t){return th(e,tE(t))})}function i6(e,t){if(!(e&&e.length))return[];var r=i3(e);return null==t?r:th(r,function(e){return ts(t,i,e)})}var i8=nd(function(e,t){return oF(e)?rD(e,t):[]}),i7=nd(function(e){return nS(td(e,oF))}),i9=nd(function(e){var t=iX(e);return oF(t)&&(t=i),nS(td(e,oF),ic(t,2))}),oe=nd(function(e){var t=iX(e);return t="function"==typeof t?t:i,nS(td(e,oF),i,t)}),ot=nd(i3),or=nd(function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,i6(e,r)});function on(e){var t=rh(e);return t.__chain__=!0,t}function oi(e,t){return t(e)}var oo=ii(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return rO(t,e)};return!(t>1)&&!this.__actions__.length&&n instanceof ry&&iw(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:oi,args:[o],thisArg:i}),new rv(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)}),oa=nV(function(e,t,r){eO.call(e,r)?++e[r]:rT(e,r,1)}),os=nY(iH),ol=nY(iZ);function ou(e,t){return(oI(e)?tu:rF)(e,ic(t,3))}function oc(e,t){return(oI(e)?function(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}:rz)(e,ic(t,3))}var od=nV(function(e,t,r){eO.call(e,r)?e[r].push(t):rT(e,r,[t])}),of=nd(function(e,t,r){var n=-1,i="function"==typeof t,o=oD(e)?ey(e.length):[];return rF(e,function(e){o[++n]=i?ts(t,e,r):r2(e,t,r)}),o}),op=nV(function(e,t,r){rT(e,r,t)});function oh(e,t){return(oI(e)?th:ne)(e,ic(t,3))}var om=nV(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),og=nd(function(e,t){if(null==e)return[];var r=t.length;return r>1&&i_(e,t[0],t[1])?t=[]:r>2&&i_(t[0],t[1],t[2])&&(t=[t[0]]),no(e,r$(t,1),[])}),ov=te||function(){return e3.Date.now()};function oy(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,n7(e,128,i,i,i,i,t)}function ox(e,t){var r;if("function"!=typeof t)throw new eE(o);return e=o3(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var ob=nd(function(e,t,r){var n=1;if(r.length){var i=t$(r,iu(ob));n|=32}return n7(e,n,t,r,i)}),ow=nd(function(e,t,r){var n=3;if(r.length){var i=t$(r,iu(ow));n|=32}return n7(t,n,e,r,i)});function o_(e,t,r){var n,a,s,l,u,c,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new eE(o);function m(t){var r=n,o=a;return n=a=i,d=t,l=e.apply(o,r)}function g(e){var r=e-c,n=e-d;return i===c||r>=t||r<0||p&&n>=s}function v(){var e,r,n,i=ov();if(g(i))return y(i);u=iO(v,(e=i-c,r=i-d,n=t-e,p?t5(n,s-r):n))}function y(e){return(u=i,h&&n)?m(e):(n=a=i,l)}function x(){var e,r=ov(),o=g(r);if(n=arguments,a=this,c=r,o){if(i===u)return d=e=c,u=iO(v,t),f?m(e):l;if(p)return nR(u),u=iO(v,t),m(c)}return i===u&&(u=iO(v,t)),l}return t=o8(t)||0,oZ(r)&&(f=!!r.leading,s=(p="maxWait"in r)?t2(o8(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h),x.cancel=function(){i!==u&&nR(u),d=0,n=c=a=u=i},x.flush=function(){return i===u?l:y(ov())},x}var oj=nd(function(e,t){return rM(e,1,t)}),oC=nd(function(e,t,r){return rM(e,o8(t)||0,r)});function ok(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new eE(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(ok.Cache||rw),r}function oE(e){if("function"!=typeof e)throw new eE(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ok.Cache=rw;var oS=nd(function(e,t){var r=(t=1==t.length&&oI(t[0])?th(t[0],tO(ic())):th(r$(t,1),tO(ic()))).length;return nd(function(n){for(var i=-1,o=t5(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return ts(e,this,n)})}),oN=nd(function(e,t){var r=t$(t,iu(oN));return n7(e,32,i,t,r)}),oP=nd(function(e,t){var r=t$(t,iu(oP));return n7(e,64,i,t,r)}),oL=ii(function(e,t){return n7(e,256,i,i,i,t)});function oT(e,t){return e===t||e!=e&&t!=t}var oO=n5(rJ),oR=n5(function(e,t){return e>=t}),oA=r5(function(){return arguments}())?r5:function(e){return oW(e)&&eO.call(e,"callee")&&!eG.call(e,"callee")},oI=ey.isArray,oM=tt?tO(tt):function(e){return oW(e)&&rX(e)==S};function oD(e){return null!=e&&oH(e.length)&&!oV(e)}function oF(e){return oW(e)&&oD(e)}var oz=tJ||aX,oB=tr?tO(tr):function(e){return oW(e)&&rX(e)==h};function oU(e){if(!oW(e))return!1;var t=rX(e);return t==m||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oY(e)}function oV(e){if(!oZ(e))return!1;var t=rX(e);return t==g||t==v||"[object AsyncFunction]"==t||"[object Proxy]"==t}function o$(e){return"number"==typeof e&&e==o3(e)}function oH(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function oZ(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function oW(e){return null!=e&&"object"==typeof e}var oq=tn?tO(tn):function(e){return oW(e)&&iv(e)==y};function oG(e){return"number"==typeof e||oW(e)&&rX(e)==x}function oY(e){if(!oW(e)||rX(e)!=b)return!1;var t=e$(e);if(null===t)return!0;var r=eO.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&eT.call(r)==eM}var oK=ti?tO(ti):function(e){return oW(e)&&rX(e)==_},oX=to?tO(to):function(e){return oW(e)&&iv(e)==j};function oJ(e){return"string"==typeof e||!oI(e)&&oW(e)&&rX(e)==C}function oQ(e){return"symbol"==typeof e||oW(e)&&rX(e)==k}var o0=ta?tO(ta):function(e){return oW(e)&&oH(e.length)&&!!eJ[rX(e)]},o1=n5(r9),o2=n5(function(e,t){return e<=t});function o5(e){if(!e)return[];if(oD(e))return oJ(e)?tW(e):nB(e);if(e4&&e[e4])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[e4]());var t=iv(e);return(t==y?tU:t==j?tH:aw)(e)}function o4(e){return e?(e=o8(e))===l||e===-l?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function o3(e){var t=o4(e),r=t%1;return t==t?r?t-r:t:0}function o6(e){return e?rR(o3(e),0,4294967295):0}function o8(e){if("number"==typeof e)return e;if(oQ(e))return u;if(oZ(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=oZ(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tT(e);var r=ec.test(e);return r||ef.test(e)?e2(e.slice(2),r?2:8):eu.test(e)?u:+e}function o7(e){return nU(e,ap(e))}function o9(e){return null==e?"":nw(e)}var ae=n$(function(e,t){if(iE(t)||oD(t)){nU(t,af(t),e);return}for(var r in t)eO.call(t,r)&&rS(e,r,t[r])}),at=n$(function(e,t){nU(t,ap(t),e)}),ar=n$(function(e,t,r,n){nU(t,ap(t),e,n)}),an=n$(function(e,t,r,n){nU(t,af(t),e,n)}),ai=ii(rO),ao=nd(function(e,t){e=ej(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&i_(t[0],t[1],o)&&(n=1);++r<n;)for(var a=t[r],s=ap(a),l=-1,u=s.length;++l<u;){var c=s[l],d=e[c];(i===d||oT(d,eP[c])&&!eO.call(e,c))&&(e[c]=a[c])}return e}),aa=nd(function(e){return e.push(i,ie),ts(am,i,e)});function as(e,t,r){var n=null==e?i:rY(e,t);return i===n?r:n}function al(e,t){return null!=e&&iy(e,t,r0)}var au=nJ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eI.call(t)),e[t]=r},aI(aF)),ac=nJ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eI.call(t)),eO.call(e,t)?e[t].push(r):e[t]=[r]},ic),ad=nd(r2);function af(e){return oD(e)?rC(e):r7(e)}function ap(e){return oD(e)?rC(e,!0):function(e){if(!oZ(e))return function(e){var t=[];if(null!=e)for(var r in ej(e))t.push(r);return t}(e);var t=iE(e),r=[];for(var n in e)"constructor"==n&&(t||!eO.call(e,n))||r.push(n);return r}(e)}var ah=n$(function(e,t,r){nn(e,t,r)}),am=n$(function(e,t,r,n){nn(e,t,r,n)}),ag=ii(function(e,t){var r={};if(null==e)return r;var n=!1;t=th(t,function(t){return t=nT(t,e),n||(n=t.length>1),t}),nU(e,ia(e),r),n&&(r=rA(r,7,it));for(var i=t.length;i--;)nj(r,t[i]);return r}),av=ii(function(e,t){return null==e?{}:na(e,t,function(t,r){return al(e,r)})});function ay(e,t){if(null==e)return{};var r=th(ia(e),function(e){return[e]});return t=ic(t),na(e,r,function(e,r){return t(e,r[0])})}var ax=n8(af),ab=n8(ap);function aw(e){return null==e?[]:tR(e,af(e))}var a_=nq(function(e,t,r){return t=t.toLowerCase(),e+(r?aj(t):t)});function aj(e){return aT(o9(e).toLowerCase())}function aC(e){return(e=o9(e))&&e.replace(eh,tD).replace(eZ,"")}var ak=nq(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),aE=nq(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),aS=nW("toLowerCase"),aN=nq(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),aP=nq(function(e,t,r){return e+(r?" ":"")+aT(t)}),aL=nq(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),aT=nW("toUpperCase");function aO(e,t,r){if(e=o9(e),t=r?i:t,i===t){var n;return(n=e,eY.test(n))?e.match(eq)||[]:e.match(ei)||[]}return e.match(t)||[]}var aR=nd(function(e,t){try{return ts(e,i,t)}catch(e){return oU(e)?e:new eb(e)}}),aA=ii(function(e,t){return tu(t,function(t){rT(e,t=iF(t),ob(e[t],e))}),e});function aI(e){return function(){return e}}var aM=nK(),aD=nK(!0);function aF(e){return e}function az(e){return r8("function"==typeof e?e:rA(e,1))}var aB=nd(function(e,t){return function(r){return r2(r,e,t)}}),aU=nd(function(e,t){return function(r){return r2(e,r,t)}});function aV(e,t,r){var n=af(t),i=rG(t,n);null!=r||oZ(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=rG(t,af(t)));var o=!(oZ(r)&&"chain"in r)||!!r.chain,a=oV(e);return tu(i,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=nB(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,tm([this.value()],arguments))})}),e}function a$(){}var aH=n0(th),aZ=n0(tc),aW=n0(ty);function aq(e){return ij(e)?tE(iF(e)):function(t){return rY(t,e)}}var aG=n2(),aY=n2(!0);function aK(){return[]}function aX(){return!1}var aJ=nQ(function(e,t){return e+t},0),aQ=n3("ceil"),a0=nQ(function(e,t){return e/t},1),a1=n3("floor"),a2=nQ(function(e,t){return e*t},1),a5=n3("round"),a4=nQ(function(e,t){return e-t},0);return rh.after=function(e,t){if("function"!=typeof t)throw new eE(o);return e=o3(e),function(){if(--e<1)return t.apply(this,arguments)}},rh.ary=oy,rh.assign=ae,rh.assignIn=at,rh.assignInWith=ar,rh.assignWith=an,rh.at=ai,rh.before=ox,rh.bind=ob,rh.bindAll=aA,rh.bindKey=ow,rh.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return oI(e)?e:[e]},rh.chain=on,rh.chunk=function(e,t,r){t=(r?i_(e,t,r):i===t)?1:t2(o3(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var o=0,a=0,s=ey(tS(n/t));o<n;)s[a++]=nm(e,o,o+=t);return s},rh.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},rh.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ey(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return tm(oI(r)?nB(r):[r],r$(t,1))},rh.cond=function(e){var t=null==e?0:e.length,r=ic();return e=t?th(e,function(e){if("function"!=typeof e[1])throw new eE(o);return[r(e[0]),e[1]]}):[],nd(function(r){for(var n=-1;++n<t;){var i=e[n];if(ts(i[0],this,r))return ts(i[1],this,r)}})},rh.conforms=function(e){var t,r;return r=af(t=rA(e,1)),function(e){return rI(e,t,r)}},rh.constant=aI,rh.countBy=oa,rh.create=function(e,t){var r=rm(e);return null==t?r:rL(r,t)},rh.curry=function e(t,r,n){r=n?i:r;var o=n7(t,8,i,i,i,i,i,r);return o.placeholder=e.placeholder,o},rh.curryRight=function e(t,r,n){r=n?i:r;var o=n7(t,16,i,i,i,i,i,r);return o.placeholder=e.placeholder,o},rh.debounce=o_,rh.defaults=ao,rh.defaultsDeep=aa,rh.defer=oj,rh.delay=oC,rh.difference=iU,rh.differenceBy=iV,rh.differenceWith=i$,rh.drop=function(e,t,r){var n=null==e?0:e.length;return n?nm(e,(t=r||i===t?1:o3(t))<0?0:t,n):[]},rh.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?nm(e,0,(t=n-(t=r||i===t?1:o3(t)))<0?0:t):[]},rh.dropRightWhile=function(e,t){return e&&e.length?nk(e,ic(t,3),!0,!0):[]},rh.dropWhile=function(e,t){return e&&e.length?nk(e,ic(t,3),!0):[]},rh.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&i_(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=o3(r))<0&&(r=-r>o?0:o+r),(n=i===n||n>o?o:o3(n))<0&&(n+=o),n=r>n?0:o6(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},rh.filter=function(e,t){return(oI(e)?td:rV)(e,ic(t,3))},rh.flatMap=function(e,t){return r$(oh(e,t),1)},rh.flatMapDeep=function(e,t){return r$(oh(e,t),l)},rh.flatMapDepth=function(e,t,r){return r=i===r?1:o3(r),r$(oh(e,t),r)},rh.flatten=iW,rh.flattenDeep=function(e){return(null==e?0:e.length)?r$(e,l):[]},rh.flattenDepth=function(e,t){return(null==e?0:e.length)?r$(e,t=i===t?1:o3(t)):[]},rh.flip=function(e){return n7(e,512)},rh.flow=aM,rh.flowRight=aD,rh.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},rh.functions=function(e){return null==e?[]:rG(e,af(e))},rh.functionsIn=function(e){return null==e?[]:rG(e,ap(e))},rh.groupBy=od,rh.initial=function(e){return(null==e?0:e.length)?nm(e,0,-1):[]},rh.intersection=iG,rh.intersectionBy=iY,rh.intersectionWith=iK,rh.invert=au,rh.invertBy=ac,rh.invokeMap=of,rh.iteratee=az,rh.keyBy=op,rh.keys=af,rh.keysIn=ap,rh.map=oh,rh.mapKeys=function(e,t){var r={};return t=ic(t,3),rW(e,function(e,n,i){rT(r,t(e,n,i),e)}),r},rh.mapValues=function(e,t){var r={};return t=ic(t,3),rW(e,function(e,n,i){rT(r,n,t(e,n,i))}),r},rh.matches=function(e){return nt(rA(e,1))},rh.matchesProperty=function(e,t){return nr(e,rA(t,1))},rh.memoize=ok,rh.merge=ah,rh.mergeWith=am,rh.method=aB,rh.methodOf=aU,rh.mixin=aV,rh.negate=oE,rh.nthArg=function(e){return e=o3(e),nd(function(t){return ni(t,e)})},rh.omit=ag,rh.omitBy=function(e,t){return ay(e,oE(ic(t)))},rh.once=function(e){return ox(2,e)},rh.orderBy=function(e,t,r,n){return null==e?[]:(oI(t)||(t=null==t?[]:[t]),oI(r=n?i:r)||(r=null==r?[]:[r]),no(e,t,r))},rh.over=aH,rh.overArgs=oS,rh.overEvery=aZ,rh.overSome=aW,rh.partial=oN,rh.partialRight=oP,rh.partition=om,rh.pick=av,rh.pickBy=ay,rh.property=aq,rh.propertyOf=function(e){return function(t){return null==e?i:rY(e,t)}},rh.pull=iJ,rh.pullAll=iQ,rh.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?ns(e,t,ic(r,2)):e},rh.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?ns(e,t,i,r):e},rh.pullAt=i0,rh.range=aG,rh.rangeRight=aY,rh.rearg=oL,rh.reject=function(e,t){return(oI(e)?td:rV)(e,oE(ic(t,3)))},rh.remove=function(e,t){var r=[];if(!(e&&e.length))return r;var n=-1,i=[],o=e.length;for(t=ic(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return nl(e,i),r},rh.rest=function(e,t){if("function"!=typeof e)throw new eE(o);return nd(e,t=i===t?t:o3(t))},rh.reverse=i1,rh.sampleSize=function(e,t,r){return t=(r?i_(e,t,r):i===t)?1:o3(t),(oI(e)?function(e,t){return iM(nB(e),rR(t,0,e.length))}:function(e,t){var r=aw(e);return iM(r,rR(t,0,r.length))})(e,t)},rh.set=function(e,t,r){return null==e?e:nf(e,t,r)},rh.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:nf(e,t,r,n)},rh.shuffle=function(e){return(oI(e)?function(e){return iM(nB(e))}:function(e){return iM(aw(e))})(e)},rh.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&i_(e,t,r)?(t=0,r=n):(t=null==t?0:o3(t),r=i===r?n:o3(r)),nm(e,t,r)):[]},rh.sortBy=og,rh.sortedUniq=function(e){return e&&e.length?nx(e):[]},rh.sortedUniqBy=function(e,t){return e&&e.length?nx(e,ic(t,2)):[]},rh.split=function(e,t,r){return(r&&"number"!=typeof r&&i_(e,t,r)&&(t=r=i),r=i===r?4294967295:r>>>0)?(e=o9(e))&&("string"==typeof t||null!=t&&!oK(t))&&!(t=nw(t))&&tB(e)?nO(tW(e),0,r):e.split(t,r):[]},rh.spread=function(e,t){if("function"!=typeof e)throw new eE(o);return t=null==t?0:t2(o3(t),0),nd(function(r){var n=r[t],i=nO(r,0,t);return n&&tm(i,n),ts(e,this,i)})},rh.tail=function(e){var t=null==e?0:e.length;return t?nm(e,1,t):[]},rh.take=function(e,t,r){return e&&e.length?nm(e,0,(t=r||i===t?1:o3(t))<0?0:t):[]},rh.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?nm(e,(t=n-(t=r||i===t?1:o3(t)))<0?0:t,n):[]},rh.takeRightWhile=function(e,t){return e&&e.length?nk(e,ic(t,3),!1,!0):[]},rh.takeWhile=function(e,t){return e&&e.length?nk(e,ic(t,3)):[]},rh.tap=function(e,t){return t(e),e},rh.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new eE(o);return oZ(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),o_(e,t,{leading:n,maxWait:t,trailing:i})},rh.thru=oi,rh.toArray=o5,rh.toPairs=ax,rh.toPairsIn=ab,rh.toPath=function(e){return oI(e)?th(e,iF):oQ(e)?[e]:nB(iD(o9(e)))},rh.toPlainObject=o7,rh.transform=function(e,t,r){var n=oI(e),i=n||oz(e)||o0(e);if(t=ic(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:oZ(e)&&oV(o)?rm(e$(e)):{}}return(i?tu:rW)(e,function(e,n,i){return t(r,e,n,i)}),r},rh.unary=function(e){return oy(e,1)},rh.union=i2,rh.unionBy=i5,rh.unionWith=i4,rh.uniq=function(e){return e&&e.length?n_(e):[]},rh.uniqBy=function(e,t){return e&&e.length?n_(e,ic(t,2)):[]},rh.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?n_(e,i,t):[]},rh.unset=function(e,t){return null==e||nj(e,t)},rh.unzip=i3,rh.unzipWith=i6,rh.update=function(e,t,r){return null==e?e:nC(e,t,nL(r))},rh.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:nC(e,t,nL(r),n)},rh.values=aw,rh.valuesIn=function(e){return null==e?[]:tR(e,ap(e))},rh.without=i8,rh.words=aO,rh.wrap=function(e,t){return oN(nL(t),e)},rh.xor=i7,rh.xorBy=i9,rh.xorWith=oe,rh.zip=ot,rh.zipObject=function(e,t){return nN(e||[],t||[],rS)},rh.zipObjectDeep=function(e,t){return nN(e||[],t||[],nf)},rh.zipWith=or,rh.entries=ax,rh.entriesIn=ab,rh.extend=at,rh.extendWith=ar,aV(rh,rh),rh.add=aJ,rh.attempt=aR,rh.camelCase=a_,rh.capitalize=aj,rh.ceil=aQ,rh.clamp=function(e,t,r){return i===r&&(r=t,t=i),i!==r&&(r=(r=o8(r))==r?r:0),i!==t&&(t=(t=o8(t))==t?t:0),rR(o8(e),t,r)},rh.clone=function(e){return rA(e,4)},rh.cloneDeep=function(e){return rA(e,5)},rh.cloneDeepWith=function(e,t){return rA(e,5,t="function"==typeof t?t:i)},rh.cloneWith=function(e,t){return rA(e,4,t="function"==typeof t?t:i)},rh.conformsTo=function(e,t){return null==t||rI(e,t,af(t))},rh.deburr=aC,rh.defaultTo=function(e,t){return null==e||e!=e?t:e},rh.divide=a0,rh.endsWith=function(e,t,r){e=o9(e),t=nw(t);var n=e.length,o=r=i===r?n:rR(o3(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},rh.eq=oT,rh.escape=function(e){return(e=o9(e))&&H.test(e)?e.replace(V,tF):e},rh.escapeRegExp=function(e){return(e=o9(e))&&J.test(e)?e.replace(X,"\\$&"):e},rh.every=function(e,t,r){var n=oI(e)?tc:rB;return r&&i_(e,t,r)&&(t=i),n(e,ic(t,3))},rh.find=os,rh.findIndex=iH,rh.findKey=function(e,t){return tb(e,ic(t,3),rW)},rh.findLast=ol,rh.findLastIndex=iZ,rh.findLastKey=function(e,t){return tb(e,ic(t,3),rq)},rh.floor=a1,rh.forEach=ou,rh.forEachRight=oc,rh.forIn=function(e,t){return null==e?e:rH(e,ic(t,3),ap)},rh.forInRight=function(e,t){return null==e?e:rZ(e,ic(t,3),ap)},rh.forOwn=function(e,t){return e&&rW(e,ic(t,3))},rh.forOwnRight=function(e,t){return e&&rq(e,ic(t,3))},rh.get=as,rh.gt=oO,rh.gte=oR,rh.has=function(e,t){return null!=e&&iy(e,t,rQ)},rh.hasIn=al,rh.head=iq,rh.identity=aF,rh.includes=function(e,t,r,n){e=oD(e)?e:aw(e),r=r&&!n?o3(r):0;var i=e.length;return r<0&&(r=t2(i+r,0)),oJ(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&t_(e,t,r)>-1},rh.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var i=null==r?0:o3(r);return i<0&&(i=t2(n+i,0)),t_(e,t,i)},rh.inRange=function(e,t,r){var n,o,a;return t=o4(t),i===r?(r=t,t=0):r=o4(r),(n=e=o8(e))>=t5(o=t,a=r)&&n<t2(o,a)},rh.invoke=ad,rh.isArguments=oA,rh.isArray=oI,rh.isArrayBuffer=oM,rh.isArrayLike=oD,rh.isArrayLikeObject=oF,rh.isBoolean=function(e){return!0===e||!1===e||oW(e)&&rX(e)==p},rh.isBuffer=oz,rh.isDate=oB,rh.isElement=function(e){return oW(e)&&1===e.nodeType&&!oY(e)},rh.isEmpty=function(e){if(null==e)return!0;if(oD(e)&&(oI(e)||"string"==typeof e||"function"==typeof e.splice||oz(e)||o0(e)||oA(e)))return!e.length;var t=iv(e);if(t==y||t==j)return!e.size;if(iE(e))return!r7(e).length;for(var r in e)if(eO.call(e,r))return!1;return!0},rh.isEqual=function(e,t){return r4(e,t)},rh.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return i===n?r4(e,t,i,r):!!n},rh.isError=oU,rh.isFinite=function(e){return"number"==typeof e&&tQ(e)},rh.isFunction=oV,rh.isInteger=o$,rh.isLength=oH,rh.isMap=oq,rh.isMatch=function(e,t){return e===t||r3(e,t,ip(t))},rh.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,r3(e,t,ip(t),r)},rh.isNaN=function(e){return oG(e)&&e!=+e},rh.isNative=function(e){if(ik(e))throw new eb("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return r6(e)},rh.isNil=function(e){return null==e},rh.isNull=function(e){return null===e},rh.isNumber=oG,rh.isObject=oZ,rh.isObjectLike=oW,rh.isPlainObject=oY,rh.isRegExp=oK,rh.isSafeInteger=function(e){return o$(e)&&e>=-9007199254740991&&e<=9007199254740991},rh.isSet=oX,rh.isString=oJ,rh.isSymbol=oQ,rh.isTypedArray=o0,rh.isUndefined=function(e){return i===e},rh.isWeakMap=function(e){return oW(e)&&iv(e)==E},rh.isWeakSet=function(e){return oW(e)&&"[object WeakSet]"==rX(e)},rh.join=function(e,t){return null==e?"":t0.call(e,t)},rh.kebabCase=ak,rh.last=iX,rh.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=n;return i!==r&&(o=(o=o3(r))<0?t2(n+o,0):t5(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--&&e[n]!==t;);return n}(e,t,o):tw(e,tC,o,!0)},rh.lowerCase=aE,rh.lowerFirst=aS,rh.lt=o1,rh.lte=o2,rh.max=function(e){return e&&e.length?rU(e,aF,rJ):i},rh.maxBy=function(e,t){return e&&e.length?rU(e,ic(t,2),rJ):i},rh.mean=function(e){return tk(e,aF)},rh.meanBy=function(e,t){return tk(e,ic(t,2))},rh.min=function(e){return e&&e.length?rU(e,aF,r9):i},rh.minBy=function(e,t){return e&&e.length?rU(e,ic(t,2),r9):i},rh.stubArray=aK,rh.stubFalse=aX,rh.stubObject=function(){return{}},rh.stubString=function(){return""},rh.stubTrue=function(){return!0},rh.multiply=a2,rh.nth=function(e,t){return e&&e.length?ni(e,o3(t)):i},rh.noConflict=function(){return e3._===this&&(e3._=eD),this},rh.noop=a$,rh.now=ov,rh.pad=function(e,t,r){e=o9(e);var n=(t=o3(t))?tZ(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return n1(tK(i),r)+e+n1(tS(i),r)},rh.padEnd=function(e,t,r){e=o9(e);var n=(t=o3(t))?tZ(e):0;return t&&n<t?e+n1(t-n,r):e},rh.padStart=function(e,t,r){e=o9(e);var n=(t=o3(t))?tZ(e):0;return t&&n<t?n1(t-n,r)+e:e},rh.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),t3(o9(e).replace(Q,""),t||0)},rh.random=function(e,t,r){if(r&&"boolean"!=typeof r&&i_(e,t,r)&&(t=r=i),i===r&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),i===e&&i===t?(e=0,t=1):(e=o4(e),i===t?(t=e,e=0):t=o4(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=t6();return t5(e+o*(t-e+e1("1e-"+((o+"").length-1))),t)}return nu(e,t)},rh.reduce=function(e,t,r){var n=oI(e)?tg:tN,i=arguments.length<3;return n(e,ic(t,4),r,i,rF)},rh.reduceRight=function(e,t,r){var n=oI(e)?tv:tN,i=arguments.length<3;return n(e,ic(t,4),r,i,rz)},rh.repeat=function(e,t,r){return t=(r?i_(e,t,r):i===t)?1:o3(t),nc(o9(e),t)},rh.replace=function(){var e=arguments,t=o9(e[0]);return e.length<3?t:t.replace(e[1],e[2])},rh.result=function(e,t,r){t=nT(t,e);var n=-1,o=t.length;for(o||(o=1,e=i);++n<o;){var a=null==e?i:e[iF(t[n])];i===a&&(n=o,a=r),e=oV(a)?a.call(e):a}return e},rh.round=a5,rh.runInContext=e,rh.sample=function(e){return(oI(e)?rk:function(e){return rk(aw(e))})(e)},rh.size=function(e){if(null==e)return 0;if(oD(e))return oJ(e)?tZ(e):e.length;var t=iv(e);return t==y||t==j?e.size:r7(e).length},rh.snakeCase=aN,rh.some=function(e,t,r){var n=oI(e)?ty:ng;return r&&i_(e,t,r)&&(t=i),n(e,ic(t,3))},rh.sortedIndex=function(e,t){return nv(e,t)},rh.sortedIndexBy=function(e,t,r){return ny(e,t,ic(r,2))},rh.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=nv(e,t);if(n<r&&oT(e[n],t))return n}return -1},rh.sortedLastIndex=function(e,t){return nv(e,t,!0)},rh.sortedLastIndexBy=function(e,t,r){return ny(e,t,ic(r,2),!0)},rh.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=nv(e,t,!0)-1;if(oT(e[r],t))return r}return -1},rh.startCase=aP,rh.startsWith=function(e,t,r){return e=o9(e),r=null==r?0:rR(o3(r),0,e.length),t=nw(t),e.slice(r,r+t.length)==t},rh.subtract=a4,rh.sum=function(e){return e&&e.length?tP(e,aF):0},rh.sumBy=function(e,t){return e&&e.length?tP(e,ic(t,2)):0},rh.template=function(e,t,r){var n=rh.templateSettings;r&&i_(e,t,r)&&(t=i),e=o9(e),t=ar({},t,n,n9);var o,a,s=ar({},t.imports,n.imports,n9),l=af(s),u=tR(s,l),c=0,d=t.interpolate||em,f="__p += '",p=eC((t.escape||em).source+"|"+d.source+"|"+(d===q?es:em).source+"|"+(t.evaluate||em).source+"|$","g"),h="//# sourceURL="+(eO.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eX+"]")+"\n";e.replace(p,function(t,r,n,i,s,l){return n||(n=i),f+=e.slice(c,l).replace(eg,tz),r&&(o=!0,f+="' +\n__e("+r+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),f+="';\n";var m=eO.call(t,"variable")&&t.variable;if(m){if(eo.test(m))throw new eb("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(F,""):f).replace(z,"$1").replace(B,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=aR(function(){return ew(l,h+"return "+f).apply(i,u)});if(g.source=f,oU(g))throw g;return g},rh.times=function(e,t){if((e=o3(e))<1||e>9007199254740991)return[];var r=4294967295,n=t5(e,4294967295);t=ic(t),e-=4294967295;for(var i=tL(n,t);++r<e;)t(r);return i},rh.toFinite=o4,rh.toInteger=o3,rh.toLength=o6,rh.toLower=function(e){return o9(e).toLowerCase()},rh.toNumber=o8,rh.toSafeInteger=function(e){return e?rR(o3(e),-9007199254740991,9007199254740991):0===e?e:0},rh.toString=o9,rh.toUpper=function(e){return o9(e).toUpperCase()},rh.trim=function(e,t,r){if((e=o9(e))&&(r||i===t))return tT(e);if(!e||!(t=nw(t)))return e;var n=tW(e),o=tW(t),a=tI(n,o),s=tM(n,o)+1;return nO(n,a,s).join("")},rh.trimEnd=function(e,t,r){if((e=o9(e))&&(r||i===t))return e.slice(0,tq(e)+1);if(!e||!(t=nw(t)))return e;var n=tW(e),o=tM(n,tW(t))+1;return nO(n,0,o).join("")},rh.trimStart=function(e,t,r){if((e=o9(e))&&(r||i===t))return e.replace(Q,"");if(!e||!(t=nw(t)))return e;var n=tW(e),o=tI(n,tW(t));return nO(n,o).join("")},rh.truncate=function(e,t){var r=30,n="...";if(oZ(t)){var o="separator"in t?t.separator:o;r="length"in t?o3(t.length):r,n="omission"in t?nw(t.omission):n}var a=(e=o9(e)).length;if(tB(e)){var s=tW(e);a=s.length}if(r>=a)return e;var l=r-tZ(n);if(l<1)return n;var u=s?nO(s,0,l).join(""):e.slice(0,l);if(i===o)return u+n;if(s&&(l+=u.length-l),oK(o)){if(e.slice(l).search(o)){var c,d=u;for(o.global||(o=eC(o.source,o9(el.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var f=c.index;u=u.slice(0,i===f?l:f)}}else if(e.indexOf(nw(o),l)!=l){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+n},rh.unescape=function(e){return(e=o9(e))&&$.test(e)?e.replace(U,tG):e},rh.uniqueId=function(e){var t=++eR;return o9(e)+t},rh.upperCase=aL,rh.upperFirst=aT,rh.each=ou,rh.eachRight=oc,rh.first=iq,aV(rh,(ev={},rW(rh,function(e,t){eO.call(rh.prototype,t)||(ev[t]=e)}),ev),{chain:!1}),rh.VERSION="4.17.21",tu(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){rh[e].placeholder=rh}),tu(["drop","take"],function(e,t){ry.prototype[e]=function(r){r=i===r?1:t2(o3(r),0);var n=this.__filtered__&&!t?new ry(this):this.clone();return n.__filtered__?n.__takeCount__=t5(r,n.__takeCount__):n.__views__.push({size:t5(r,4294967295),type:e+(n.__dir__<0?"Right":"")}),n},ry.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),tu(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;ry.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ic(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),tu(["head","last"],function(e,t){var r="take"+(t?"Right":"");ry.prototype[e]=function(){return this[r](1).value()[0]}}),tu(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");ry.prototype[e]=function(){return this.__filtered__?new ry(this):this[r](1)}}),ry.prototype.compact=function(){return this.filter(aF)},ry.prototype.find=function(e){return this.filter(e).head()},ry.prototype.findLast=function(e){return this.reverse().find(e)},ry.prototype.invokeMap=nd(function(e,t){return"function"==typeof e?new ry(this):this.map(function(r){return r2(r,e,t)})}),ry.prototype.reject=function(e){return this.filter(oE(ic(e)))},ry.prototype.slice=function(e,t){e=o3(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ry(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),i!==t&&(r=(t=o3(t))<0?r.dropRight(-t):r.take(t-e)),r)},ry.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ry.prototype.toArray=function(){return this.take(4294967295)},rW(ry.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=rh[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);o&&(rh.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,l=t instanceof ry,u=s[0],c=l||oI(t),d=function(e){var t=o.apply(rh,tm([e],s));return n&&f?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,m=l&&!p;if(!a&&c){t=m?t:new ry(this);var g=e.apply(t,s);return g.__actions__.push({func:oi,args:[d],thisArg:i}),new rv(g,f)}return h&&m?e.apply(this,s):(g=this.thru(d),h?n?g.value()[0]:g.value():g)})}),tu(["pop","push","shift","sort","splice","unshift"],function(e){var t=eS[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);rh.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(oI(i)?i:[],e)}return this[r](function(r){return t.apply(oI(r)?r:[],e)})}}),rW(ry.prototype,function(e,t){var r=rh[t];if(r){var n=r.name+"";eO.call(ro,n)||(ro[n]=[]),ro[n].push({name:t,func:r})}}),ro[nX(i,2).name]=[{name:"wrapper",func:i}],ry.prototype.clone=function(){var e=new ry(this.__wrapped__);return e.__actions__=nB(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=nB(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=nB(this.__views__),e},ry.prototype.reverse=function(){if(this.__filtered__){var e=new ry(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},ry.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=oI(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=t5(t,e+a);break;case"takeRight":e=t2(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=n?s:a-1,c=this.__iteratees__,d=c.length,f=0,p=t5(l,this.__takeCount__);if(!r||!n&&i==l&&p==l)return nE(e,this.__actions__);var h=[];t:for(;l--&&f<p;){for(var m=-1,g=e[u+=t];++m<d;){var v=c[m],y=v.iteratee,x=v.type,b=y(g);if(2==x)g=b;else if(!b){if(1==x)continue t;break t}}h[f++]=g}return h},rh.prototype.at=oo,rh.prototype.chain=function(){return on(this)},rh.prototype.commit=function(){return new rv(this.value(),this.__chain__)},rh.prototype.next=function(){i===this.__values__&&(this.__values__=o5(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}},rh.prototype.plant=function(e){for(var t,r=this;r instanceof rg;){var n=iB(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},rh.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof ry){var t=e;return this.__actions__.length&&(t=new ry(this)),(t=t.reverse()).__actions__.push({func:oi,args:[i1],thisArg:i}),new rv(t,this.__chain__)}return this.thru(i1)},rh.prototype.toJSON=rh.prototype.valueOf=rh.prototype.value=function(){return nE(this.__wrapped__,this.__actions__)},rh.prototype.first=rh.prototype.head,e4&&(rh.prototype[e4]=function(){return this}),rh}();e3._=tY,i!==(n=(function(){return tY}).call(t,r,t,e))&&(e.exports=n)}).call(this)},7771:function(e,t,r){var n=r(55639);e.exports=function(){return n.Date.now()}},23493:function(e,t,r){var n=r(23279),i=r(13218);e.exports=function(e,t,r){var o=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),n(e,t,{leading:o,maxWait:t,trailing:a})}},14841:function(e,t,r){var n=r(27561),i=r(13218),o=r(33448),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):s.test(e)?a:+e}},8891:function(e){"use strict";var t,r,n,i,o,a,s,l,u,c,d,f,p,h,m,g,v,y,x={DEBUG:!1,LIB_VERSION:"2.53.0"};if("undefined"==typeof window){var b={hostname:""};g={navigator:{userAgent:""},document:{location:b,referrer:""},screen:{width:0,height:0},location:b}}else g=window;var w=Array.prototype,_=Function.prototype,j=Object.prototype,C=w.slice,k=j.toString,E=j.hasOwnProperty,S=g.console,N=g.navigator,P=g.document,L=g.opera,T=g.screen,O=N.userAgent,R=_.bind,A=w.forEach,I=w.indexOf,M=w.map,D=Array.isArray,F={},z={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},B={log:function(){if(x.DEBUG&&!z.isUndefined(S)&&S)try{S.log.apply(S,arguments)}catch(e){z.each(arguments,function(e){S.log(e)})}},warn:function(){if(x.DEBUG&&!z.isUndefined(S)&&S){var e=["Mixpanel warning:"].concat(z.toArray(arguments));try{S.warn.apply(S,e)}catch(t){z.each(e,function(e){S.warn(e)})}}},error:function(){if(x.DEBUG&&!z.isUndefined(S)&&S){var e=["Mixpanel error:"].concat(z.toArray(arguments));try{S.error.apply(S,e)}catch(t){z.each(e,function(e){S.error(e)})}}},critical:function(){if(!z.isUndefined(S)&&S){var e=["Mixpanel error:"].concat(z.toArray(arguments));try{S.error.apply(S,e)}catch(t){z.each(e,function(e){S.error(e)})}}}},U=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(B,arguments)}},V=function(e){return{log:U(B.log,e),error:U(B.error,e),critical:U(B.critical,e)}};z.bind=function(e,t){var r,n;if(R&&e.bind===R)return R.apply(e,C.call(arguments,1));if(!z.isFunction(e))throw TypeError();return r=C.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(C.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var a=e.apply(o,r.concat(C.call(arguments)));return Object(a)===a?a:o}},z.each=function(e,t,r){if(null!=e){if(A&&e.forEach===A)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,i=e.length;n<i;n++)if(n in e&&t.call(r,e[n],n,e)===F)return}else for(var o in e)if(E.call(e,o)&&t.call(r,e[o],o,e)===F)return}},z.extend=function(e){return z.each(C.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&(e[r]=t[r])}),e},z.isArray=D||function(e){return"[object Array]"===k.call(e)},z.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},z.isArguments=function(e){return!!(e&&E.call(e,"callee"))},z.toArray=function(e){return e?e.toArray?e.toArray():z.isArray(e)||z.isArguments(e)?C.call(e):z.values(e):[]},z.map=function(e,t,r){if(M&&e.map===M)return e.map(t,r);var n=[];return z.each(e,function(e){n.push(t.call(r,e))}),n},z.keys=function(e){var t=[];return null===e||z.each(e,function(e,r){t[t.length]=r}),t},z.values=function(e){var t=[];return null===e||z.each(e,function(e){t[t.length]=e}),t},z.include=function(e,t){var r=!1;return null===e?r:I&&e.indexOf===I?-1!=e.indexOf(t):(z.each(e,function(e){if(r||(r=e===t))return F}),r)},z.includes=function(e,t){return -1!==e.indexOf(t)},z.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},z.isObject=function(e){return e===Object(e)&&!z.isArray(e)},z.isEmptyObject=function(e){if(z.isObject(e)){for(var t in e)if(E.call(e,t))return!1;return!0}return!1},z.isUndefined=function(e){return void 0===e},z.isString=function(e){return"[object String]"==k.call(e)},z.isDate=function(e){return"[object Date]"==k.call(e)},z.isNumber=function(e){return"[object Number]"==k.call(e)},z.isElement=function(e){return!!(e&&1===e.nodeType)},z.encodeDates=function(e){return z.each(e,function(t,r){z.isDate(t)?e[r]=z.formatDate(t):z.isObject(t)&&(e[r]=z.encodeDates(t))}),e},z.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},z.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},z.strip_empty_properties=function(e){var t={};return z.each(e,function(e,r){z.isString(e)&&e.length>0&&(t[r]=e)}),t},z.truncate=function(e,t){var r;return"string"==typeof e?r=e.slice(0,t):z.isArray(e)?(r=[],z.each(e,function(e){r.push(z.truncate(e,t))})):z.isObject(e)?(r={},z.each(e,function(e,n){r[n]=z.truncate(e,t)})):r=e,r},z.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=r[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},r=function(e,n){var i="",o=0,a="",s="",l=0,u=i,c=[],d=n[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),typeof d){case"string":return t(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(i+="    ",c=[],"[object Array]"===k.apply(d)){for(o=0,l=d.length;o<l;o+=1)c[o]=r(o,d)||"null";return s=0===c.length?"[]":i?"[\n"+i+c.join(",\n"+i)+"\n"+u+"]":"["+c.join(",")+"]",i=u,s}for(a in d)E.call(d,a)&&(s=r(a,d))&&c.push(t(a)+(i?": ":":")+s);return s=0===c.length?"{}":i?"{"+c.join(",")+u+"}":"{"+c.join(",")+"}",i=u,s}};return r("",{"":e})},z.JSONDecode=(o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"	"},a=function(e){var r=SyntaxError(e);throw r.at=t,r.text=n,r},s=function(e){return e&&e!==r&&a("Expected '"+e+"' instead of '"+r+"'"),r=n.charAt(t),t+=1,r},l=function(){var e,t="";for("-"===r&&(t="-",s("-"));r>="0"&&r<="9";)t+=r,s();if("."===r)for(t+=".";s()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,s(),("-"===r||"+"===r)&&(t+=r,s());r>="0"&&r<="9";)t+=r,s();if(isFinite(e=+t))return e;a("Bad number")},u=function(){var e,t,n,i="";if('"'===r)for(;s();){if('"'===r)return s(),i;if("\\"===r){if(s(),"u"===r){for(t=0,n=0;t<4&&isFinite(e=parseInt(s(),16));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else if("string"==typeof o[r])i+=o[r];else break}else i+=r}a("Bad string")},c=function(){for(;r&&r<=" ";)s()},d=function(){switch(r){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}a('Unexpected "'+r+'"')},f=function(){var e=[];if("["===r){if(s("["),c(),"]"===r)return s("]"),e;for(;r;){if(e.push(i()),c(),"]"===r)return s("]"),e;s(","),c()}}a("Bad array")},p=function(){var e,t={};if("{"===r){if(s("{"),c(),"}"===r)return s("}"),t;for(;r;){if(e=u(),c(),s(":"),Object.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=i(),c(),"}"===r)return s("}"),t;s(","),c()}}a("Bad object")},i=function(){switch(c(),r){case"{":return p();case"[":return f();case'"':return u();case"-":return l();default:return r>="0"&&r<="9"?l():d()}},function(e){var o;return n=e,t=0,r=" ",o=i(),c(),r&&a("Syntax error"),o}),z.base64Encode=function(e){var t,r,n,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,l=0,u="",c=[];if(!e)return e;e=z.utf8Encode(e);do t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,r=o>>12&63,n=o>>6&63,i=63&o,c[l++]=a.charAt(t)+a.charAt(r)+a.charAt(n)+a.charAt(i);while(s<e.length);switch(u=c.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u},z.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var t,r,n,i="",o=0;for(n=0,t=r=0,o=e.length;n<o;n++){var a=e.charCodeAt(n),s=null;a<128?r++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(r>t&&(i+=e.substring(t,r)),i+=s,t=r=n+1)}return r>t&&(i+=e.substring(t,e.length)),i},z.UUID=(h=function(){var e,t=1*new Date;if(g.performance&&g.performance.now)e=g.performance.now();else for(e=0;t==1*new Date;)e++;return t.toString(16)+Math.floor(e).toString(16)},m=function(){var e,t,r=[],n=0;function i(e,t){var n,i=0;for(n=0;n<t.length;n++)i|=r[n]<<8*n;return e^i}for(e=0;e<O.length;e++)t=O.charCodeAt(e),r.unshift(255&t),r.length>=4&&(n=i(n,r),r=[]);return r.length>0&&(n=i(n,r)),n.toString(16)},function(){var e=(T.height*T.width).toString(16);return h()+"-"+Math.random().toString(16).replace(".","")+"-"+m()+"-"+e+"-"+h()});var $=["ahrefsbot","ahrefssiteaudit","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];z.isBlockedUA=function(e){var t;for(t=0,e=e.toLowerCase();t<$.length;t++)if(-1!==e.indexOf($[t]))return!0;return!1},z.HTTPBuildQuery=function(e,t){var r,n,i=[];return z.isUndefined(t)&&(t="&"),z.each(e,function(e,t){r=encodeURIComponent(e.toString()),n=encodeURIComponent(t),i[i.length]=n+"="+r}),i.join(t)},z.getQueryParam=function(e,t){var r=RegExp("[\\?&]"+(t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)").exec(e);if(null===r||r&&"string"!=typeof r[1]&&r[1].length)return"";var n=r[1];try{n=decodeURIComponent(n)}catch(e){B.error("Skipping decoding for malformed query param: "+n)}return n.replace(/\+/g," ")},z.cookie={get:function(e){for(var t=e+"=",r=P.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=z.JSONDecode(z.cookie.get(e))||{}}catch(e){}return t},set_seconds:function(e,t,r,n,i,o,a){var s="",l="",u="";if(a)s="; domain="+a;else if(n){var c=J(P.location.hostname);s=c?"; domain=."+c:""}if(r){var d=new Date;d.setTime(d.getTime()+1e3*r),l="; expires="+d.toGMTString()}o&&(i=!0,u="; SameSite=None"),i&&(u+="; secure"),P.cookie=e+"="+encodeURIComponent(t)+l+"; path=/"+s+u},set:function(e,t,r,n,i,o,a){var s="",l="",u="";if(a)s="; domain="+a;else if(n){var c=J(P.location.hostname);s=c?"; domain=."+c:""}if(r){var d=new Date;d.setTime(d.getTime()+864e5*r),l="; expires="+d.toGMTString()}o&&(i=!0,u="; SameSite=None"),i&&(u+="; secure");var f=e+"="+encodeURIComponent(t)+l+"; path=/"+s+u;return P.cookie=f,f},remove:function(e,t,r){z.cookie.set(e,"",-1,t,!1,!1,r)}};var H=null,Z=function(e,t){if(null!==H&&!t)return H;var r=!0;try{e=e||window.localStorage;var n="__mplss_"+Y(8);e.setItem(n,"xyz"),"xyz"!==e.getItem(n)&&(r=!1),e.removeItem(n)}catch(e){r=!1}return H=r,r};z.localStorage={is_supported:function(e){var t=Z(null,e);return t||B.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){B.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){z.localStorage.error(e)}return null},parse:function(e){try{return z.JSONDecode(z.localStorage.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(e){z.localStorage.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){z.localStorage.error(e)}}},z.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,r,n,i,o){if(!t){B.error("No valid element provided to register_event");return}if(t.addEventListener&&!i)t.addEventListener(r,n,!!o);else{var a="on"+r,s=t[a];t[a]=function(r){if(r=r||e(window.event)){var i,o,a=!0;return z.isFunction(s)&&(i=s(r)),o=n.call(t,r),(!1===i||!1===o)&&(a=!1),a}}}}}();var W=RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');z.dom_query=function(){function e(e){return e.all?e.all:e.getElementsByTagName("*")}var t=/[\t\r\n]/g;function r(r){if(!P.getElementsByTagName)return[];var n=r.split(" "),i=[P];for(h=0;h<n.length;h++){if((u=n[h].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){d=(c=u.split("#"))[0];var o=c[1],a=P.getElementById(o);if(!a||d&&a.nodeName.toLowerCase()!=d)return[];i=[a];continue}if(u.indexOf(".")>-1){d=(c=u.split("."))[0];var s=c[1];for(d||(d="*"),f=[],p=0,m=0;m<i.length;m++)for(g=0,v="*"==d?e(i[m]):i[m].getElementsByTagName(d);g<v.length;g++)f[p++]=v[g];for(m=0,i=[],y=0;m<f.length;m++)f[m].className&&z.isString(f[m].className)&&(" "+f[m].className+" ").replace(t," ").indexOf(" "+s+" ")>=0&&(i[y++]=f[m]);continue}var l=u.match(W);if(l){d=l[1];var u,c,d,f,p,h,m,g,v,y,x,b=l[2],w=l[3],_=l[4];for(d||(d="*"),f=[],p=0,m=0;m<i.length;m++)for(g=0,v="*"==d?e(i[m]):i[m].getElementsByTagName(d);g<v.length;g++)f[p++]=v[g];switch(i=[],y=0,w){case"=":x=function(e){return e.getAttribute(b)==_};break;case"~":x=function(e){return e.getAttribute(b).match(RegExp("\\b"+_+"\\b"))};break;case"|":x=function(e){return e.getAttribute(b).match(RegExp("^"+_+"-?"))};break;case"^":x=function(e){return 0===e.getAttribute(b).indexOf(_)};break;case"$":x=function(e){return e.getAttribute(b).lastIndexOf(_)==e.getAttribute(b).length-_.length};break;case"*":x=function(e){return e.getAttribute(b).indexOf(_)>-1};break;default:x=function(e){return e.getAttribute(b)}}for(m=0,i=[],y=0;m<f.length;m++)x(f[m])&&(i[y++]=f[m]);continue}for(m=0,d=u,f=[],p=0;m<i.length;m++)for(g=0,v=i[m].getElementsByTagName(d);g<v.length;g++)f[p++]=v[g];i=f}return i}return function(e){return z.isElement(e)?[e]:z.isObject(e)&&!z.isUndefined(e.length)?e:r.call(this,e)}}();var q=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],G=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","ttclid","twclid","wbraid"];z.info={campaignParams:function(e){var t="",r={};return z.each(q,function(n){(t=z.getQueryParam(P.URL,n)).length?r[n]=t:void 0!==e&&(r[n]=e)}),r},clickParams:function(){var e="",t={};return z.each(G,function(r){(e=z.getQueryParam(P.URL,r)).length&&(t[r]=e)}),t},marketingParams:function(){return z.extend(z.info.campaignParams(),z.info.clickParams())},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=z.info.searchEngine(e),r={};if(null!==t){r.$search_engine=t;var n=z.getQueryParam(e,"yahoo"!=t?"q":"p");n.length&&(r.mp_keyword=n)}return r},browser:function(e,t,r){if(t=t||"",r||z.includes(e," OPR/"))return z.includes(e,"Mini")?"Opera Mini":"Opera";if(/(BlackBerry|PlayBook|BB10)/i.test(e))return"BlackBerry";if(z.includes(e,"IEMobile")||z.includes(e,"WPDesktop"))return"Internet Explorer Mobile";if(z.includes(e,"SamsungBrowser/"))return"Samsung Internet";if(z.includes(e,"Edge")||z.includes(e,"Edg/"))return"Microsoft Edge";if(z.includes(e,"FBIOS"))return"Facebook Mobile";if(z.includes(e,"Chrome"))return"Chrome";else if(z.includes(e,"CriOS"))return"Chrome iOS";else if(z.includes(e,"UCWEB")||z.includes(e,"UCBrowser"))return"UC Browser";else if(z.includes(e,"FxiOS"))return"Firefox iOS";else if(z.includes(t,"Apple"))return z.includes(e,"Mobile")?"Mobile Safari":"Safari";else if(z.includes(e,"Android"))return"Android Mobile";else if(z.includes(e,"Konqueror"))return"Konqueror";else if(z.includes(e,"Firefox"))return"Firefox";else if(z.includes(e,"MSIE")||z.includes(e,"Trident/"))return"Internet Explorer";else if(z.includes(e,"Gecko"))return"Mozilla";else return""},browserVersion:function(e,t,r){var n={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[z.info.browser(e,t,r)];if(void 0===n)return null;var i=e.match(n);return i?parseFloat(i[i.length-2]):null},os:function(){if(/Windows/i.test(O))return/Phone/.test(O)||/WPDesktop/.test(O)?"Windows Phone":"Windows";if(/(iPhone|iPad|iPod)/.test(O))return"iOS";if(/Android/.test(O))return"Android";if(/(BlackBerry|PlayBook|BB10)/i.test(O))return"BlackBerry";if(/Mac/i.test(O))return"Mac OS X";if(/Linux/.test(O))return"Linux";if(/CrOS/.test(O))return"Chrome OS";else return""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return g.location.href},properties:function(e){return"object"!=typeof e&&(e={}),z.extend(z.strip_empty_properties({$os:z.info.os(),$browser:z.info.browser(O,N.vendor,L),$referrer:P.referrer,$referring_domain:z.info.referringDomain(P.referrer),$device:z.info.device(O)}),{$current_url:z.info.currentUrl(),$browser_version:z.info.browserVersion(O,N.vendor,L),$screen_height:T.height,$screen_width:T.width,mp_lib:"web",$lib_version:x.LIB_VERSION,$insert_id:Y(),time:z.timestamp()/1e3},z.strip_empty_properties(e))},people_properties:function(){return z.extend(z.strip_empty_properties({$os:z.info.os(),$browser:z.info.browser(O,N.vendor,L)}),{$browser_version:z.info.browserVersion(O,N.vendor,L)})},mpPageViewProperties:function(){return z.strip_empty_properties({current_page_title:P.title,current_domain:g.location.hostname,current_url_path:g.location.pathname,current_url_protocol:g.location.protocol,current_url_search:g.location.search})}};var Y=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},K=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,X=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,J=function(e){var t=X,r=e.split("."),n=r[r.length-1];(n.length>4||"com"===n||"org"===n)&&(t=K);var i=e.match(t);return i?i[0]:""},Q=null,ee=null;"undefined"!=typeof JSON&&(Q=JSON.stringify,ee=JSON.parse),Q=Q||z.JSONEncode,ee=ee||z.JSONDecode,z.toArray=z.toArray,z.isObject=z.isObject,z.JSONEncode=z.JSONEncode,z.JSONDecode=z.JSONDecode,z.isBlockedUA=z.isBlockedUA,z.isEmptyObject=z.isEmptyObject,z.info=z.info,z.info.device=z.info.device,z.info.browser=z.info.browser,z.info.browserVersion=z.info.browserVersion,z.info.properties=z.info.properties;var et=function(){};et.prototype.create_properties=function(){},et.prototype.event_handler=function(){},et.prototype.after_track_handler=function(){},et.prototype.init=function(e){return this.mp=e,this},et.prototype.track=function(e,t,r,n){var i=this,o=z.dom_query(e);if(0===o.length){B.error("The DOM query ("+e+") returned 0 elements");return}return z.each(o,function(e){z.register_event(e,this.override_event,function(e){var o={},a=i.create_properties(r,this),s=i.mp.get_config("track_links_timeout");i.event_handler(e,this,o),window.setTimeout(i.track_callback(n,a,o,!0),s),i.mp.track(t,a,i.track_callback(n,a,o))})},this),!0},et.prototype.track_callback=function(e,t,r,n){n=n||!1;var i=this;return function(){!r.callback_fired&&(r.callback_fired=!0,e&&!1===e(n,t)||i.after_track_handler(t,r,n))}},et.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):z.extend({},e)};var er=function(){this.override_event="click"};z.inherit(er,et),er.prototype.create_properties=function(e,t){var r=er.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r},er.prototype.event_handler=function(e,t,r){r.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,r.href=t.href,r.new_tab||e.preventDefault()},er.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var en=function(){this.override_event="submit"};z.inherit(en,et),en.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()},en.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var ei=V("lock"),eo=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};eo.prototype.withLock=function(e,t,r){r||"function"==typeof t||(r=t,t=null);var n=r||new Date().getTime()+"|"+Math.random(),i=new Date().getTime(),o=this.storageKey,a=this.pollIntervalMS,s=this.timeoutMS,l=this.storage,u=o+":X",c=o+":Y",d=o+":Z",f=function(e){t&&t(e)},p=function(e){if(new Date().getTime()-i>s){ei.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+n+"]"),l.removeItem(d),l.removeItem(c),g();return}setTimeout(function(){try{e()}catch(e){f(e)}},a*(Math.random()+.1))},h=function(e,t){e()?t():p(function(){h(e,t)})},m=function(){var e=l.getItem(c);if(e&&e!==n)return!1;if(l.setItem(c,n),l.getItem(c)===n)return!0;if(!Z(l,!0))throw Error("localStorage support dropped while acquiring lock");return!1},g=function(){l.setItem(u,n),h(m,function(){if(l.getItem(u)===n){v();return}p(function(){if(l.getItem(c)!==n){g();return}h(function(){return!l.getItem(d)},v)})})},v=function(){l.setItem(d,"1");try{e()}finally{l.removeItem(d),l.getItem(c)===n&&l.removeItem(c),l.getItem(u)===n&&l.removeItem(u)}};try{if(Z(l,!0))g();else throw Error("localStorage support check failed")}catch(e){f(e)}};var ea=V("batch"),es=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||z.bind(ea.error,ea),this.lock=new eo(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};es.prototype.enqueue=function(e,t,r){var n={id:Y(),flushAfter:new Date().getTime()+2*t,payload:e};this.lock.withLock(z.bind(function(){var t;try{var i=this.readFromStorage();i.push(n),(t=this.saveToStorage(i))&&this.memQueue.push(n)}catch(r){this.reportError("Error enqueueing item",e),t=!1}r&&r(t)},this),z.bind(function(e){this.reportError("Error acquiring storage lock",e),r&&r(!1)},this),this.pid)},es.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.length<e){var r=this.readFromStorage();if(r.length){var n={};z.each(t,function(e){n[e.id]=!0});for(var i=0;i<r.length;i++){var o=r[i];if(new Date().getTime()>o.flushAfter&&!n[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var el=function(e,t){var r=[];return z.each(e,function(e){e.id&&!t[e.id]&&r.push(e)}),r};es.prototype.removeItemsByID=function(e,t){var r={};z.each(e,function(e){r[e]=!0}),this.memQueue=el(this.memQueue,r);var n=z.bind(function(){var t;try{var n=this.readFromStorage();if(n=el(n,r),t=this.saveToStorage(n)){n=this.readFromStorage();for(var i=0;i<n.length;i++){var o=n[i];if(o.id&&r[o.id])return this.reportError("Item not removed from storage"),!1}}}catch(r){this.reportError("Error removing items",e),t=!1}return t},this);this.lock.withLock(function(){var e=n();t&&t(e)},z.bind(function(e){var r=!1;if(this.reportError("Error acquiring storage lock",e),!Z(this.storage,!0)&&!(r=n()))try{this.storage.removeItem(this.storageKey)}catch(e){this.reportError("Error clearing queue",e)}t&&t(r)},this),this.pid)};var eu=function(e,t){var r=[];return z.each(e,function(e){var n=e.id;if(n in t){var i=t[n];null!==i&&(e.payload=i,r.push(e))}else r.push(e)}),r};es.prototype.updatePayloads=function(e,t){this.memQueue=eu(this.memQueue,e),this.lock.withLock(z.bind(function(){var r;try{var n=this.readFromStorage();n=eu(n,e),r=this.saveToStorage(n)}catch(t){this.reportError("Error updating items",e),r=!1}t&&t(r)},this),z.bind(function(e){this.reportError("Error acquiring storage lock",e),t&&t(!1)},this),this.pid)},es.prototype.readFromStorage=function(){var e;try{(e=this.storage.getItem(this.storageKey))&&(e=ee(e),z.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null))}catch(t){this.reportError("Error retrieving queue",t),e=null}return e||[]},es.prototype.saveToStorage=function(e){try{return this.storage.setItem(this.storageKey,Q(e)),!0}catch(e){return this.reportError("Error saving queue",e),!1}},es.prototype.clear=function(){this.memQueue=[],this.storage.removeItem(this.storageKey)};var ec=V("batch"),ed=function(e,t){this.errorReporter=t.errorReporter,this.queue=new es(e,{errorReporter:z.bind(this.reportError,this),storage:t.storage}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={}};function ef(e,t){ej(!0,e,t)}function ep(e,t){ej(!1,e,t)}function eh(e,t){return"1"===e_(e,t)}function em(e,t){if(function(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||g,r=t.navigator||{},n=!1;return z.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(e){z.includes([!0,1,"1","yes"],e)&&(n=!0)}),n}(t))return B.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r="0"===e_(e,t);return r&&B.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function eg(e){return eC(e,function(e){return this.get_config(e)})}function ev(e){return eC(e,function(e){return this._get_config(e)})}function ey(e){return eC(e,function(e){return this._get_config(e)})}function ex(e,t){eb(t=t||{}).remove(ew(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function eb(e){return"localStorage"===(e=e||{}).persistenceType?z.localStorage:z.cookie}function ew(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function e_(e,t){return eb(t).get(ew(e,t))}function ej(e,t,r){if(!z.isString(t)||!t.length){B.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}eb(r=r||{}).set(ew(t,r),e?1:0,z.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})}function eC(e,t){return function(){var r=!1;try{var n=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),a=t.call(this,"opt_out_tracking_cookie_prefix"),s=t.call(this,"window");n&&(r=em(n,{ignoreDnt:i,persistenceType:o,persistencePrefix:a,window:s}))}catch(e){B.error("Unexpected error when checking tracking opt-out status: "+e)}if(!r)return e.apply(this,arguments);var l=arguments[arguments.length-1];"function"==typeof l&&l(0)}}ed.prototype.enqueue=function(e,t){this.queue.enqueue(e,this.flushInterval,t)},ed.prototype.start=function(){this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},ed.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},ed.prototype.clear=function(){this.queue.clear()},ed.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},ed.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},ed.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(z.bind(this.flush,this),this.flushInterval))},ed.prototype.flush=function(e){try{if(this.requestInProgress){ec.log("Flush: Request already in progress");return}e=e||{};var t=this.libConfig.batch_request_timeout_ms,r=new Date().getTime(),n=this.batchSize,i=this.queue.fillBatch(n),o=[],a={};if(z.each(i,function(e){var t=e.payload;if(this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t){t.event&&t.properties&&(t.properties=z.extend({},t.properties,{mp_sent_by_lib_version:x.LIB_VERSION}));var r=!0,n=e.id;n?(this.itemIdsSentSuccessfully[n]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[n]}),r=!1):this.reportError("[dupe] found item with no ID",{item:e}),r&&o.push(t)}a[e.id]=t},this),o.length<1){this.resetFlush();return}this.requestInProgress=!0;var s=z.bind(function(o){this.requestInProgress=!1;try{var s=!1;if(e.unloading)this.queue.updatePayloads(a);else if(z.isObject(o)&&"timeout"===o.error&&new Date().getTime()-r>=t)this.reportError("Network timeout; retrying"),this.flush();else if(z.isObject(o)&&o.xhr_req&&(o.xhr_req.status>=500||429===o.xhr_req.status||"timeout"===o.error)){var l=2*this.flushInterval,u=o.xhr_req.responseHeaders;if(u){var c=u["Retry-After"];c&&(l=1e3*parseInt(c,10)||l)}l=Math.min(6e5,l),this.reportError("Error; retry in "+l+" ms"),this.scheduleFlush(l)}else if(z.isObject(o)&&o.xhr_req&&413===o.xhr_req.status){if(i.length>1){var d=Math.max(1,Math.floor(n/2));this.batchSize=Math.min(this.batchSize,d,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),s=!0}else s=!0;s&&(this.queue.removeItemsByID(z.map(i,function(e){return e.id}),z.bind(function(e){e?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())},this)),z.each(i,z.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})},this)))}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(l.transport="sendBeacon"),ec.log("MIXPANEL REQUEST:",o),this.sendRequest(o,l,s)}catch(e){this.reportError("Error flushing request queue",e),this.resetFlush()}},ed.prototype.reportError=function(e,t){if(ec.error.apply(ec.error,arguments),this.errorReporter)try{t instanceof Error||(t=Error(e)),this.errorReporter(e,t)}catch(e){ec.error(e)}};var ek="$set",eE="$set_once",eS="$unset",eN="$add",eP="$append",eL="$union",eT="$remove",eO={set_action:function(e,t){var r={},n={};return z.isObject(e)?z.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this):n[e]=t,r[ek]=n,r},unset_action:function(e){var t={},r=[];return z.isArray(e)||(e=[e]),z.each(e,function(e){this._is_reserved_property(e)||r.push(e)},this),t[eS]=r,t},set_once_action:function(e,t){var r={},n={};return z.isObject(e)?z.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this):n[e]=t,r[eE]=n,r},union_action:function(e,t){var r={},n={};return z.isObject(e)?z.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=z.isArray(e)?e:[e])},this):n[e]=z.isArray(t)?t:[t],r[eL]=n,r},append_action:function(e,t){var r={},n={};return z.isObject(e)?z.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this):n[e]=t,r[eP]=n,r},remove_action:function(e,t){var r={},n={};return z.isObject(e)?z.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this):n[e]=t,r[eT]=n,r},delete_action:function(){var e={};return e.$delete="",e}},eR=function(){};z.extend(eR.prototype,eO),eR.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r},eR.prototype.set=ey(function(e,t,r){var n=this.set_action(e,t);return z.isObject(e)&&(r=t),this._send_request(n,r)}),eR.prototype.set_once=ey(function(e,t,r){var n=this.set_once_action(e,t);return z.isObject(e)&&(r=t),this._send_request(n,r)}),eR.prototype.unset=ey(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)}),eR.prototype.union=ey(function(e,t,r){z.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)}),eR.prototype.delete=ey(function(e){var t=this.delete_action();return this._send_request(t,e)}),eR.prototype.remove=ey(function(e,t,r){var n=this.remove_action(e,t);return this._send_request(n,r)}),eR.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=z.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)},eR.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},eR.prototype._get_config=function(e){return this._mixpanel.get_config(e)},eR.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},eR.prototype.remove=eR.prototype.remove,eR.prototype.set=eR.prototype.set,eR.prototype.set_once=eR.prototype.set_once,eR.prototype.union=eR.prototype.union,eR.prototype.unset=eR.prototype.unset,eR.prototype.toString=eR.prototype.toString;var eA=function(){};z.extend(eA.prototype,eO),eA.prototype._init=function(e){this._mixpanel=e},eA.prototype.set=ev(function(e,t,r){var n=this.set_action(e,t);return z.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n[ek]=z.extend({},z.info.people_properties(),n[ek]),this._send_request(n,r)}),eA.prototype.set_once=ev(function(e,t,r){var n=this.set_once_action(e,t);return z.isObject(e)&&(r=t),this._send_request(n,r)}),eA.prototype.unset=ev(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)}),eA.prototype.increment=ev(function(e,t,r){var n={},i={};return z.isObject(e)?(z.each(e,function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e))){B.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}i[t]=e}},this),r=t):(z.isUndefined(t)&&(t=1),i[e]=t),n[eN]=i,this._send_request(n,r)}),eA.prototype.append=ev(function(e,t,r){z.isObject(e)&&(r=t);var n=this.append_action(e,t);return this._send_request(n,r)}),eA.prototype.remove=ev(function(e,t,r){z.isObject(e)&&(r=t);var n=this.remove_action(e,t);return this._send_request(n,r)}),eA.prototype.union=ev(function(e,t,r){z.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)}),eA.prototype.track_charge=ev(function(e,t,r){if(!z.isNumber(e)&&isNaN(e=parseFloat(e))){B.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",z.extend({$amount:e},t),r)}),eA.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},eA.prototype.delete_user=function(){if(!this._identify_called()){B.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)},eA.prototype.toString=function(){return this._mixpanel.toString()+".people"},eA.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),n=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),n&&(e.$user_id=n),i&&(e.$had_persisted_distinct_id=i);var o=z.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),z.isUndefined(t)||t(this._get_config("verbose")?{status:-1,error:null}:-1),z.truncate(o,255))},eA.prototype._get_config=function(e){return this._mixpanel.get_config(e)},eA.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},eA.prototype._enqueue=function(e){ek in e?this._mixpanel.persistence._add_to_people_queue(ek,e):eE in e?this._mixpanel.persistence._add_to_people_queue(eE,e):eS in e?this._mixpanel.persistence._add_to_people_queue(eS,e):eN in e?this._mixpanel.persistence._add_to_people_queue(eN,e):eP in e?this._mixpanel.persistence._add_to_people_queue(eP,e):eT in e?this._mixpanel.persistence._add_to_people_queue(eT,e):eL in e?this._mixpanel.persistence._add_to_people_queue(eL,e):B.error("Invalid call to _enqueue():",e)},eA.prototype._flush_one_queue=function(e,t,r,n){var i=this,o=z.extend({},this._mixpanel.persistence.load_queue(e)),a=o;!z.isUndefined(o)&&z.isObject(o)&&!z.isEmptyObject(o)&&(i._mixpanel.persistence._pop_from_people_queue(e,o),i._mixpanel.persistence.save(),n&&(a=n(o)),t.call(i,a,function(t,n){0===t&&i._mixpanel.persistence._add_to_people_queue(e,o),z.isUndefined(r)||r(t,n)}))},eA.prototype._flush=function(e,t,r,n,i,o,a){var s=this;this._flush_one_queue(ek,this.set,e),this._flush_one_queue(eE,this.set_once,n),this._flush_one_queue(eS,this.unset,o,function(e){return z.keys(e)}),this._flush_one_queue(eN,this.increment,t),this._flush_one_queue(eL,this.union,i);var l=this._mixpanel.persistence.load_queue(eP);if(!z.isUndefined(l)&&z.isArray(l)&&l.length)for(var u,c=function(e,t){0===e&&s._mixpanel.persistence._add_to_people_queue(eP,u),z.isUndefined(r)||r(e,t)},d=l.length-1;d>=0;d--)u=(l=this._mixpanel.persistence.load_queue(eP)).pop(),s._mixpanel.persistence.save(),z.isEmptyObject(u)||s.append(u,c);var f=this._mixpanel.persistence.load_queue(eT);if(!z.isUndefined(f)&&z.isArray(f)&&f.length)for(var p,h=function(e,t){0===e&&s._mixpanel.persistence._add_to_people_queue(eT,p),z.isUndefined(a)||a(e,t)},m=f.length-1;m>=0;m--)p=(f=this._mixpanel.persistence.load_queue(eT)).pop(),s._mixpanel.persistence.save(),z.isEmptyObject(p)||s.remove(p,h)},eA.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},eA.prototype.set=eA.prototype.set,eA.prototype.set_once=eA.prototype.set_once,eA.prototype.unset=eA.prototype.unset,eA.prototype.increment=eA.prototype.increment,eA.prototype.append=eA.prototype.append,eA.prototype.remove=eA.prototype.remove,eA.prototype.union=eA.prototype.union,eA.prototype.track_charge=eA.prototype.track_charge,eA.prototype.clear_charges=eA.prototype.clear_charges,eA.prototype.delete_user=eA.prototype.delete_user,eA.prototype.toString=eA.prototype.toString;var eI="__mps",eM="__mpso",eD="__mpus",eF="__mpa",ez="__mpap",eB="__mpr",eU="__mpu",eV="$people_distinct_id",e$="__alias",eH="__timers",eZ=[eI,eM,eD,eF,ez,eB,eU,eV,e$,eH],eW=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(B.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&z.localStorage.is_supported()?this.storage=z.localStorage:this.storage=z.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};eW.prototype.properties=function(){var e={};return this.load(),z.each(this.props,function(t,r){z.include(eZ,r)||(e[r]=t)}),e},eW.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=z.extend({},e))}},eW.prototype.upgrade=function(){var e,t;this.storage===z.localStorage?(e=z.cookie.parse(this.name),z.cookie.remove(this.name),z.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===z.cookie&&(t=z.localStorage.parse(this.name),z.localStorage.remove(this.name),t&&this.register_once(t))},eW.prototype.save=function(){this.disabled||this.storage.set(this.name,z.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},eW.prototype.load_prop=function(e){return this.load(),this.props[e]},eW.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},eW.prototype.clear=function(){this.remove(),this.props={}},eW.prototype.register_once=function(e,t,r){return!!z.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===r?this.default_expiry:r,this.load(),z.each(e,function(e,r){this.props.hasOwnProperty(r)&&this.props[r]!==t||(this.props[r]=e)},this),this.save(),!0)},eW.prototype.register=function(e,t){return!!z.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,this.load(),z.extend(this.props,e),this.save(),!0)},eW.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},eW.prototype.update_search_keyword=function(e){this.register(z.info.searchInfo(e))},eW.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:z.info.referringDomain(e)||"$direct"},"")},eW.prototype.get_referrer_info=function(){return z.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},eW.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},eW.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},eW.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},eW.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},eW.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},eW.prototype.get_cross_subdomain=function(){return this.cross_subdomain},eW.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},eW.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),n=t[e],i=this._get_or_create_queue(ek),o=this._get_or_create_queue(eE),a=this._get_or_create_queue(eS),s=this._get_or_create_queue(eN),l=this._get_or_create_queue(eL),u=this._get_or_create_queue(eT,[]),c=this._get_or_create_queue(eP,[]);r===eI?(z.extend(i,n),this._pop_from_people_queue(eN,n),this._pop_from_people_queue(eL,n),this._pop_from_people_queue(eS,n)):r===eM?(z.each(n,function(e,t){t in o||(o[t]=e)}),this._pop_from_people_queue(eS,n)):r===eD?z.each(n,function(e){z.each([i,o,s,l],function(t){e in t&&delete t[e]}),z.each(c,function(t){e in t&&delete t[e]}),a[e]=!0}):r===eF?(z.each(n,function(e,t){t in i?i[t]+=e:(t in s||(s[t]=0),s[t]+=e)},this),this._pop_from_people_queue(eS,n)):r===eU?(z.each(n,function(e,t){z.isArray(e)&&(t in l||(l[t]=[]),l[t]=l[t].concat(e))}),this._pop_from_people_queue(eS,n)):r===eB?(u.push(n),this._pop_from_people_queue(eP,n)):r===ez&&(c.push(n),this._pop_from_people_queue(eS,n)),B.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),B.log(t),this.save()},eW.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];z.isUndefined(r)||z.each(t,function(t,n){e===eP||e===eT?z.each(r,function(e){e[n]===t&&delete e[n]}):delete r[n]},this)},eW.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},eW.prototype._get_queue_key=function(e){return e===ek?eI:e===eE?eM:e===eS?eD:e===eN?eF:e===eP?ez:e===eT?eB:e===eL?eU:void B.error("Invalid queue:",e)},eW.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=z.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)},eW.prototype.set_event_timer=function(e,t){var r=this.load_prop(eH)||{};r[e]=t,this.props[eH]=r,this.save()},eW.prototype.remove_event_timer=function(e){var t=(this.load_prop(eH)||{})[e];return z.isUndefined(t)||(delete this.props[eH][e],this.save()),t};var eq=function(e){return e},eG=function(){},eY="mixpanel",eK="base64",eX="$device:",eJ=g.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,eQ=!eJ&&-1===O.indexOf("MSIE")&&-1===O.indexOf("Mozilla"),e0=null;N.sendBeacon&&(e0=function(){return N.sendBeacon.apply(N,arguments)});var e1={track:"track/",engage:"engage/",groups:"groups/",record:"record/"},e2={api_host:"https://api-js.mixpanel.com",api_routes:e1,api_method:"POST",api_transport:"XHR",api_payload_format:eK,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:eG,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:eG,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video",record_idle_timeout_ms:18e5,record_mask_text_class:RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:864e5,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},e5=!1,e4=function(){},e3=function(e,t,r){var n,i=r===eY?y:y[r];if(i&&0===v)n=i;else{if(i&&!z.isArray(i)){B.error("You have already initialized "+r);return}n=new e4}if(n._cached_groups={},n._init(e,t,r),n.people=new eA,n.people._init(n),!n.get_config("skip_first_touch_marketing")){var o=z.info.campaignParams(null),a={},s=!1;z.each(o,function(e,t){a["initial_"+t]=e,e&&(s=!0)}),s&&n.people.set_once(a)}return x.DEBUG=x.DEBUG||n.get_config("debug"),!z.isUndefined(i)&&z.isArray(i)&&(n._execute_array.call(n.people,i.people),n._execute_array(i)),n};e4.prototype.init=function(e,t,r){if(z.isUndefined(r)){this.report_error("You must name your new library: init(token, config, name)");return}if(r===eY){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var n=e3(e,t,r);return y[r]=n,n._loaded(),n},e4.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var n={};if(!("api_payload_format"in t)&&(t.api_host||e2.api_host).match(/\.mixpanel\.com/)&&(n.api_payload_format="json"),this.set_config(z.extend({},e2,n,t,{name:r,token:e,callback_fn:(r===eY?r:eY+"."+r)+"._jsc"})),this._jsc=eG,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(z.localStorage.is_supported(!0)&&eJ){if(this.init_batchers(),e0&&g.addEventListener){var i=z.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);g.addEventListener("pagehide",function(e){e.persisted&&i()}),g.addEventListener("visibilitychange",function(){"hidden"===P.visibilityState&&i()})}}else this._batch_requests=!1,B.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),z.each(this.get_batcher_configs(),function(e){B.log("Clearing batch queue "+e.queue_key),z.localStorage.remove(e.queue_key)})}this.persistence=this.cookie=new eW(this.config),this.unpersisted_superprops={},this._gdpr_init();var o=z.UUID();this.get_distinct_id()||this.register_once({distinct_id:eX+o,$device_id:o},"");var a=this.get_config("track_pageview");a&&this._init_url_change_tracking(a),this.get_config("record_sessions_percent")>0&&100*Math.random()<=this.get_config("record_sessions_percent")&&this.start_session_recording()},e4.prototype.start_session_recording=eg(function(){if(!g.MutationObserver){B.critical("Browser does not support MutationObserver; skipping session recording");return}var e=z.bind(function(){this._recorder=this._recorder||new g.__mp_recorder(this),this._recorder.startRecording()},this);if(z.isUndefined(g.__mp_recorder)){var t=P.createElement("script");t.type="text/javascript",t.async=!0,t.onload=e,t.src=this.get_config("recorder_src"),P.head.appendChild(t)}else e()}),e4.prototype.stop_session_recording=function(){this._recorder?this._recorder.stopRecording():B.critical("Session recorder module not loaded")},e4.prototype.get_session_recording_properties=function(){var e={};if(this._recorder){var t=this._recorder.replayId;t&&(e.$mp_replay_id=t)}return e},e4.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=z.info.campaignParams(null);z.each(e,(function(e,t){this.unregister(t)}).bind(this))}},e4.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(P.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(z.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(P.referrer)},e4.prototype._dom_loaded=function(){z.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||z.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},e4.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!e5)return this.__dom_loaded_queue.push([e,t]),!1;var r=new e().init(this);return r.track.apply(r,t)},e4.prototype._init_url_change_tracking=function(e){var t="";if(this.track_pageview()&&(t=z.info.currentUrl()),z.include(["full-url","url-with-path-and-query-string","url-with-path"],e)){g.addEventListener("popstate",function(){g.dispatchEvent(new Event("mp_locationchange"))}),g.addEventListener("hashchange",function(){g.dispatchEvent(new Event("mp_locationchange"))});var r=g.history.pushState;"function"==typeof r&&(g.history.pushState=function(e,t,n){r.call(g.history,e,t,n),g.dispatchEvent(new Event("mp_locationchange"))});var n=g.history.replaceState;"function"==typeof n&&(g.history.replaceState=function(e,t,r){n.call(g.history,e,t,r),g.dispatchEvent(new Event("mp_locationchange"))}),g.addEventListener("mp_locationchange",(function(){var r=z.info.currentUrl(),n=!1;"full-url"===e?n=r!==t:"url-with-path-and-query-string"===e?n=r.split("#")[0]!==t.split("#")[0]:"url-with-path"===e&&(n=r.split("#")[0].split("?")[0]!==t.split("#")[0].split("?")[0]),n&&this.track_pageview()&&(t=r)}).bind(this))}},e4.prototype._prepare_callback=function(e,t){if(z.isUndefined(e))return null;if(eJ)return function(r){e(r,t)};var r=this._jsc,n=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+n+"]";return r[n]=function(i){delete r[n],e(i,t)},i},e4.prototype._send_request=function(e,t,r,n){var i=!0;if(eQ)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},a=null;!n&&(z.isFunction(r)||"string"==typeof r)&&(n=r,r=null),r=z.extend(o,r||{}),eJ||(r.method="GET");var s="POST"===r.method,l=e0&&s&&"sendbeacon"===r.transport.toLowerCase(),u=r.verbose;t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),!eJ&&(n?t.callback=n:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),s&&(a="data="+encodeURIComponent(t.data),delete t.data),e+="?"+z.HTTPBuildQuery(t);var c=this;if("img"in t){var d=P.createElement("img");d.src=e,P.body.appendChild(d)}else if(l){try{i=e0(e,a)}catch(e){c.report_error(e),i=!1}try{n&&n(i?1:0)}catch(e){c.report_error(e)}}else if(eJ)try{var f=new XMLHttpRequest;f.open(r.method,e,!0);var p=this.get_config("xhr_headers");if(s&&(p["Content-Type"]="application/x-www-form-urlencoded"),z.each(p,function(e,t){f.setRequestHeader(t,e)}),r.timeout_ms&&void 0!==f.timeout){f.timeout=r.timeout_ms;var h=new Date().getTime()}f.withCredentials=!0,f.onreadystatechange=function(){if(4===f.readyState){var e,t;if(200===f.status){if(n){if(u){try{e=z.JSONDecode(f.responseText)}catch(t){if(c.report_error(t),!r.ignore_json_errors)return;e=f.responseText}n(e)}else n(Number(f.responseText))}}else t=f.timeout&&!f.status&&new Date().getTime()-h>=f.timeout?"timeout":"Bad HTTP status: "+f.status+" "+f.statusText,c.report_error(t),n&&(u?n({status:0,error:t,xhr_req:f}):n(0))}},f.send(a)}catch(e){c.report_error(e),i=!1}else{var m=P.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var g=P.getElementsByTagName("script")[0];g.parentNode.insertBefore(m,g)}return i},e4.prototype._execute_array=function(e){var t,r=[],n=[],i=[];z.each(e,function(e){e&&(t=e[0],z.isArray(t)?i.push(e):"function"==typeof e?e.call(this):z.isArray(e)&&"alias"===t?r.push(e):z.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):n.push(e))},this);var o=function(e,t){z.each(e,function(e){if(z.isArray(e[0])){var r=t;z.each(e,function(e){r=r[e[0]].apply(r,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};o(r,this),o(n,this),o(i,this)},e4.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},e4.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs},e4.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=z.bind(function(e){return new ed(e.queue_key,{libConfig:this.config,sendRequestFunc:z.bind(function(t,r,n){this._send_request(this.get_config("api_host")+e.endpoint,this._encode_data_for_request(t),r,this._prepare_callback(n,t))},this),beforeSendHook:z.bind(function(t){return this._run_hook("before_send_"+e.type,t)},this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:z.bind(this.stop_batch_senders,this)})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},e4.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,z.each(this.request_batchers,function(e){e.start()}))},e4.prototype.stop_batch_senders=function(){this._batch_requests=!1,z.each(this.request_batchers,function(e){e.stop(),e.clear()})},e4.prototype.push=function(e){this._execute_array([e])},e4.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},e4.prototype._encode_data_for_request=function(e){var t=z.JSONEncode(e);return this.get_config("api_payload_format")===eK&&(t=z.base64Encode(t)),{data:t}},e4.prototype._track_or_batch=function(e,t){var r=z.truncate(e.data,255),n=e.endpoint,i=e.batcher,o=e.should_send_immediately,a=e.send_request_options||{};t=t||eG;var s=!0,l=z.bind(function(){return(a.skip_hooks||(r=this._run_hook("before_send_"+e.type,r)),r)?(B.log("MIXPANEL REQUEST:"),B.log(r),this._send_request(n,this._encode_data_for_request(r),a,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!o?i.enqueue(r,function(e){e?t(1,r):l()}):s=l(),s&&r},e4.prototype.track=eg(function(e,t,r,n){n||"function"!=typeof r||(n=r,r=null);var i=(r=r||{}).transport;i&&(r.transport=i);var o=r.send_immediately;if("function"!=typeof n&&(n=eG),z.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){n(0);return}(t=z.extend({},t)).token=this.get_config("token");var a=this.persistence.remove_event_timer(e);if(!z.isUndefined(a)){var s=new Date().getTime()-a;t.$duration=parseFloat((s/1e3).toFixed(3))}this._set_default_superprops();var l=this.get_config("track_marketing")?z.info.marketingParams():{};t=z.extend({},z.info.properties({mp_loader:this.get_config("mp_loader")}),l,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var u=this.get_config("property_blacklist");z.isArray(u)?z.each(u,function(e){delete t[e]}):this.report_error("Invalid value for property_blacklist config: "+u);var c={event:e,properties:t};return this._track_or_batch({type:"events",data:c,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:r},n)}),e4.prototype.set_group=eg(function(e,t,r){z.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,r)}),e4.prototype.add_group=eg(function(e,t,r){var n=this.get_property(e),i={};return void 0===n?(i[e]=[t],this.register(i)):-1===n.indexOf(t)&&(n.push(t),i[e]=n,this.register(i)),this.people.union(e,t,r)}),e4.prototype.remove_group=eg(function(e,t,r){var n=this.get_property(e);if(void 0!==n){var i=n.indexOf(t);i>-1&&(n.splice(i,1),this.register({group_key:n})),0===n.length&&this.unregister(e)}return this.people.remove(e,t,r)}),e4.prototype.track_with_groups=eg(function(e,t,r,n){var i=z.extend({},t||{});return z.each(r,function(e,t){null!=e&&(i[t]=e)}),this.track(e,i,n)}),e4.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},e4.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},e4.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),n=this._cached_groups[r];return(void 0===n||n._group_key!==e||n._group_id!==t)&&((n=new eR)._init(this,e,t),this._cached_groups[r]=n),n},e4.prototype.track_pageview=eg(function(e,t){"object"!=typeof e&&(e={});var r=(t=t||{}).event_name||"$mp_web_page_view",n=z.extend(z.info.mpPageViewProperties(),z.info.campaignParams(),z.info.clickParams()),i=z.extend({},n,e);return this.track(r,i)}),e4.prototype.track_links=function(){return this._track_dom.call(this,er,arguments)},e4.prototype.track_forms=function(){return this._track_dom.call(this,en,arguments)},e4.prototype.time_event=function(e){if(z.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var e6={persistent:!0},e8=function(e){var t;return t=z.isObject(e)?e:z.isUndefined(e)?{}:{days:e},z.extend({},e6,t)};e4.prototype.register=function(e,t){var r=e8(t);r.persistent?this.persistence.register(e,r.days):z.extend(this.unpersisted_superprops,e)},e4.prototype.register_once=function(e,t,r){var n=e8(r);n.persistent?this.persistence.register_once(e,t,n.days):(void 0===t&&(t="None"),z.each(e,function(e,r){this.unpersisted_superprops.hasOwnProperty(r)&&this.unpersisted_superprops[r]!==t||(this.unpersisted_superprops[r]=e)},this))},e4.prototype.unregister=function(e,t){(t=e8(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},e4.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)},e4.prototype.identify=function(e,t,r,n,i,o,a,s){var l=this.get_distinct_id();if(e&&l!==e){if("string"==typeof e&&0===e.indexOf(eX))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:l},""),e!==l&&e!==this.get_property(e$)&&(this.unregister(e$),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,n,i,o,a,s),e!==l&&this.track("$identify",{distinct_id:e,$anon_distinct_id:l},{skip_hooks:!0})},e4.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=z.UUID();this.register_once({distinct_id:eX+e,$device_id:e},"")},e4.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},e4.prototype.alias=function(e,t){if(e===this.get_property(eV))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return(z.isUndefined(t)&&(t=this.get_distinct_id()),e!==t)?(this._register_single(e$,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},e4.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},e4.prototype.set_config=function(e){z.isObject(e)&&(z.extend(this.config,e),e.batch_size&&z.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),x.DEBUG=x.DEBUG||this.get_config("debug"))},e4.prototype.get_config=function(e){return this.config[e]},e4.prototype._run_hook=function(e){var t=(this.config.hooks[e]||eq).apply(this,C.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},e4.prototype.get_property=function(e){return this.persistence.load_prop([e])},e4.prototype.toString=function(){var e=this.get_config("name");return e!==eY&&(e=eY+"."+e),e},e4.prototype._event_is_disabled=function(e){return z.isBlockedUA(O)||this._flags.disable_all_events||z.include(this.__disabled_events,e)},e4.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&z.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||z.cookie.get("mp_optout"))&&(z.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},e4.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?this.stop_batch_senders():this._batchers_were_started&&this.start_batch_senders()},e4.prototype._gdpr_call_func=function(e,t){return t=z.extend({track:z.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),z.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},e4.prototype.opt_in_tracking=function(e){e=z.extend({enable_persistence:!0},e),this._gdpr_call_func(ef,e),this._gdpr_update_persistence(e)},e4.prototype.opt_out_tracking=function(e){(e=z.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(ep,e),this._gdpr_update_persistence(e)},e4.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(eh,e)},e4.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(em,e)},e4.prototype.clear_opt_in_out_tracking=function(e){e=z.extend({enable_persistence:!0},e),this._gdpr_call_func(ex,e),this._gdpr_update_persistence(e)},e4.prototype.report_error=function(e,t){B.error.apply(B.error,arguments);try{t||e instanceof Error||(e=Error(e)),this.get_config("error_reporter")(e,t)}catch(e){B.error(e)}},e4.prototype.init=e4.prototype.init,e4.prototype.reset=e4.prototype.reset,e4.prototype.disable=e4.prototype.disable,e4.prototype.time_event=e4.prototype.time_event,e4.prototype.track=e4.prototype.track,e4.prototype.track_links=e4.prototype.track_links,e4.prototype.track_forms=e4.prototype.track_forms,e4.prototype.track_pageview=e4.prototype.track_pageview,e4.prototype.register=e4.prototype.register,e4.prototype.register_once=e4.prototype.register_once,e4.prototype.unregister=e4.prototype.unregister,e4.prototype.identify=e4.prototype.identify,e4.prototype.alias=e4.prototype.alias,e4.prototype.name_tag=e4.prototype.name_tag,e4.prototype.set_config=e4.prototype.set_config,e4.prototype.get_config=e4.prototype.get_config,e4.prototype.get_property=e4.prototype.get_property,e4.prototype.get_distinct_id=e4.prototype.get_distinct_id,e4.prototype.toString=e4.prototype.toString,e4.prototype.opt_out_tracking=e4.prototype.opt_out_tracking,e4.prototype.opt_in_tracking=e4.prototype.opt_in_tracking,e4.prototype.has_opted_out_tracking=e4.prototype.has_opted_out_tracking,e4.prototype.has_opted_in_tracking=e4.prototype.has_opted_in_tracking,e4.prototype.clear_opt_in_out_tracking=e4.prototype.clear_opt_in_out_tracking,e4.prototype.get_group=e4.prototype.get_group,e4.prototype.set_group=e4.prototype.set_group,e4.prototype.add_group=e4.prototype.add_group,e4.prototype.remove_group=e4.prototype.remove_group,e4.prototype.track_with_groups=e4.prototype.track_with_groups,e4.prototype.start_batch_senders=e4.prototype.start_batch_senders,e4.prototype.stop_batch_senders=e4.prototype.stop_batch_senders,e4.prototype.start_session_recording=e4.prototype.start_session_recording,e4.prototype.stop_session_recording=e4.prototype.stop_session_recording,e4.prototype.get_session_recording_properties=e4.prototype.get_session_recording_properties,e4.prototype.DEFAULT_API_ROUTES=e1,eW.prototype.properties=eW.prototype.properties,eW.prototype.update_search_keyword=eW.prototype.update_search_keyword,eW.prototype.update_referrer_info=eW.prototype.update_referrer_info,eW.prototype.get_cross_subdomain=eW.prototype.get_cross_subdomain,eW.prototype.clear=eW.prototype.clear;var e7={},e9=function(){z.each(e7,function(e,t){t!==eY&&(y[t]=e)}),y._=z},te=(v=0,(y=new e4).init=function(e,t,r){if(r)return y[r]||(y[r]=e7[r]=e3(e,t,r),y[r]._loaded()),y[r];var n=y;e7[eY]?n=e7[eY]:e&&((n=e3(e,t,eY))._loaded(),e7[eY]=n),y=n,1===v&&(g[eY]=y),e9()},y.init(),function(){function e(){e.done||(e.done=!0,e5=!0,eQ=!1,z.each(e7,function(e){e._dom_loaded()}))}if(P.addEventListener)"complete"===P.readyState?e():P.addEventListener("DOMContentLoaded",e,!1);else if(P.attachEvent){P.attachEvent("onreadystatechange",e);var t=!1;try{t=null===g.frameElement}catch(e){}P.documentElement.doScroll&&t&&function t(){try{P.documentElement.doScroll("left")}catch(e){setTimeout(t,1);return}e()}()}z.register_event(g,"load",e,!0)}(),y);e.exports=te},29548:function(e,t,r){"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcastChannel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"nextauth.message";return{receive:function(t){var r=function(r){if(r.key===e){var n,i=JSON.parse(null!==(n=r.newValue)&&void 0!==n?n:"{}");(null==i?void 0:i.event)==="session"&&null!=i&&i.data&&t(i)}};return window.addEventListener("storage",r),function(){return window.removeEventListener("storage",r)}},post:function(t){if("undefined"!=typeof window)try{localStorage.setItem(e,JSON.stringify(l(l({},t),{},{timestamp:d()})))}catch(e){}}}},t.apiBaseUrl=c,t.fetchData=function(e,t,r){return u.apply(this,arguments)},t.now=d;var i=n(r(64687)),o=n(r(38416)),a=n(r(17156));function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){(0,o.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(){return(u=(0,a.default)(i.default.mark(function e(t,r,n){var o,a,s,u,d,f,p,h,m,g=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=(o=g.length>3&&void 0!==g[3]?g[3]:{}).ctx,u=void 0===(s=o.req)?null==a?void 0:a.req:s,d="".concat(c(r),"/").concat(t),e.prev=2,p={headers:l({"Content-Type":"application/json"},null!=u&&null!==(f=u.headers)&&void 0!==f&&f.cookie?{cookie:u.headers.cookie}:{})},null!=u&&u.body&&(p.body=JSON.stringify(u.body),p.method="POST"),e.next=7,fetch(d,p);case 7:return h=e.sent,e.next=10,h.json();case 10:if(m=e.sent,h.ok){e.next=13;break}throw m;case 13:return e.abrupt("return",Object.keys(m).length>0?m:null);case 16:return e.prev=16,e.t0=e.catch(2),n.error("CLIENT_FETCH_ERROR",{error:e.t0,url:d}),e.abrupt("return",null);case 20:case"end":return e.stop()}},e,null,[[2,16]])}))).apply(this,arguments)}function c(e){return"undefined"==typeof window?"".concat(e.baseUrlServer).concat(e.basePathServer):e.basePath}function d(){return Math.floor(Date.now()/1e3)}},36925:function(e,t,r){"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedStrategy=t.UnknownError=t.OAuthCallbackError=t.MissingSecret=t.MissingAuthorize=t.MissingAdapterMethods=t.MissingAdapter=t.MissingAPIRoute=t.InvalidCallbackUrl=t.AccountNotLinkedError=void 0,t.adapterErrorHandler=function(e,t){if(e)return Object.keys(e).reduce(function(r,n){return r[n]=(0,o.default)(i.default.mark(function r(){var o,a,s,l,u,c=arguments;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(r.prev=0,a=Array(o=c.length),s=0;s<o;s++)a[s]=c[s];return t.debug("adapter_".concat(n),{args:a}),l=e[n],r.next=6,l.apply(void 0,a);case 6:return r.abrupt("return",r.sent);case 9:throw r.prev=9,r.t0=r.catch(0),t.error("adapter_error_".concat(n),r.t0),(u=new h(r.t0)).name="".concat(k(n),"Error"),u;case 15:case"end":return r.stop()}},r,null,[[0,9]])})),r},{})},t.capitalize=k,t.eventsErrorHandler=function(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=(0,o.default)(i.default.mark(function r(){var o,a=arguments;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e[n],r.next=4,o.apply(void 0,a);case 4:return r.abrupt("return",r.sent);case 7:r.prev=7,r.t0=r.catch(0),t.error("".concat(C(n),"_EVENT_ERROR"),r.t0);case 10:case"end":return r.stop()}},r,null,[[0,7]])})),r},{})},t.upperSnake=C;var i=n(r(64687)),o=n(r(17156)),a=n(r(66115)),s=n(r(38416)),l=n(r(56690)),u=n(r(89728)),c=n(r(61655)),d=n(r(94993)),f=n(r(73808));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);return r=t?Reflect.construct(n,arguments,(0,f.default)(this).constructor):n.apply(this,arguments),(0,d.default)(this,r)}}var h=function(e){(0,c.default)(r,e);var t=p(r);function r(e){var n,i;return(0,l.default)(this,r),(i=t.call(this,null!==(n=null==e?void 0:e.message)&&void 0!==n?n:e)).name="UnknownError",i.code=e.code,e instanceof Error&&(i.stack=e.stack),i}return(0,u.default)(r,[{key:"toJSON",value:function(){return{name:this.name,message:this.message,stack:this.stack}}}]),r}((0,n(r(33496)).default)(Error));t.UnknownError=h;var m=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","OAuthCallbackError"),e}return(0,u.default)(r)}(h);t.OAuthCallbackError=m;var g=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","AccountNotLinkedError"),e}return(0,u.default)(r)}(h);t.AccountNotLinkedError=g;var v=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","MissingAPIRouteError"),(0,s.default)((0,a.default)(e),"code","MISSING_NEXTAUTH_API_ROUTE_ERROR"),e}return(0,u.default)(r)}(h);t.MissingAPIRoute=v;var y=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","MissingSecretError"),(0,s.default)((0,a.default)(e),"code","NO_SECRET"),e}return(0,u.default)(r)}(h);t.MissingSecret=y;var x=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","MissingAuthorizeError"),(0,s.default)((0,a.default)(e),"code","CALLBACK_CREDENTIALS_HANDLER_ERROR"),e}return(0,u.default)(r)}(h);t.MissingAuthorize=x;var b=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","MissingAdapterError"),(0,s.default)((0,a.default)(e),"code","EMAIL_REQUIRES_ADAPTER_ERROR"),e}return(0,u.default)(r)}(h);t.MissingAdapter=b;var w=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","MissingAdapterMethodsError"),(0,s.default)((0,a.default)(e),"code","MISSING_ADAPTER_METHODS_ERROR"),e}return(0,u.default)(r)}(h);t.MissingAdapterMethods=w;var _=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","UnsupportedStrategyError"),(0,s.default)((0,a.default)(e),"code","CALLBACK_CREDENTIALS_JWT_ERROR"),e}return(0,u.default)(r)}(h);t.UnsupportedStrategy=_;var j=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,s.default)((0,a.default)(e),"name","InvalidCallbackUrl"),(0,s.default)((0,a.default)(e),"code","INVALID_CALLBACK_URL_ERROR"),e}return(0,u.default)(r)}(h);function C(e){return e.replace(/([A-Z])/g,"_$1").toUpperCase()}function k(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1))}t.InvalidCallbackUrl=j},33299:function(e,t,r){"use strict";var n,i,o,a,s,l=r(34155),u=r(64836),c=r(18698);Object.defineProperty(t,"__esModule",{value:!0});var d={SessionContext:!0,useSession:!0,getSession:!0,getCsrfToken:!0,getProviders:!0,signIn:!0,signOut:!0,SessionProvider:!0};t.SessionContext=void 0,t.SessionProvider=function(e){if(!P)throw Error("React Context is unavailable in Server Components");var t,r,n,i,o,a,s=e.children,l=e.basePath,u=e.refetchInterval,c=e.refetchWhenOffline;l&&(E.basePath=l);var d=void 0!==e.session;E._lastSync=d?(0,x.now)():0;var p=g.useState(function(){return d&&(E._session=e.session),e.session}),v=(0,m.default)(p,2),y=v[0],w=v[1],_=g.useState(!d),j=(0,m.default)(_,2),C=j[0],k=j[1];g.useEffect(function(){return E._getSession=(0,h.default)(f.default.mark(function e(){var t,r,n=arguments;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(n.length>0&&void 0!==n[0]?n[0]:{}).event,e.prev=1,!((r="storage"===t)||void 0===E._session)){e.next=10;break}return E._lastSync=(0,x.now)(),e.next=7,L({broadcast:!r});case 7:return E._session=e.sent,w(E._session),e.abrupt("return");case 10:if(!(!t||null===E._session||(0,x.now)()<E._lastSync)){e.next=12;break}return e.abrupt("return");case 12:return E._lastSync=(0,x.now)(),e.next=15,L();case 15:E._session=e.sent,w(E._session),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),N.error("CLIENT_SESSION_ERROR",e.t0);case 22:return e.prev=22,k(!1),e.finish(22);case 25:case"end":return e.stop()}},e,null,[[1,19,22,25]])})),E._getSession(),function(){E._lastSync=0,E._session=void 0,E._getSession=function(){}}},[]),g.useEffect(function(){var e=S.receive(function(){return E._getSession({event:"storage"})});return function(){return e()}},[]),g.useEffect(function(){var t=e.refetchOnWindowFocus,r=void 0===t||t,n=function(){r&&"visible"===document.visibilityState&&E._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",n,!1),function(){return document.removeEventListener("visibilitychange",n,!1)}},[e.refetchOnWindowFocus]);var T=(t=g.useState("undefined"!=typeof navigator&&navigator.onLine),n=(r=(0,m.default)(t,2))[0],i=r[1],o=function(){return i(!0)},a=function(){return i(!1)},g.useEffect(function(){return window.addEventListener("online",o),window.addEventListener("offline",a),function(){window.removeEventListener("online",o),window.removeEventListener("offline",a)}},[]),n),R=!1!==c||T;g.useEffect(function(){if(u&&R){var e=setInterval(function(){E._session&&E._getSession({event:"poll"})},1e3*u);return function(){return clearInterval(e)}}},[u,R]);var A=g.useMemo(function(){return{data:y,status:C?"loading":y?"authenticated":"unauthenticated",update:function(e){return(0,h.default)(f.default.mark(function t(){var r;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C||!y)){t.next=2;break}return t.abrupt("return");case 2:return k(!0),t.t0=x.fetchData,t.t1=E,t.t2=N,t.next=8,O();case 8:return t.t3=t.sent,t.t4=e,t.t5={csrfToken:t.t3,data:t.t4},t.t6={body:t.t5},t.t7={req:t.t6},t.next=15,(0,t.t0)("session",t.t1,t.t2,t.t7);case 15:return r=t.sent,k(!1),r&&(w(r),S.post({event:"session",data:{trigger:"getSession"}})),t.abrupt("return",r);case 19:case"end":return t.stop()}},t)}))()}}},[y,C]);return(0,b.jsx)(P.Provider,{value:A,children:s})},t.getCsrfToken=O,t.getProviders=A,t.getSession=L,t.signIn=function(e,t,r){return M.apply(this,arguments)},t.signOut=function(e){return D.apply(this,arguments)},t.useSession=function(e){if(!P)throw Error("React Context is unavailable in Server Components");var t=g.useContext(P),r=null!=e?e:{},n=r.required,i=r.onUnauthenticated,o=n&&"unauthenticated"===t.status;return(g.useEffect(function(){if(o){var e="/api/auth/signin?".concat(new URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href}));i?i():window.location.href=e}},[o,i]),o)?{data:t.data,update:t.update,status:"loading"}:t};var f=u(r(64687)),p=u(r(38416)),h=u(r(17156)),m=u(r(27424)),g=j(r(67294)),v=j(r(26553)),y=u(r(30762)),x=r(29548),b=r(85893),w=r(527);function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_=function(e){return e?r:t})(e)}function j(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var r=_(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach(function(t){(0,p.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}Object.keys(w).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(d,e))&&(e in t&&t[e]===w[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}}))});var E={baseUrl:(0,y.default)(null!==(n=l.env.NEXTAUTH_URL)&&void 0!==n?n:l.env.VERCEL_URL).origin,basePath:(0,y.default)(l.env.NEXTAUTH_URL).path,baseUrlServer:(0,y.default)(null!==(i=null!==(o=l.env.NEXTAUTH_URL_INTERNAL)&&void 0!==o?o:l.env.NEXTAUTH_URL)&&void 0!==i?i:l.env.VERCEL_URL).origin,basePathServer:(0,y.default)(null!==(a=l.env.NEXTAUTH_URL_INTERNAL)&&void 0!==a?a:l.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:function(){}},S=(0,x.BroadcastChannel)(),N=(0,v.proxyLogger)(v.default,E.basePath),P=null===(s=g.createContext)||void 0===s?void 0:s.call(g,void 0);function L(e){return T.apply(this,arguments)}function T(){return(T=(0,h.default)(f.default.mark(function e(t){var r,n;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.fetchData)("session",E,N,t);case 2:return n=e.sent,(null===(r=null==t?void 0:t.broadcast)||void 0===r||r)&&S.post({event:"session",data:{trigger:"getSession"}}),e.abrupt("return",n);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function O(e){return R.apply(this,arguments)}function R(){return(R=(0,h.default)(f.default.mark(function e(t){var r;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.fetchData)("csrf",E,N,t);case 2:return r=e.sent,e.abrupt("return",null==r?void 0:r.csrfToken);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(){return I.apply(this,arguments)}function I(){return(I=(0,h.default)(f.default.mark(function e(){return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.fetchData)("providers",E,N);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function M(){return(M=(0,h.default)(f.default.mark(function e(t,r,n){var i,o,a,s,l,u,c,d,p,h,m,g,v,y,b,w,_;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=void 0===(o=(i=null!=r?r:{}).callbackUrl)?window.location.href:o,l=void 0===(s=i.redirect)||s,u=(0,x.apiBaseUrl)(E),e.next=4,A();case 4:if(c=e.sent){e.next=8;break}return window.location.href="".concat(u,"/error"),e.abrupt("return");case 8:if(!(!t||!(t in c))){e.next=11;break}return window.location.href="".concat(u,"/signin?").concat(new URLSearchParams({callbackUrl:a})),e.abrupt("return");case 11:return d="credentials"===c[t].type,p="email"===c[t].type,h=d||p,m="".concat(u,"/").concat(d?"callback":"signin","/").concat(t),g="".concat(m).concat(n?"?".concat(new URLSearchParams(n)):""),e.t0=fetch,e.t1=g,e.t2={"Content-Type":"application/x-www-form-urlencoded"},e.t3=URLSearchParams,e.t4=k,e.t5=k({},r),e.t6={},e.next=25,O();case 25:return e.t7=e.sent,e.t8=a,e.t9={csrfToken:e.t7,callbackUrl:e.t8,json:!0},e.t10=(0,e.t4)(e.t5,e.t6,e.t9),e.t11=new e.t3(e.t10),e.t12={method:"post",headers:e.t2,body:e.t11},e.next=33,(0,e.t0)(e.t1,e.t12);case 33:return v=e.sent,e.next=36,v.json();case 36:if(y=e.sent,!(l||!h)){e.next=42;break}return w=null!==(b=y.url)&&void 0!==b?b:a,window.location.href=w,w.includes("#")&&window.location.reload(),e.abrupt("return");case 42:if(_=new URL(y.url).searchParams.get("error"),!v.ok){e.next=46;break}return e.next=46,E._getSession({event:"storage"});case 46:return e.abrupt("return",{error:_,status:v.status,ok:v.ok,url:_?null:y.url});case 47:case"end":return e.stop()}},e)}))).apply(this,arguments)}function D(){return(D=(0,h.default)(f.default.mark(function e(t){var r,n,i,o,a,s,l,u,c;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=void 0===(n=(null!=t?t:{}).callbackUrl)?window.location.href:n,o=(0,x.apiBaseUrl)(E),e.t0={"Content-Type":"application/x-www-form-urlencoded"},e.t1=URLSearchParams,e.next=6,O();case 6:return e.t2=e.sent,e.t3=i,e.t4={csrfToken:e.t2,callbackUrl:e.t3,json:!0},e.t5=new e.t1(e.t4),a={method:"post",headers:e.t0,body:e.t5},e.next=13,fetch("".concat(o,"/signout"),a);case 13:return s=e.sent,e.next=16,s.json();case 16:if(l=e.sent,S.post({event:"session",data:{trigger:"signout"}}),!(null===(r=null==t?void 0:t.redirect)||void 0===r||r)){e.next=23;break}return c=null!==(u=l.url)&&void 0!==u?u:i,window.location.href=c,c.includes("#")&&window.location.reload(),e.abrupt("return");case 23:return e.next=25,E._getSession({event:"storage"});case 25:return e.abrupt("return",l);case 26:case"end":return e.stop()}},e)}))).apply(this,arguments)}t.SessionContext=P},527:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},26553:function(e,t,r){"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.proxyLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0;try{if("undefined"==typeof window)return e;var r={},n=function(e){r[e]=function(r,n){l[e](r,n),"error"===e&&(n=s(n)),n.client=!0;var o="".concat(t,"/_log"),u=new URLSearchParams(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){(0,i.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({level:e,code:r},n));return navigator.sendBeacon?navigator.sendBeacon(o,u):fetch(o,{method:"POST",body:u,keepalive:!0})}};for(var o in e)n(o);return r}catch(e){return l}},t.setLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t||(l.debug=function(){}),e.error&&(l.error=e.error),e.warn&&(l.warn=e.warn),e.debug&&(l.debug=e.debug)};var i=n(r(38416)),o=r(36925);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){var t;return e instanceof Error&&!(e instanceof o.UnknownError)?{message:e.message,stack:e.stack,name:e.name}:(null!=e&&e.error&&(e.error=s(e.error),e.message=null!==(t=e.message)&&void 0!==t?t:e.error.message),e)}var l={error:function(e,t){t=s(t),console.error("[next-auth][error][".concat(e,"]"),"\nhttps://next-auth.js.org/errors#".concat(e.toLowerCase()),t.message,t)},warn:function(e){console.warn("[next-auth][warn][".concat(e,"]"),"\nhttps://next-auth.js.org/warnings#".concat(e.toLowerCase()))},debug:function(e,t){console.log("[next-auth][debug][".concat(e,"]"),t)}};t.default=l},30762:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;let r=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let n=new URL(null!==(t=e)&&void 0!==t?t:r),i=("/"===n.pathname?r.pathname:n.pathname).replace(/\/$/,""),o=`${n.origin}${i}`;return{origin:n.origin,host:n.host,path:i,base:o,toString:()=>o}}},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(21470)}])},9875:function(e,t,r){"use strict";r.r(t),t.default={src:"/_next/static/media/DescribeImageUploadIcon.895c956c.png",height:48,width:48,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAMFBMVEW6pfCGcPeFbvd4Yvl4YvmagfWgiPN2YPnq6+n//+Db1+vi4Orh3+q3nvCtjvKUdvUcln2FAAAAEHRSTlMBFSOGc2uFUEESX1bJYURDQhy8YQAAAAlwSFlzAAALEwAACxMBAJqcGAAAADlJREFUeJwlyskNwDAMxEDuSr6duP9uAyP8DUBAtgBaZEYDxVUIJ3NSjHPsPYpRZS2qoJze3+eOfx8cMQDmJThtmAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},44290:function(e,t,r){"use strict";r.r(t),t.default={src:"/_next/static/media/filter_icon.ffc9926a.png",height:147,width:157,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAXVBMVEVMaXH+/v6CfZjwBkD3MwT0E9Xd3OvRe5r//vuOiKH/eAH/twD4pQrcYf+gs0X1wP+UnmytlMSHUetwqG6MIPphtJyvr8rRjf81uk3+/v7+/P9qj9paP+bEwc2Vfq0Yq3Y4AAAAH3RSTlMAdDaKZl6RCWV1iFdlr6eCiGBsdoRjkXeFNj2ysI5cPVTr2gAAAAlwSFlzAABYlQAAWJUB2W030wAAADtJREFUeJwFwQUCgDAMALGbtsUGw/X/zyQBaWIMArQdpAQM46Slh28+8rbsirHeT0UxQQ1xePNvvtz5AzxeAix0vSRBAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:7}},14650:function(e,t,r){"use strict";r.d(t,{Z:function(){return _}});var n=r(85893),i=r(40),o=r(22653),a=r(67294),s=r(23493),l=r.n(s);let u=()=>{let[e,t]=a.useState([0,0]),r=l()(e=>{t([e.clientX,e.clientY])},200);return a.useEffect(()=>(window.addEventListener("mousemove",r),()=>window.removeEventListener("mousemove",r)),[r]),e};function c(e){let{x:t=0,y:r=0,height:i=0,width:o=0}=e.parentRef.current?.getBoundingClientRect()||{},[a,s]=u(),l={x:t,y:r,h:i,w:o,mouseX:a,mouseY:s};return(0,n.jsx)("div",{style:{position:"absolute",top:0,right:f(l),left:d(l),height:i,width:p(l),clipPath:h(l)}})}let d=e=>{let{x:t,mouseX:r}=e;return r>t?void 0:-Math.max(t-r,10)+"px"},f=e=>{let{x:t,w:r,mouseX:n}=e;return n>t?-Math.max(n+1-(t+r),10)+"px":void 0},p=e=>{let{x:t,w:r,mouseX:n}=e;return n>t?Math.max(n+1-(t+r),10)+"px":Math.max(t-n,10)+"px"},h=e=>{let{x:t,y:r,h:n,mouseX:i,mouseY:o}=e;return i>t?`polygon(0% 0%, 0% 100%, 100% ${100*(o-r)/n}%)`:`polygon(100% 0%, 0% ${100*(o-r)/n}%, 100% 100%)`};var m=r(93123),g=r(8891),v=r.n(g),y=r(58573),x=r(9008),b=r.n(x),w=r(69306);function _(e){let{coverImageUrl:t,title:r,description:s,ctaUrl:l,ctaLabel:u,mixpanelId:d,source:f,sidebar:p="left",disabled:h=!1}=e,g=a.useRef(null),[x,_]=a.useState(!1),[j,C]=a.useState(!1),k=(0,w.c0)(1024),E=a.useCallback(()=>{v().track("Clicked CTA in Canvas video tooltip",{tooltipFor:d,source:f})},[d,f]);return"board"===f&&k?null:(0,n.jsxs)("div",{className:`inline ${h?"pointer-events-none":""}`,children:[(0,n.jsx)(b(),{children:(0,n.jsx)("link",{rel:"preload",href:t,as:"image"},t)}),(0,n.jsxs)(i.fC,{openDelay:300,closeDelay:0,onOpenChange:e=>{_(e)},children:[(0,n.jsx)(i.xz,{className:`${x?"text-gray-50":"text-gray-60"} hover:text-gray-50`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation()},children:(0,n.jsx)(o.Z,{width:20,height:20,className:"inline mx-1 align-[-4px]"})}),(0,n.jsx)(i.h_,{children:(0,n.jsxs)(i.VY,{style:{zIndex:m.KN.TOASTS},side:"left"===p?"right":"left",align:"center",sideOffset:8,collisionPadding:{top:58},className:"!outline-none animate-fade-in",children:[(0,n.jsx)(c,{parentRef:g}),(0,n.jsxs)("div",{ref:g,className:"bg-gray-90 w-56 rounded-lg text-sm overflow-hidden border border-gray-85 select-none",style:{filter:"drop-shadow(0px 0px 16px rgba(0, 0, 0, 0.36)) drop-shadow(0px 0px 24px rgba(0, 0, 0, 0.36))"},children:[(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("img",{src:t,height:154}),(0,n.jsx)("a",{href:l,target:"_blank",onClick:E,onAuxClick:E,children:(0,n.jsx)("div",{className:"absolute top-0 left-0 bottom-0 right-0",onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),style:{background:"linear-gradient(to top, rgba(0,0,0,0.84), rgba(0,0,0,0.6) 30%, transparent 75%)"},children:(0,n.jsx)("div",{className:"absolute left-4 bottom-[13px] right-4 ",children:(0,n.jsxs)("div",{className:`border border-white ${j?"border-opacity-[66%]":"border-opacity-[44%]"} text-white rounded-md py-2 pl-4 pr-3.5 text-center text-sm font-pg-semibold align-middle`,children:[u," ",(0,n.jsx)(y.Z,{className:"inline align-[-2px] mx-1"})]})})})})]}),(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsx)("p",{className:"text-gray-25 font-pg-semibold leading-[150%]",children:r}),(0,n.jsx)("p",{className:"text-gray-50 mt-1 font-normal leading-[130%]",children:s})]})]})]})})]})]})}},30282:function(e,t,r){"use strict";r.d(t,{D:function(){return o}});var n=r(85893),i=r(94670);function o(e){let{large:t}=e;return(0,n.jsx)(i.u,{label:"Only visible to admins",color:"white",placement:"top",children:(0,n.jsx)("div",{className:`${t?"w-2 h-2":"w-1 h-1"} rounded-full bg-orange-500`})})}t.Z=function(){return(0,n.jsx)("div",{className:"w-1 h-1 rounded-full bg-amber-300"})}},28456:function(e,t,r){"use strict";var n=r(85893),i=r(24011),o=r(32478),a=r(86010),s=r(14603),l=r.n(s);let u=(0,i.L)("header","px-8 flex justify-between items-center"),c=(0,i.L)("h3","text-gray-5 font-pg-medium"),d=(0,i.L)("main","px-8 pr-12 text-gray-50"),f=(0,i.L)("footer","pl-9 pr-7 flex justify-end gap-4"),p=e=>(0,n.jsx)("button",{...e,className:(0,a.Z)(e.className,l().Secondary)}),h=e=>(0,n.jsx)("button",{...e,className:(0,a.Z)(e.className,l().Primary)}),m=e=>(0,n.jsx)("form",{...e,className:(0,a.Z)(l().Modal,e.className)});function g(e){let{children:t,...r}=e;return(0,n.jsx)(m,{onKeyDown:e=>{"Escape"!==e.key&&e.stopPropagation()},onPaste:e=>{e.stopPropagation()},...r,children:t})}g.Header=u,g.HeaderTitle=c,g.CloseButton=function(e){let{...t}=e;return(0,n.jsx)("button",{type:"button",...t,className:(0,a.Z)("flex items-center justify-center text-gray-50",t.className),children:(0,n.jsx)(o.Z,{})})},g.Body=d,g.Footer=f,g.Cancel=e=>{let{...t}=e;return(0,n.jsx)(p,{type:"button",...t,children:t.children??"Cancel"})},g.Submit=e=>{let{...t}=e;return(0,n.jsx)(h,{type:"submit",...t})},t.Z=g},94562:function(e,t,r){"use strict";r.d(t,{W:function(){return p}});var n=r(85893),i=r(92323),o=r(62363),a=r(60422),s=r(8891),l=r.n(s),u=r(85604),c=r(44746);function d(e){let{settings:t}=e,{closeModal:r}=(0,i.d)(),s=e=>{l().track("Reported safety filter",{prompt:t.prompt,is_img2img:!!(t.initImage||t.maskImage||t.imageToImage?.url),reason:e,negativePrompt:t.negativePrompt,steps:t.steps,filter_id:t.filter_id}),u.mv.info("Thank you for your feedback!")};return(0,n.jsxs)("div",{className:"bg-gray-95 pt-3 border border-gray-90 rounded-xl text-gray-25 w-96",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center pr-2 pl-3 pb-2",children:[(0,n.jsx)("h1",{className:" text-gray-5 text-md font-pg-medium",children:"What went wrong?"}),(0,n.jsx)("button",{type:"button",onClick:r,children:(0,n.jsx)(a.Z,{})})]}),(0,n.jsx)("ul",{className:"space-y-2 text-m divide-y divide-gray-90",children:["Nude content should be allowed","Innocent prompt was flagged","Other"].map(e=>(0,n.jsxs)("button",{className:"px-3 flex items-center py-3 justify-between hover:bg-gray-90 !mt-0 w-full text-sm",type:"button",onClick:()=>{s(e),r()},children:[e,(0,n.jsx)("span",{className:"text-gray-50",children:(0,n.jsx)(o._Q,{})})]},e))})]})}function f(e){let{settings:t}=e,{setModalContent:r}=(0,i.d)();return(0,c.sA)()?(0,n.jsx)("div",{onClick:()=>{r((0,n.jsx)(d,{settings:t}),{transitionModal:!0,removeBorder:!0,showCloseButton:!1})},children:"Report"}):null}let p=e=>({label:(0,n.jsx)(f,{settings:e}),onClick(){}})},37182:function(e,t,r){"use strict";r.d(t,{H:function(){return o}});var n=r(85893),i=r(44746);function o(){return(0,i.sA)()?null:(0,n.jsx)(n.Fragment,{children:"Upgrade to Pro"})}},85604:function(e,t,r){"use strict";r.d(t,{F1:function(){return k},JW:function(){return w},RV:function(){return j},mv:function(){return _}});var n=r(85893),i=r(32478),o=r(29065),a=r(22795),s=r(37914),l=r(67294),u=r(64529),c=r(93123),d=r(70882),f=r(26863),p=r.n(f),h=r(24011),m=r(38372),g=r(86010),v=r(63518),y=r(96486),x=r.n(y);let b=[],w=(0,u.Ue)(e=>({toasts:b,addToast:x().throttle(t=>{e(e=>({toasts:[...e.toasts,{...t,id:(0,s.Y)(10)}]}))},1e3),closeToast:t=>{e(e=>({toasts:e.toasts.filter(e=>e.id!==t)}))},clearAllToasts:()=>{e(()=>({toasts:b}))}})),_=function(){let e=e=>t=>{let r=w.getState().addToast;if("string"==typeof t)return r({header:t,type:e});r({...t,type:e})},t=e=>w.getState().addToast(e);return t.error=e("error"),t.warning=e("warning"),t.info=e("info"),t.success=e("success"),t}();function j(e){let t=w.getState();return t.toasts.forEach(r=>e?e(r)?t.closeToast(r.id):void 0:t.closeToast(r.id))}let C=(0,h.L)("div",p().InnerToast);function k(){return(0,n.jsx)(E,{})}function E(){let{toasts:e}=w(),t=m.Z()?.preferences,r=(0,l.useMemo)(()=>e.filter(e=>!e.shouldShow||!t||e.shouldShow(t)),[e,t]),i=r.filter(e=>"top"===e.position),o=r.filter(e=>"top"!==e.position),[a,s]=(0,l.useState)(!1);(0,l.useEffect)(()=>{o.length||s(!1)},[o.length]);let u=w(e=>e.clearAllToasts),[d,f]=(0,l.useState)(0),h=(0,l.useCallback)(e=>{null===e?f(0):f(e.clientHeight||0)},[]),y=(0,l.useCallback)(()=>{s(!1),b.current?.scrollTo({top:0,behavior:"smooth"})},[]);function x(e){let{children:t,...r}=e;return(0,n.jsx)("button",{type:"button",className:"bg-[rgba(255,255,255,0.14)] hover:bg-[rgba(255,255,255,0.2)] border border-[rgba(255,255,255,0.12)] backdrop-blur-md float-right rounded-lg text-gray-5 px-2 py-1 mb-2 text-sm",style:{filter:"drop-shadow(0px 0px 16px rgba(0, 0, 0, 0.36)) drop-shadow(0px 0px 24px rgba(0, 0, 0, 0.36))"},...r,children:t})}(0,v.Z)("pai:canvas:movement",y);let b=(0,l.useRef)(null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:`fixed top-[66px] right-4 z-[${c.KN.TOASTS}] space-y-2`,children:i.map(e=>(0,n.jsx)(P,{toast:e},e.id))}),!!o.length&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:(0,g.Z)(`fixed items-end bottom-0 right-0 left-0 pr-4 z-[${c.KN.TOASTS}] ${a?"overflow-y-auto":"overflow-hidden"} flex flex-col transition-all duration-500`,p().ToastsScrollContainer),ref:b,style:{top:a?"66px":`calc(100vh - 36px - 16px - ${d}px)`},children:[(0,n.jsx)("div",{className:"flex-shrink h-full pointer-events-none"}),a?(0,n.jsx)("div",{className:`sticky top-0 right-0 z-[${c.KN.TOASTS+1}]`,children:(0,n.jsx)(x,{onClick:()=>u(),children:"Clear all"})}):o.length>1?(0,n.jsx)("div",{children:(0,n.jsx)(x,{onClick:()=>s(!0),children:"Show all"})}):null,(0,n.jsx)("div",{className:"pb-2 space-y-2",children:o.reverse().map((e,t)=>(0,n.jsx)(P,{callbackRef:0===t?h:void 0,toast:e},e.id))})]})})]})}let S={error:"var(--pai-error-red)",warning:"var(--pai-warning-yellow)",info:"#43414A",success:"#43414A"},N={error:(0,n.jsx)(o.Z,{}),warning:(0,n.jsx)(a.Z,{color:"var(--pai-warning-yellow)"}),info:(0,n.jsx)(n.Fragment,{}),success:(0,n.jsx)(function(){return(0,n.jsx)(d.Z,{color:"#4EEBC6",size:24})},{})};function P(e){let{toast:t,callbackRef:r}=e,o=t.icon??N[t.type],[a,s]=(0,l.useState)(!1),[u,c]=(0,l.useState)(!0),d=w(e=>e.closeToast),f=(0,l.useCallback)(()=>{s(!0),setTimeout(()=>{d(t.id)},500)},[d,t.id]),p=t.cta?(0,n.jsx)(L,{label:t.cta.label,onClick:()=>{t.cta?.onClick(),f()}}):null,h=(0,l.useMemo)(()=>!1===t.timeout?null:Date.now()+(t.timeout??5e3),[t.timeout]),[m,g]=(0,l.useState)(!1),[v,y]=(0,l.useState)(!1);(0,l.useEffect)(()=>{setTimeout(()=>{g(!0)},10)},[]),(0,l.useEffect)(()=>{if(!h)return;let e=setTimeout(()=>{v||f()},h-Date.now());return()=>{clearTimeout(e)}},[v,h,t.id,f]);let[x,b]=(0,l.useState)(0),_=(0,l.useCallback)(e=>{e&&(b(e.clientHeight),setTimeout(()=>c(!1),500)),r?.(e)},[r]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(C,{style:{borderColor:t.color||S[t.type],borderLeftWidth:"5px",width:t.width||void 0,marginBottom:`${a?-x-8:0}px`,transition:"margin-bottom 0.5s ease-in-out, transform 0.5s ease-in-out, opacity 0.5s ease-in-out"},className:`${u?"absolute right-4":""} transition-all ${t.body?"":"items-center"} flex ${m&&!a?"":"translate-x-full opacity-0"}`,onMouseOver:()=>{y(!0)},onMouseLeave:()=>{y(!1)},ref:_,"data-testid":"toast",children:[o,(0,n.jsxs)("div",{className:`flex justify-between w-full gap-x-2 ${t.body?"flex-col":""}`,children:[(0,n.jsx)("header",{className:"text-gray-10 font-pg-medium text-sm flex items-center",children:t.header}),t.body&&(0,n.jsxs)("div",{className:`flex ${"string"==typeof t.body&&t.body.length>90?"flex-col":""} items-end mt-1`,children:["string"==typeof t.body?(0,n.jsx)("p",{className:"text-gray-25 text-[13px] flex-grow",children:t.body}):(0,n.jsx)(n.Fragment,{children:t.body})," ",p]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[!t.body&&p,(0,n.jsx)("button",{className:`text-gray-50 cursor-pointer ${t.body?"absolute right-1 top-1":""}`,onClick:()=>f(),children:(0,n.jsx)(i.Z,{width:18})})]})]})]},t.id),u&&(0,n.jsx)("div",{style:{height:`${x?x-8:0}px`,transition:"height 0.5s ease-in-out"}})]})}function L(e){let{label:t,onClick:r}=e;return(0,n.jsx)("button",{className:"text-white font-pg-semibold text-sm flex-none",onClick:r,children:t})}},25478:function(e,t,r){"use strict";r.d(t,{QL:function(){return o},x6:function(){return i}});var n=r(67294);function i(e){let t=(function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}(e)/2147483647+1)/2;return{hsl:`hsl(${360*t}, 90%, 50%)`,hue:360*t,textColor:360*t<220?"black":"white"}}function o(e){return(0,n.useMemo)(()=>i(e),[e])}},99861:function(e,t,r){"use strict";r.d(t,{l:function(){return p}});var n=r(85893),i=r(92323),o=r(30286),a=r(67294),s=r(45789),l=r.n(s),u=r(32478);r(92890),r(51879);let c=[{title:"Create your first masterpiece",Body:e=>{let{close:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"Select a filter, set the frame size and type what you’d like to create. "}),(0,n.jsx)("button",{className:l().blocky,onClick:t,children:"Start creating"})]})},video:"https://cdn.playground.com/onboarding/General_Intro_High_Res.mp4"}],d=(0,o.K)(c.length);function f(){let[e,t]=(0,a.useReducer)(d,0),{closeModal:r}=(0,i.d)(),o=c[e];return(0,n.jsxs)("div",{"aria-modal":!0,className:"p-2 rounded-xl flex flex-col justify-center bg-gray-90 border border-gray-80",style:{width:"650px"},children:[(0,n.jsx)("button",{type:"button",className:"absolute top-4 right-4 rounded-full bg-gray-85 p-0.5 text-white z-10",onClick:()=>{r()},children:(0,n.jsx)(u.Z,{width:20,height:20})}),(0,n.jsx)("video",{className:"h-[370px] w-[100%] object-fill border border-gray-85 rounded-md bg-black",muted:!0,playsInline:!0,autoPlay:!0,loop:!0,children:(0,n.jsx)("source",{src:o.video,type:"video/mp4"})},o.title),(0,n.jsxs)("div",{className:`${l()["tip-body"]} text-gray-50 font-medium py-4 pt-5`,children:[(0,n.jsx)("h4",{className:"text-gray-5 text-base mb-2",children:o.title}),(0,n.jsx)(o.Body,{close:r})]})]})}function p(){let{setModalContent:e}=(0,i.d)();return()=>{e((0,n.jsx)(f,{}),{transitionModal:!0,showCloseButton:!1,removeBorder:!0,useBlurredBackground:!0})}}},37513:function(e,t,r){"use strict";var n=r(9669),i=r.n(n),o=r(85604),a=r(85944),s=r(63518),l=r(47435),u=r(17330),c=r(70328);class d{constructor(){this.expandedPromptsCache={}}static getInstance(){return d.instance||(d.instance=new d),d.instance}async getExpandedPrompt(e,t){let{prompt:r,mode:l}=t;if(this.expandedPromptsCache[e])return this.expandedPromptsCache[e];let u=new Promise((t,u)=>{i().post("/api/expand-prompt",{prompt:r,mode:l},{headers:{"Cache-Control":"no-cache"}}).then(r=>{r.data?.expandedPrompt?(this.expandedPromptsCache[e]=r.data.expandedPrompt,t(r.data.expandedPrompt)):u("No expanded prompt returned from server.")}).catch(t=>{if(t instanceof n.AxiosError)switch(delete this.expandedPromptsCache[e],t.response?.data?.errorCode){case"SAFETY_FILTER_PROMPT":(0,o.mv)({header:"Failed to expand prompt",type:"error",body:a.k.SAFETY_FILTER_PROMPT,timeout:!1,meta:{errorCode:t.response?.data?.errorCode}}),u(t);return;case"EXPAND_PROMPT_LIMIT_EXCEEDED":(0,s.K)("pai:expand-prompt:limit-exceeded"),(0,o.mv)({header:"Prompt expansion limit exceeded",type:"error",body:"You have exceeded your prompt expansion limit. Please try again later.",meta:{errorCode:t.response?.data?.errorCode}}),u(t);return;default:(0,o.mv)({header:"Error expanding prompt",body:"Please use a different prompt and try again.",type:"error"}),u(t)}u(t)})});return this.expandedPromptsCache[e]=u,u}async useFastRoughDraftImage(e){let t=c.c.getState();if(t.url){let r=await (0,l.d4)(t.url);e.settings.imageToImage={width:e.width,height:e.height,url:r},e.settings.startSchedule=1-u.N.getState().previewRenderImageStrength,e.settings.high_noise_frac=.75}return null}}let f=d.getInstance();t.Z=f},70328:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(64529),i=r(51879);let o=(0,n.Ue)(e=>({url:null,status:"idle",seed:(0,i.mZ)(),newSeed(){e(e=>({...e,seed:(0,i.mZ)()}))}}))},17330:function(e,t,r){"use strict";r.d(t,{N:function(){return a}});var n=r(64529),i=r(782);let o={shouldShowImageCards:!1,shouldShowHiddenImageAreas:!1,shouldShowMasksInAllStates:!1,shouldShowCropDebugOverlay:!1,forceTurbo:!1,previewRenderControlWeight:.2,previewRenderImageStrength:.1,previewRenderSteps:4,previewRenderQuality:25},a=(0,n.Ue)()((0,i.tJ)(e=>({...o,toggleShowImageCards:()=>e(e=>({shouldShowImageCards:!e.shouldShowImageCards})),toggleShowHiddenImageAreas:()=>e(e=>({shouldShowHiddenImageAreas:!e.shouldShowHiddenImageAreas})),toggleShowMasksInAllStates:()=>e(e=>({shouldShowMasksInAllStates:!e.shouldShowMasksInAllStates})),toggleShowCropDebugOverlay:()=>e(e=>({shouldShowCropDebugOverlay:!e.shouldShowCropDebugOverlay})),toggleForceTurbo:()=>e(e=>({forceTurbo:!e.forceTurbo})),setPreviewRenderControlWeight:t=>e(()=>({previewRenderControlWeight:t})),setPreviewRenderImageStrength:t=>e(()=>({previewRenderImageStrength:t})),setPreviewRenderSteps:t=>e(()=>({previewRenderSteps:t})),setPreviewRenderQuality:t=>e(()=>({previewRenderQuality:t}))}),{name:"pai-dev-mode-options",version:3,migrate:(e,t)=>(t<3&&"object"==typeof e&&e&&("previewRenderControlWeight"in e&&delete e.previewRenderControlWeight,"previewRenderImageStrength"in e&&delete e.previewRenderImageStrength),e)}))},79134:function(e,t,r){"use strict";var n,i;r.d(t,{Af:function(){return n},Dy:function(){return a},Hv:function(){return s},KO:function(){return l},Kw:function(){return u},M9:function(){return d},d8:function(){return c},q4:function(){return o}});let o="canvas-onboarding-completed",a="canvas-onboarding-eligible",s="disallow-private-images-on-free",l="disable-sd-1.5",u="enable-prompt-expansion-default",c="deprecate-canvas",d="old-models-deprecated-sep2024";(i=n||(n={})).GENERATED_IMAGE="GENERATED_IMAGE",i.PANNED_CANVAS="PANNED_CANVAS",i.ZOOMED_IN_CANVAS="ZOOMED_IN_CANVAS",i.ZOOMED_OUT_CANVAS="ZOOMED_OUT_CANVAS",i.GENERATED_WITH_FILTER="GENERATED_WITH_FILTER",i.OBJECT_ERASER="OBJECT_ERASER",i.REMOVE_BACKGROUND="REMOVE_BACKGROUND",i.BATCH_GENERATION="BATCH_GENERATION",i.IMAGE_TO_IMAGE="IMAGE_TO_IMAGE",i.OUTPAINTING="OUTPAINTING"},41752:function(e,t,r){"use strict";r.d(t,{Le:function(){return f},Vw:function(){return d},a5:function(){return m},bJ:function(){return h},dW:function(){return c},uh:function(){return p}});var n=r(73800),i=r(66144),o=r(64529),a=r(8891),s=r.n(a),l=r(51879);let u={active:!1,images:[],downloadLoading:!1,deleteLoading:!1,setPrivacyLoading:!1},c=(0,o.Ue)((e,t)=>({...u,setActive:t=>e({active:t}),select:t=>e(e=>({images:[...e.images,t]})),selectAll:t=>e({images:t}),isSelected:e=>t().images.some(t=>t.id===e),deselect:t=>{e(e=>({images:e.images.filter(e=>e.id!==t)}))},reset:()=>e({...u}),delete:()=>v(t().images),download:e=>g(t().images,e),setPrivacy:e=>y(t().images,e)})),d=e=>c(t=>t.images.some(t=>t.id===e)),f=()=>c(e=>e.images.length),p=()=>c(e=>e.downloadLoading),h=()=>c(e=>e.deleteLoading),m=()=>c(e=>e.setPrivacyLoading),g=async(e,t)=>{if(s().track("Bulk download",{numImages:e.length}),e.length>l.gF){t(`You can only download ${l.gF} images at a time. Please select fewer and try again.`);return}c.setState({downloadLoading:!0}),fetch("/api/download",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({images:e})}).then(e=>{if(!e.ok||!e.body)throw Error("Failed to download");let t=e.body.getReader();return new ReadableStream({start:e=>(function r(){return t.read().then(t=>{let{done:n,value:i}=t;if(n){e.close();return}return e.enqueue(i),r()})})()})}).then(e=>new Response(e)).then(e=>e.blob()).then(e=>{(0,n.Sv)("images.zip",e)}).catch(e=>console.error(e)).finally(()=>{c.setState({downloadLoading:!1})})},v=async e=>{s().track("Bulk delete",{numImages:e.length}),c.setState({deleteLoading:!0});let t=e.map(e=>e.id);await (0,i.xR)(t).finally(()=>c.setState({deleteLoading:!1})),c.getState().reset()},y=async(e,t)=>{s().track("Bulk image udpate",{private:t,numImages:e.length}),c.setState({setPrivacyLoading:!0});let r=e.map(e=>e.id);await (0,i.Wg)(r,t).finally(()=>c.setState({setPrivacyLoading:!1})),c.getState().reset()}},93123:function(e,t,r){"use strict";var n,i;r.d(t,{H$:function(){return a},KN:function(){return n},SH:function(){return l},aU:function(){return o},on:function(){return s}}),(i=n||(n={}))[i.DEVELOPER_BAR=100]="DEVELOPER_BAR",i[i.TUTORIAL_IMAGE_HINT=101]="TUTORIAL_IMAGE_HINT",i[i.PRESENCE_CURSORS=104]="PRESENCE_CURSORS",i[i.COMMENT_MINIMIZED=104]="COMMENT_MINIMIZED",i[i.FEEDBACK_BUTTON=104]="FEEDBACK_BUTTON",i[i.BRUSH_DIAMETER_HINT=105]="BRUSH_DIAMETER_HINT",i[i.PROMPT_BOX=105]="PROMPT_BOX",i[i.GENERATION_FRAME_LABEL=110]="GENERATION_FRAME_LABEL",i[i.TOP_BAR_SUBBAR=110]="TOP_BAR_SUBBAR",i[i.BACKGROUND_REMOVING_BG=114]="BACKGROUND_REMOVING_BG",i[i.COPY_DOWNLOAD_BUTTONS=115]="COPY_DOWNLOAD_BUTTONS",i[i.CROP_FRAME_POPOVER=115]="CROP_FRAME_POPOVER",i[i.BACKGROUND_REMOVING_TEXT=115]="BACKGROUND_REMOVING_TEXT",i[i.GENERATION_FRAME_LOADING=119]="GENERATION_FRAME_LOADING",i[i.CANVAS_DISABLED=120]="CANVAS_DISABLED",i[i.CANVAS_VIDEO_TUTORIAL=120]="CANVAS_VIDEO_TUTORIAL",i[i.FILTER_SELECTION_GRID=120]="FILTER_SELECTION_GRID",i[i.DEVELOPER_BAR_MENU=120]="DEVELOPER_BAR_MENU",i[i.ADVANCED_SETTINGS=120]="ADVANCED_SETTINGS",i[i.TOP_BAR_TOOLBAR=120]="TOP_BAR_TOOLBAR",i[i.COMMENT_OPENED=119]="COMMENT_OPENED",i[i.SELECT_POPOVER=140]="SELECT_POPOVER",i[i.READONLY_COLLAB_NOTICE=140]="READONLY_COLLAB_NOTICE",i[i.FEED_IMAGE_MODAL=149]="FEED_IMAGE_MODAL",i[i.DROPDOWN_MENU=150]="DROPDOWN_MENU",i[i.IMAGE_CROP_SHADOW=151]="IMAGE_CROP_SHADOW",i[i.IMAGE_CROP_DRAGGABLE=152]="IMAGE_CROP_DRAGGABLE",i[i.IMAGE_CROP_OVERLAY=153]="IMAGE_CROP_OVERLAY",i[i.DEBUG_IMAGE_LABELS=154]="DEBUG_IMAGE_LABELS",i[i.PAST_DUE_BANNER=200]="PAST_DUE_BANNER",i[i.RB_ENUM_SELECT=999]="RB_ENUM_SELECT",i[i.TOASTS=1e3]="TOASTS";let o="canvas-left-sidebar",a="canvas-right-sidebar",s=16,l={min:[256,256],max:[1024,1024]}},3435:function(e,t,r){"use strict";r.d(t,{o:function(){return d}});var n=r(85893),i=r(67294),o=r(73800),a=r(94670),s=r(62363),l=r(8891),u=r.n(l),c=r(38372);function d(e){let{prompt:t,url:r,imageOwnerUserId:l,...d}=e,f=c.Z()?.id,p=(0,i.useCallback)(async e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.preventDefault(),d.onClick?.(e),(0,o.ZP)({url:r,prompt:t}),u().track("Downloaded image",{from:"image card",imageCreatorId:l,isOwnImage:l===f})},[l,t,d,r,f]);return(0,n.jsx)("div",{"data-testid":"download-button","aria-label":"Download",...d,className:`pointer-events-auto ${d.className??""}`,onClick:p,children:(0,n.jsx)(a.u,{label:"Download",color:"white",children:(0,n.jsx)("button",{type:"button",className:"blurry-button circle",children:(0,n.jsx)(s.$L,{})})})})}},39854:function(e,t,r){"use strict";r.d(t,{F:function(){return E}});var n=r(85893),i=r(55799),o=r.n(i),a=r(67294),s=r(11320),l=r(2291),u=r(3225),c=r(41664),d=r.n(c),f=r(11163),p=r(31630),h=r(66144),m=r(94670),g=r(38372),v=r(33554);function y(e){let{onClick:t,authorId:r}=e,i=(0,g.Z)(),o=(0,f.useRouter)(),a=i?.id&&r===i.id&&o.query.id===i.id,s=i?.role==="ADMIN",l="/profile/[id]"===o.pathname;return s&&!a&&l||a?(0,n.jsx)(m.u,{label:"Delete",color:"white",placement:"top",children:(0,n.jsx)("div",{className:"blurry-button circle text-white hover:text-[#f24949] transition-all p-1.5",style:{pointerEvents:"auto"},"aria-label":"Delete Image",onClick:e=>{e.stopPropagation(),e.preventDefault(),t()},children:(0,n.jsx)(v.X,{height:16,width:16})})}):null}var x=r(82231),b=r(3435),w=r(41752),_=r(31941),j=r(26085),C=r(81810),k=r(1233);function E(e){var t;let{id:r,prompt:i,url:u,url_jpeg:c,user:d,title:m,numLikes:y,isLiked:b,isPrivate:_,createdAt:j,onClick:C,hideImage:E=!1,fromCanvas:L,setHidden:T,forceVisible:O,fit:R="fill",parent_image_url:A=null,showPrompt:I,width:M,height:D,...F}=e,[z,B]=(0,a.useState)(O),U=(0,g.Z)(),V=(0,a.useRef)(null),$=(0,s.Z)(V,{threshold:.2});$&&$.isIntersecting&&!z&&B(!0);let H=I?i:"",Z=!!A&&!!H,W=(0,f.useRouter)(),q=Z?"":(0,x.G)(H),{toasts:G,addToast:Y,editToast:K}=(0,p.vj)(),[X,J]=(0,a.useState)(!1),Q=U?.role==="ADMIN"&&d.id!==U.id,[ee,et]=(0,a.useState)(!1),er=async()=>{T?.(!0,[r]);let e=(e,t)=>{e.onClearTimeout&&clearTimeout(e.onClearTimeout),T?.(!1,t)},t=G.find(e=>"delete-image-profile"===e.id);if(t){let n=t.meta.count||1,i=[...G.map(e=>e.meta.imageIds).flat(),r];K("delete-image-profile",{title:`Removed ${n+1} images`,onClear(){(0,h.xR)(i,Q)},onPress(t){e(t,i)},meta:{imageIds:[...t.meta.imageIds||[],r],count:n+1}})}else Y(Q?"Removed + reported image":"Removed image",{onClear(){(0,h.ao)(r,Q)},onPress(t){e(t,[r])},meta:{imageIds:[r],count:1},icon:(0,n.jsx)(v.X,{}),id:"delete-image-profile",button:"Undo"})},en=U?.id&&d.id===U.id&&W.query.id===U.id,ei=U?.id&&d.id===U.id,eo=_&&!ei&&U?.role==="ADMIN",ea=(0,l._)(y,b),es=(0,w.dW)(e=>e.active),el=(0,w.Vw)(r),[eu,ec]=(0,a.useMemo)(()=>{let e=0,t=0;return el&&(F.aspectRatio>=1?(e=36,t=36/F.aspectRatio):(e=36*F.aspectRatio,t=36)),[e,t]},[el,F.aspectRatio]),ed=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,k.cn)("transition-all duration-150 ease-in-out inline-block overflow-hidden","h-full w-full image-card-grid"),style:{paddingTop:ec,paddingBottom:ec,paddingLeft:eu,paddingRight:eu},children:(0,n.jsx)("img",{id:`grid-image-${r}`,style:{aspectRatio:`${F.aspectRatio}`,objectFit:R},className:(0,k.cn)("rounded-pg-base h-full w-full"),fetchpriority:F.highFetchPriority?"high":"auto",width:M??void 0,height:D??void 0,src:c??u,alt:`${H}`,loading:F.highFetchPriority?"eager":"lazy",onLoad:()=>{J(!0)}})}),(0,n.jsx)("div",{className:"flex justify-end w-full pointer-events-none absolute z-[4] right-2 top-2",children:(0,n.jsx)("span",{className:"bg-black/60 hover:scale-110 origin-top-right transition-transform rounded-md backdrop-blur-md pointer-events-auto",children:X&&(0,n.jsx)(l.d,{id:r,inCard:!0,likeButtonState:ea,className:"px-2.5"})})}),ee&&!es&&(0,n.jsx)(P,{likeButtonState:ea,hasLoaded:X,hideImage:E,shouldShowDownloadButton:en,user:d,url:u,fromCanvas:L,prompt:H,id:r,title:m,defaultTitle:q,isPrivate:_,cancelOrDeleteImage:er}),es&&(0,n.jsx)(N,{id:r})]});return(0,n.jsx)("div",{id:`image-${r}`,className:`flex flex-col items-center rounded-lg select-none ${eo?"sharp-orange-shadow":""}`,style:(t="style",Object.prototype.hasOwnProperty.call(F,t))?F.style:{},onMouseEnter:()=>{et(!0)},onFocus:()=>{et(!0)},onMouseLeave:()=>{et(!1)},onBlur:()=>{et(!1)},children:es?(0,n.jsx)("div",{ref:V,onClick:C,className:(0,k.cn)(`${o().image} transition-all image-card-grid ${z?"":"md:opacity-0"}`,"h-full w-full"),style:{background:el?"rgba(104, 88, 245, 0.16)":"transparent"},children:ed}):(0,n.jsx)(S,{onClick:C,visible:z,intersectionRef:V,id:r,image:{title:m,prompt:H,id:r,createdAt:j},router:W,children:ed})})}let S=e=>{let{onClick:t,visible:r,intersectionRef:i,id:a,image:s,router:l,children:u}=e;return(0,n.jsx)(d(),{scroll:!1,as:`/post/${(0,C.Td)(s)}`,href:{query:{postId:a,...l.query.id?{id:l.query.id}:{},...l.query.categoryId?{categoryId:l.query.categoryId}:{}}},prefetch:!1,shallow:!0,"aria-label":"Open image modal",ref:i,onClick:t,className:`${o().image} transition-all image-card-grid ${r?"":"md:opacity-0"}`,style:{transitionDelay:`${.1*Math.random()}s`},children:u})};function N(e){let{id:t}=e,r=(0,w.Vw)(t);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:(0,k.cn)(`${o().select__overlay} max-sm:hidden max-h-full`,(0,w.uh)()&&"cursor-none",r&&"border-solid border-[1px] border-purple-primary1"),children:r?(0,n.jsx)(j.Z,{}):(0,n.jsx)(_.Z,{})})})}function P(e){let{hideImage:t,id:r,isPrivate:i,likeButtonState:s,prompt:l,shouldShowDownloadButton:c,fromCanvas:d,title:f,url:p,defaultTitle:h,user:g,cancelOrDeleteImage:v}=e,[x,w]=(0,a.useState)(!1);return(0,a.useLayoutEffect)(()=>{requestAnimationFrame(()=>{w(!0)})},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:(0,k.cn)(`${o().image__overlay} max-sm:hidden ${x?"hover:opacity-100":"opacity-0"} max-h-full`,"rounded-pg-base h-full w-full"),children:[(0,n.jsxs)("div",{className:`${t&&!c?"justify-end":"justify-between"} items-center flex mt-1 pl-1`,children:[t?null:(0,n.jsx)("span",{className:"truncate",children:(0,n.jsxs)("a",{href:`/profile/${g.id}`,onClick:e=>e.stopPropagation(),className:"author-avatar truncate flex items-center whitespace-normal text-base text-white font-bold gap-2 pointer-events-auto",children:[(0,n.jsx)("img",{className:"rounded flex-none",src:g?.avatar||"/avatar.svg",alt:`${g.name} avatar`,width:"25px",height:"25px",referrerPolicy:"no-referrer"}),(0,n.jsx)("span",{className:"truncate",children:g.name})]})}),c&&(0,n.jsxs)("div",{className:"flex flex-row",children:[(0,n.jsx)(b.o,{prompt:l,url:p,imageOwnerUserId:g.id,className:"text-white"}),i&&(0,n.jsx)(m.u,{label:"Private",children:(0,n.jsx)("div",{className:"ml-0.5 w-9 h-9 align-center flex",style:{pointerEvents:"auto"},children:(0,n.jsx)(u.Z,{stroke:"white",width:16,height:16,className:"m-auto"})})})]})]}),(0,n.jsx)("div",{className:`${o().image__overlay_description} `,children:(0,n.jsxs)("div",{className:"flex justify-between items-end",children:[(0,n.jsxs)("div",{className:"flex-grow pl-2 overflow-hidden",children:[d&&(0,n.jsx)("span",{className:"border inline-block mb-2 border-high bg-white/[0.16] backdrop-blur font-semibold h-[30px] text-white/90 rounded-md text-sm px-2.5 pt-1",children:"Made in Canvas"}),(0,n.jsx)("h4",{className:`text-white text-left font-bold ${!l||d?"mb-2":""}`,children:f??h}),!d&&(0,n.jsx)("p",{className:"w-full text-white line-clamp-4",children:l})]}),(0,n.jsx)("div",{className:`${i?"w-14":"w-8"} flex-none`,children:(0,n.jsx)("div",{className:"absolute bottom-3 right-3 flex items-center",children:(0,n.jsx)(y,{onClick:v,authorId:g.id})})})]})})]})})}},51806:function(e,t,r){"use strict";r.d(t,{Z:function(){return x}});var n=r(85893),i=r(73800),o=r(8891),a=r.n(o),s=r(67294),l=r(85931),u=r(92323),c=r(71013),d=r(5655),f=r(5787),p=r(1604),h=r(47435),m=r(27042),g=r(95995);async function v(e,t,r){let n=e.url??e.url_jpeg;n.startsWith("data:image/")&&(n=null);let i=await fetch(`/api/images/${t}/${e.id}`,{method:"POST",body:JSON.stringify(n?{url:n}:{}),signal:r.signal}),o=await i.json();if(o.errorCode)throw Error(o.errorCode);if(o.error)throw Error(o.error);return o.url}async function y(e,t){let r=e.url??e.url_jpeg,n=r.startsWith("data:image/")?r:await (0,h.d4)(r),i=await (0,h.Wv)(n),o=JSON.stringify({url:n,width:i.width,height:i.height,scale:4,prompt:e.prompt}),a=await fetch("/api/models/v2/gen-upscale",{method:"POST",body:o,headers:{"Content-Type":"application/json"},signal:t.signal}).catch(()=>null);if(!a||!a.ok){let e=await a?.json().catch(()=>null);if(e?.errorCode)throw console.error(e),Error(e.errorCode);throw Error("Creative upscaler failed with an unknown error.")}let s=await a.json().catch(()=>null),l=p.z.object({images:p.z.array(p.z.string()).min(1).max(1)}).safeParse(s);if(!l.success)throw Error("API returned no valid images");return l.data.images[0]}function x(e){let{image:t,title:r,apiPath:o,eventName:p}=e,{closeModal:h}=(0,u.d)(),[x,b]=(0,s.useState)(null),{setModalContent:w}=(0,u.d)(),[_,j]=(0,s.useState)("loading"),[C,k]=(0,s.useState)(null),[E,S]=(0,s.useState)(null),N=(0,s.useCallback)(async()=>{j("loading");let e=new AbortController;try{b(e),a().track(p);let r="gen-upscale"===o?await y(t,e):await v(t,o,e);k(null),S(r),j("completed")}catch(t){if(e.signal.aborted)return;a().track("Error while enhancing image",{type:o,error:t}),["IMAGE_ENHANCEMENT_LIMIT_REACHED","CREATIVE_UPSCALE_LIMIT_EXCEEDED"].includes(t.message)?("upscale"===o||"gen-upscale"===o||"restore-face"===o)&&w((0,n.jsx)(c.Y,{closeModal:h,type:o})):k(t.message??t?.toString?.()??"An unknown error occurred"),j("error")}},[t,p,o,w,h]);(0,f.Z)(()=>{N()});let P=(0,g.gw)(t.url_jpeg??t.url),L="gen-upscale"===o||"upscale"===o;return(0,n.jsxs)("div",{className:"lg:min-w-[400px] max-w-[90vw]",children:[L&&E?(0,n.jsx)("div",{className:"h-[80vh] max-h-[550px] flex flex-col justify-center items-center",style:{aspectRatio:P[0]/P[1]},children:(0,n.jsx)(m.U,{left:t.url_jpeg??t.url,right:E,className:"flex-grow"})}):(0,n.jsx)("img",{src:E??t.url_jpeg??t.url,className:"object-contain max-h-[550px] mx-auto",alt:t.prompt}),"loading"===_&&(0,n.jsx)("div",{className:"-mt-3.5",children:(0,n.jsx)(l.Z,{estimatedTime:"gen-upscale"===o?function(e){let t=2*e;return t<=1024?8e3:4e3*(1+Math.pow(Math.ceil(t/896),2))}(t.meta?.options?.width??1024):1e4+Math.sqrt("meta"in t&&t.meta?.options?.width||0)})}),(0,n.jsxs)("div",{className:"p-4 gap-y-4 relative",children:["loading"===_&&(0,n.jsx)("p",{onClick:N,className:"w-full text-white font-bold text-center py-3",children:r}),"loading"===_&&["upscale","restore-face"].includes(o)&&(0,n.jsx)("div",{className:"absolute right-2 top-1",children:(0,n.jsx)(d.y,{apiType:o})}),C&&(0,n.jsxs)("div",{className:"border-pai-error-red border bg-pai-error-red/10 text-gray-10 max-w-[400px] mx-auto rounded-md p-2 px-4 text-sm",children:[(0,n.jsx)("p",{children:"Couldn't enhance image. Please contact support if this continues"}),(0,n.jsxs)("details",{"aria-label":"Error",className:"flex justify-center text-gray-50",children:[(0,n.jsx)("summary",{children:"View error"}),(0,n.jsx)("p",{className:"font-mono text-xs",children:C})]})]}),"completed"===_&&(0,n.jsx)("button",{title:"Download",onClick:()=>{(0,i.ZP)({prompt:t.prompt,seed:t.seed,url:E})},className:"holographic-button",children:"Download"}),(0,n.jsx)("button",{onClick:()=>{h(),"loading"===_&&x.abort()},className:"text-white text-center rounded-md w-full border border-transparent hover:border-white/10 py-3 mt-4",children:"loading"===_?"Cancel":"Close"})]})]})}},39371:function(e,t,r){"use strict";r.d(t,{k:function(){return e_},Z:function(){return ew}});var n=r(85893),i=r(66144),o=r(50429),a=r(33299),s=r(9008),l=r.n(s),u=r(41664),c=r.n(u),d=r(11163),f=r(67294),p=r(53778),h=r.n(p),m=r(96486),g=r.n(m),v=r(51879),y=r(46302),x=r(57718),b=r(48247),w=r(68364);function _(){let[e,t]=(0,f.useState)(!1);return(0,n.jsx)("button",{className:"playground-button subtle",onClick:()=>{if((0,x.b)("(min-width: 768px)"))navigator.clipboard.writeText(window.location.href),t(!0),setTimeout(()=>{t(!1)},2e3);else try{navigator.share({url:window.location.href}).catch(()=>{})}catch(e){console.error(e),navigator.clipboard.writeText(window.location.href)}},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.Z,{className:"md:hidden flex gap-2 text-gray-50"}),(0,n.jsx)("span",{className:"md:hidden flex gap-2 text-gray-50",children:"Share"}),e?(0,n.jsx)("span",{className:"scale-75 hidden md:flex",children:(0,n.jsx)(b.Z,{width:24,height:24})}):(0,n.jsx)(w.Z,{className:"hidden md:flex"})," ",(0,n.jsx)("span",{className:"hidden md:flex gap-x-0.5",children:"Copy link"})]})})}function j(e){let{text:t}=e,r=(function(e,t){let r=[],n="",i=e.split("");for(let e=0;e<i.length;e++){let o=i[e];if(t.includes(o)){r.push({text:n.trim(),separator:o}),n="";continue}n=n.concat(o)}return n.length>0&&r.push({text:n.trim(),separator:""}),r})(t,[",","|"]).filter(e=>e.text.length>0),i=r.map((e,t,i)=>{let o=`/search?${new URLSearchParams({q:e.text}).toString()}`,a=(0,n.jsx)(c(),{href:o,className:"tokenized-text-view-tag",children:e.text});if(t+1===i.length)return(0,n.jsx)("p",{className:"!leading-[20px] inline",children:a},`${e}.${t}`);{let i=r[t].separator;return(0,n.jsxs)("p",{className:"inline",children:[a,"|"==i?(0,n.jsx)(n.Fragment,{children:"\xa0|"}):","==i?(0,n.jsx)(n.Fragment,{children:","}):(0,n.jsx)(n.Fragment,{}),(0,n.jsx)(n.Fragment,{children:"\xa0"})]},`${e}.${t}`)}});return(0,n.jsx)(n.Fragment,{children:i})}var C=r(73800);function k(e){let{image:t}=e;return t&&t.id?(0,n.jsxs)(c(),{href:`/post/${t.id}`,className:"playground-button w-fit mt-1",style:{paddingLeft:3,paddingTop:3,paddingBottom:3,paddingRight:7},target:"_blank",children:[(0,n.jsx)("img",{src:t.url??"",alt:""}),(0,n.jsx)("div",{className:"sr-only",children:"Inspired from"}),(0,n.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M9.13086 7.03711V1.4707C9.13086 1.29492 9.07617 1.15234 8.9668 1.04297C8.86133 0.929688 8.7168 0.873047 8.5332 0.873047H2.96094C2.79297 0.873047 2.6543 0.929688 2.54492 1.04297C2.43555 1.15234 2.38086 1.28125 2.38086 1.42969C2.38086 1.57812 2.4375 1.70703 2.55078 1.81641C2.66406 1.92188 2.79492 1.97461 2.94336 1.97461H4.90039L7.43164 1.89258L6.41211 2.78906L1.0332 8.17383C0.916016 8.29492 0.857422 8.42773 0.857422 8.57227C0.857422 8.66992 0.884766 8.76367 0.939453 8.85352C0.994141 8.93945 1.06445 9.00977 1.15039 9.06445C1.23633 9.11914 1.33203 9.14648 1.4375 9.14648C1.58594 9.14648 1.7168 9.08984 1.83008 8.97656L7.21484 3.5918L8.12305 2.57227L8.02344 4.99805V7.06055C8.02344 7.20898 8.07617 7.33984 8.18164 7.45312C8.29102 7.56641 8.42188 7.62305 8.57422 7.62305C8.72656 7.62305 8.85742 7.56836 8.9668 7.45898C9.07617 7.3457 9.13086 7.20508 9.13086 7.03711Z",fill:"#899CFF"})})]}):null}var E=r(31630);function S(){return(0,n.jsx)("button",{className:" playground-button subtle !py-[7.5px] !pl-[10px]",type:"button",children:(0,n.jsxs)("svg",{"data-testid":"geist-icon",fill:"none",height:"16",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"16",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"1",fill:"currentColor"}),(0,n.jsx)("circle",{cx:"19",cy:"12",r:"1",fill:"currentColor"}),(0,n.jsx)("circle",{cx:"5",cy:"12",r:"1",fill:"currentColor"})]})})}var N=r(38372),P=r(54451),L=r.n(P),T=r(2113),O=r(86010);function R(e){let{id:t}=e,[r,i]=(0,f.useState)(!1),o=(0,E.T1)(),a=(0,N.Z)(),s=async()=>{let e=e=>{o(e||"Error reporting image. Please try again later.",{time:3e3}),i(!1)};i(!0);try{let r=new URL("/api/images/report",window.location.origin);r.searchParams.set("id",t);let n=await fetch(r,{method:"POST"});if(!n.ok){e(await n.text());return}o("Image reported",{time:3e3})}catch(t){console.error(t.message),e()}i(!1)};return a?(0,n.jsxs)(T.ck,{onClick:s,disabled:r,className:(0,O.Z)(L().Item,L().danger,"text-dark-pink"),children:[(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M5.33398 14.1328C5.48242 14.1328 5.61719 14.0938 5.73828 14.0156C5.86328 13.9414 6.01562 13.8262 6.19531 13.6699L8.10547 11.9766H11.5566C12.1074 11.9766 12.5742 11.877 12.957 11.6777C13.3398 11.4746 13.6289 11.1816 13.8242 10.7988C14.0234 10.416 14.123 9.95117 14.123 9.4043V5.13281C14.123 4.58594 14.0234 4.12109 13.8242 3.73828C13.6289 3.35547 13.3398 3.0625 12.957 2.85938C12.5742 2.65625 12.1074 2.55469 11.5566 2.55469H4.44922C3.89844 2.55469 3.43164 2.65625 3.04883 2.85938C2.66602 3.05859 2.375 3.35156 2.17578 3.73828C1.97656 4.12109 1.87695 4.58594 1.87695 5.13281V9.4043C1.87695 9.95117 1.97656 10.418 2.17578 10.8047C2.37891 11.1875 2.66992 11.4785 3.04883 11.6777C3.43164 11.877 3.89258 11.9766 4.43164 11.9766H4.67773V13.3828C4.67773 13.6094 4.73438 13.791 4.84766 13.9277C4.96094 14.0645 5.12305 14.1328 5.33398 14.1328ZM5.58594 13.0078V11.4199C5.58594 11.2598 5.55078 11.1465 5.48047 11.0801C5.41406 11.0137 5.30273 10.9805 5.14648 10.9805H4.47266C3.92969 10.9805 3.52734 10.8457 3.26562 10.5762C3.00781 10.3066 2.87891 9.91016 2.87891 9.38672V5.15039C2.87891 4.62695 3.00781 4.23047 3.26562 3.96094C3.52734 3.69141 3.92969 3.55664 4.47266 3.55664H11.5332C12.0762 3.55664 12.4785 3.69141 12.7402 3.96094C13.002 4.23047 13.1328 4.62695 13.1328 5.15039V9.38672C13.1328 9.91016 13.002 10.3066 12.7402 10.5762C12.4785 10.8457 12.0762 10.9805 11.5332 10.9805H8.05859C7.89453 10.9805 7.76172 10.998 7.66016 11.0332C7.5625 11.0684 7.45898 11.1445 7.34961 11.2617L5.58594 13.0078ZM8.00586 8.22656C8.30273 8.22656 8.45508 8.07227 8.46289 7.76367L8.54492 4.96289C8.54883 4.80664 8.49805 4.67969 8.39258 4.58203C8.28711 4.48047 8.15625 4.42969 8 4.42969C7.83984 4.42969 7.70898 4.47852 7.60742 4.57617C7.50586 4.67383 7.45703 4.80078 7.46094 4.95703L7.53711 7.76367C7.54492 8.07227 7.70117 8.22656 8.00586 8.22656ZM8.00586 10.043C8.17773 10.043 8.32422 9.98633 8.44531 9.87305C8.57031 9.75977 8.63281 9.61914 8.63281 9.45117C8.63281 9.2832 8.57031 9.14258 8.44531 9.0293C8.32422 8.91602 8.17773 8.85938 8.00586 8.85938C7.83398 8.85938 7.6875 8.91797 7.56641 9.03516C7.44531 9.14844 7.38477 9.28711 7.38477 9.45117C7.38477 9.61523 7.44531 9.75586 7.56641 9.87305C7.69141 9.98633 7.83789 10.043 8.00586 10.043Z",fill:"#FF4D88"})}),"Report image"]}):null}var A=r(82231),I=r(9669),M=r.n(I),D=r(8891),F=r.n(D);function z(e){let{isFollowing:t,userId:r,handleFollow:i,handleUnfollow:o,showBasicUI:s,source:l}=e,u=(0,a.useSession)(),[c,p]=(0,f.useState)(!0),h=async()=>{p(!1),i&&i(),await M().post("/api/friendships/create",{userId:r}),F().track("Followed another user",{source:l})},m=async()=>{o&&o(),await M().post("/api/friendships/unfollow",{userId:r}),F().track("Unfollowed another user",{source:l})},g=(0,d.useRouter)(),v=async()=>{if("unauthenticated"===u.status){g.push("/login");return}await (t?m():h())};return u.data?.user.id===r?null:(0,n.jsx)("button",{type:"button",onClick:v,onMouseLeave:()=>{p(!0)},className:s?`follow-button base short ${t?`${c?"hover-danger":""} selected`:"blue"} group w-[76px] flex-none`:"profile__header_frienship_button w-full block ",children:s?(0,n.jsx)(n.Fragment,{children:t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:c?"group-hover:hidden":"",children:"Following"}),(0,n.jsx)("span",{className:c?"group-hover:block hidden":"hidden",children:"Unfollow"})]}):(0,n.jsxs)("p",{className:"flex items-center justify-center gap-x-1 -ml-0.5",children:[(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M7 2.91699V11.0837",stroke:"#8571FF",strokeWidth:"1.29167",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2.9165 7H11.0832",stroke:"#8571FF",strokeWidth:"1.29167",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("span",{children:"Follow"})]})}):t?"Unfollow":"Follow"})}var B=r(62363),U=r(2291);function V(e){let{value:t,onChange:r,className:i,onKeyDown:o}=e,a=(0,f.useRef)(null);return(0,f.useLayoutEffect)(()=>{setTimeout(()=>{let e=a.current?.scrollHeight;e&&(a.current&&0===a.current.value.length?a.current.style.height="45px":a.current.style.height=`${e+2}px`)},0)},[]),(0,n.jsx)("textarea",{ref:a,onInput:e=>{let t=e.currentTarget.scrollHeight;0===e.currentTarget.value.length?e.currentTarget.style.height="45px":e.currentTarget.style.height=`${t+2}px`},value:t,onChange:r,onKeyDown:o,style:{height:"45px"},placeholder:"Enter a title...",className:i})}var $=r(54167),H=r(39854);function Z(){let{similarImages:e,similarImagesState:t}=(0,$.g)(),r="loading"===t;return(0,n.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-4",children:Array(v.Oq).fill(null).map((t,i)=>{let o=e?.[i],a=i<3?"lg:col-span-4":"lg:col-span-3";return o?(0,n.jsx)("div",{style:{maxWidth:`${o.width}px`,maxHeight:`${o.height}px`},className:`relative rounded-md overflow-hidden aspect-square ${a}`,children:(0,n.jsx)("div",{className:"absolute inset-0",children:(0,n.jsx)(H.F,{...o,showPrompt:!0,numLikes:o.likeCount||0,isLiked:o.userLiked||!1,url:o.url_jpeg??o.url,createdAt:o.createdAt,user:{avatar:o.user.image,id:o.user.id,name:o.user.displayName},onClick:()=>{let e=document.getElementsByClassName("ReactModal__Content");e.length>0&&e[0].scrollTo(0,0)},aspectRatio:1,isPrivate:!1,fit:"cover"})})},o.id):(0,n.jsx)("div",{className:`rounded-md transition-colors ${r?"bg-gray-400/10":"bg-gray-600/10"} col-span-2 aspect-square ${a} ${r?"animate-borders-pulse":"hidden lg:block"}`},i)})})}var W=r(10443),q=r(2641),G=r(62080),Y=r(63518),K=r(49325),X=function(e){let{image:t}=e,r=(0,E.T1)();if(!K.t5.useUserHasPermission("moderation:images:reports")||!("share_status"in t))return null;let i="HIDE_FROM_FEEDS"===t.share_status,o=async()=>{(await fetch(`/api/admin/image?id=${t.id}&action=${i?"unhide_from_feeds":"hide_from_feeds"}`,{method:"POST"})).ok?r(`Image ${i?"unhidden":"hidden"} from feeds`):r(`Error ${i?"unhiding":"hiding"} image`)};return(0,n.jsx)(T.ck,{className:(0,O.Z)(L().Item,"group hover:text-orange-500"),onClick:()=>{o()},children:i?"Unhide from feeds":"Hide from feeds"})},J=r(79408),Q=r(42796),ee=r(19311),et=function(e){let{isPrivate:t,updateImagePrivacy:r,canEditImage:i,id:o}=e,a=(0,E.T1)(),s=K.t5.useUserHasPermission("moderation:images:private"),l=(0,ee.Z)(),u=!t&&!l;return i||s?(0,n.jsx)(Q._,{open:!!u&&void 0,label:"This feature is only available to Pro users",mixpanelKey:"Change Privacy (Image Post)",alignOffset:-25,sideOffset:10,children:(0,n.jsxs)(T.ck,{disabled:!!u,"data-cy":"change-privacy-button",onClick:async()=>{s&&!i?(await (0,J.privatizeReportedImage)(o,"Privatized from image modal")).ok?a("Image privatized + report created."):a("Error privatizing image."):r(!t)},className:L().Item,children:[t?(0,n.jsx)(B.Sl,{width:16}):(0,n.jsx)(B.cu,{}),"Make ",t?"Public":"Private"]})}):null},er=r(11923),en=r(59820),ei=r(92323),eo=r(9695),ea=r(30282);function es(e){let{id:t}=e,{data:r,isLoading:i,error:o}=(0,en.ZP)(`/api/reaction/image/list?id=${t}`,er.S),{closeModal:a}=(0,ei.d)();return(0,n.jsxs)("div",{className:"bg-gray-90 pt-1 h-[400px] w-[500px] flex flex-col",children:[(0,n.jsx)("header",{className:"py-4 px-8 border-b border-gray-85",children:(0,n.jsxs)("h3",{className:"text-gray-10 font-semibold text-xl flex items-center gap-2",children:["Likes ",i?"(Loading...)":(0,n.jsxs)(n.Fragment,{children:["(",r?.length??0,")"]})," ",(0,n.jsx)(ea.D,{large:!0})]})}),(0,n.jsxs)("main",{className:"h-full overflow-auto",children:[(0,n.jsxs)("div",{className:"px-8 py-2 empty:hidden",children:[!r?.length&&!i&&(0,n.jsx)("p",{className:"text-gray-50",children:"No Likes."}),o?(0,n.jsx)("p",{className:"border border-pai-error-red bg-pai-error-red/10 text-sm text-white",children:o.toString()}):null]}),(0,n.jsx)("ul",{className:"",children:r&&r.length?r?.map(e=>e?n.jsx(c(),{href:`/profile/${e.userId}`,className:"cursor-pointer py-2 px-8 hover:bg-gray-85 block first:pt-3.5 last:pb-3.5",onClick:a,children:n.jsxs("li",{className:"flex gap-4 items-center w-full",children:[n.jsx("img",{src:e.user.image??"https://storage.googleapis.com/pai-images/avatars/Default.png",className:"w-9 h-9 rounded-full border border-gray-85",alt:e.user.displayName??""}),n.jsxs("div",{className:"font-pg-medium ",children:[n.jsx("p",{className:"text-sm text-gray-10",children:e.user.displayName}),n.jsxs("p",{className:"text-sm text-gray-50",children:[e.user.email??"(no email)"," ",e.reaction===eo.l.RemovedLike?"(removed like)":null]})]})]})},e.id):null):null})]})]})}function el(e){let{id:t}=e,r=function(e){let{setModalContent:t}=(0,ei.d)();return()=>{t((0,n.jsx)(es,{id:e}),{useBlurredBackground:!0,transitionModal:!0})}}(t);return K.t5.useUserHasPermission("moderation:images:private")?(0,n.jsx)(T.ck,{className:(0,O.Z)(L().Item,"group hover:text-orange-500"),onClick:r,children:"View Likes"}):null}var eu=r(62469),ec=r(46825),ed=r(94670),ef=r(72438),ep=r(26516),eh=r(58195),em=r(14490),eg=r(33554),ev=r(81e3),ey=r(13383),ex=r(32621),eb=r(71864),ew=function(e){let{image:t,isInModal:r}=e,s=(0,a.useSession)(),l=(0,d.useRouter)(),[u,p]=(0,f.useState)("idle"),[m,x]=(0,f.useState)(()=>t.title??(0,A.G)(t.parent_image?.prompt??t.prompt)),[b,w]=(0,f.useState)(!1),[N,P]=(0,f.useState)(t.private),I=t.user.id===s.data?.user.id,M=(0,f.useMemo)(()=>g().debounce(e=>{p("loading"),(0,i.gO)(t.id,{title:e.trim()}),p("saved"),setTimeout(()=>{p("idle")},4e3)},1e3,{trailing:!0,leading:!1}),[t.id]);(0,f.useEffect)(()=>M.cancel,[M]);let D=async e=>{let r=new URL("/api/images/privacy",window.location.origin);r.searchParams.append("id",t.id);let n=await fetch(r.toString(),{method:"PATCH",body:JSON.stringify({private:e})});if(n.ok)J("Image privacy updated",{time:3e3}),P(e);else{let{error:e}=await n.json()??{};console.error(e),J(e??"Something went wrong. Please try again later.")}},$=K.t5.useUserHasPermission("moderation:images:private"),H=t.source&&v.NP[t.source]||null,J=(0,E.T1)(),Q=(0,n.jsxs)(T.ck,{onClick:async()=>{if(confirm("Are you sure you want to remove this image?")){await (0,i.ao)(t.id);let e=localStorage.getItem("modal-return-to");"/"===e&&(e="/feed"),e?await l.push(e,void 0,{shallow:!0}):l.back(),window.location.reload()}},className:(0,O.Z)(L().Item,L().danger,"focus:text-[#f16060]"),children:[(0,n.jsx)(eg.X,{className:"h-5 w-5 -ml-[2px]"}),(0,n.jsx)("span",{className:"-ml-[2px]",children:"Delete Image"})]}),ee=null!=t.start_schedule?Math.floor(100*(1-t.start_schedule)):null,er="midjourney"!==t.source,en=(0,n.jsxs)("button",{type:"button",onClick:()=>{let e=new URLSearchParams({remix:t.id});F().track("Remix button clicked",{imageId:t.id}),l.push(`/create?${e.toString()}`)},className:"text-gray-400 playground-button",disabled:!er,children:[(0,n.jsx)("span",{className:"text-gray-25",children:(0,n.jsx)(B.Im,{})}),"Use settings"]}),ei=(0,G.XO)(t),eo=(0,G.hH)(t),ea=(0,G.Pf)(t),es=(0,n.jsxs)(T.ck,{onClick:()=>{(0,Y.K)("pai:modal:close"),ea()},className:L().Item,children:[(0,n.jsx)(o.Z,{className:"mr-[2px] ml-px"}),"Face Restoration"]}),ef=(0,n.jsxs)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(t.prompt),w(!0),F().track("Copy Prompt",{imageId:t.id}),setTimeout(()=>{w(!1)},2e3)},className:`${b?"text-green-500":""} playground-button`,children:[b?(0,n.jsx)("span",{className:"scale-75",children:(0,n.jsx)(B.XZ,{width:24,height:24})}):(0,n.jsx)(B.QL,{}),"Copy Prompt"]}),[ep,eh]=(0,f.useState)(t.user.isFollowing),em=(0,n.jsxs)("div",{className:"flex gap-x-4 items-center justify-between md:justify-start",children:[(0,n.jsxs)(c(),{href:`/profile/${t.user.id}`,style:{cursor:"pointer"},className:"flex items-center gap-x-3",children:[(0,n.jsx)("img",{className:"rounded pai-border",src:t.user.image||"/avatar.svg",alt:`${t.user.displayName} avatar`,width:"28px",height:"28px"}),(0,n.jsx)("span",{className:"color-white text-base textba",children:t.user.displayName})]}),(0,n.jsx)(z,{showBasicUI:!0,isFollowing:ep,handleFollow:()=>eh(!0),handleUnfollow:()=>eh(!1),name:t.user.displayName??"",userId:t.user.id,source:"image-card"})]}),ew=(0,U._)(t.likeCount||0,t.userLiked||!1),eC=function(e){let t=e?.image?.remixedFrom?.userId===e.currentUserId,r=e.image.remixedFrom?.hide,n=e.image.remixedFrom?.private;return t||!n&&!r}({image:t,currentUserId:s?.data?.user?.id}),ek=!!t.parent_image_url&&!!t.prompt,eE=[{url:H?.url,name:H?.name}];ek&&eE.push({url:"https://www.timothybrooks.com/instruct-pix2pix",name:"InstructPix2Pix"});let eS=[{label:"Seed",value:t.seed},{label:"Prompt Guidance",value:t.cfg_scale},...t.source!==ec.Hn.PLAYGROUND_V3?[{label:"Sampler",value:y.HH.fromSamplerId(t.sampler)?.name}]:[],...H||ek?[{label:"Model",component:(0,n.jsx)(n.Fragment,{children:eE.map(e=>(0,n.jsx)("a",{className:"hover:underline",target:"_blank",rel:"noreferrer",href:e.url,children:e.name},e.url)).reduce((e,t)=>[e,", ",t])})}]:[],...t.fromCanvas?[{label:"Source",value:(0,n.jsx)(c(),{href:"/api/canvas/latest",children:"Canvas"})}]:[],{label:"Created",value:t.createdAt?`${new Date(t.createdAt).toLocaleDateString()} ${new Date(t.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:null},...t.ImageMetadata?.upscaler?[{label:"Upscaler",value:t.ImageMetadata?.upscaler==="gen-upscaler"?"Creative":"Subtle"}]:[],{label:"Additional Credit",...function(e){let{prompt:t}=e,r=[{token:"greg rutkowski",name:"Greg Rutkowski",url:"https://www.artstation.com/rutkowski"},{token:"alphonse",name:"Alphonse Mucha",url:"https://en.wikipedia.org/wiki/Alphonse_Mucha"},{token:"marc simonetti",name:"Marc Simonetti",url:"https://art.marcsimonetti.com/"},{token:"giger",name:"H.R. Giger",url:"https://www.hrgiger.com/"},{token:"artgerm",name:"Artgerm",url:"https://artgerm.com/welcome/"},{token:"beeple",name:"Beeple",url:"https://www.beeple-crap.com/"},{token:"beksinski",name:"Zdzisław Beksiński",url:"https://en.wikipedia.org/wiki/Zdzis%C5%82aw_Beksi%C5%84ski"}].filter(e=>t.toLowerCase().includes(e.token));return{component:r.length?(0,n.jsx)(n.Fragment,{children:r.map(e=>(0,n.jsx)("a",{className:"hover:underline",target:"_blank",rel:"noreferrer",href:e.url,children:e.name},e.url)).reduce((e,t)=>[e,", ",t])}):null,show:r.length>0}}({prompt:t.prompt})},{label:"Initial Image Strength",value:ee},{label:"Filter Style",value:W.Vt.get(t?.filter)?.id!==W.$p.id?W.Vt.get(t?.filter)?.name:null},...t.ImageMetadata?.high_noise_frac&&t.source!==ec.Hn.PLAYGROUND_V3?[{label:"Refinement",value:Math.round(100*(1-t.ImageMetadata.high_noise_frac))}]:[],...t.remixedFrom&&eC?[{label:"Inspired from",value:(0,n.jsx)(k,{image:t.remixedFrom})}]:[]],eN=ek&&t.parent_image?.prompt,eP=(0,G.iu)(t),eL=(0,ey.e)();return(0,f.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"c"===e.key&&(e.preventDefault(),navigator.clipboard.writeText(window.location.href))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e_,{url:t.url,title:t.title,prompt:t.prompt,userName:t.user.displayName??""}),(0,n.jsxs)("div",{className:"font-pg-medium flex flex-col lg:flex-row pt-4 p-6 md:pt-16 lg:pt-6 gap-2 lg:gap-8 w-full relative text-white overflow-auto transition-all duration-150 image-post-page",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-4 flex-none md:max-w-[min(60vw)]",children:[(0,n.jsx)("div",{className:"block md:hidden",children:em}),(0,n.jsx)("div",{children:(0,n.jsx)("img",{"data-testid":"image-post-image",src:t.url_jpeg??t.url,alt:`Prompt: ${t.prompt}`,style:{aspectRatio:`${t.width/t.height}`,maxHeight:"80vh"},className:`rounded-lg mx-auto max-w-[(min(100%,90vw))] md:max-w-[min(60vw)] ${(t.private||t.hide)&&t.userId!==s.data?.user?.id&&$?"sharp-orange-shadow":""}`},t.url_jpeg??t.url)}),(0,n.jsxs)("div",{className:"flex flex-col md:flex-row justify-between gap-x-2 gap-y-2",children:[(0,n.jsx)("div",{className:"flex",children:(0,n.jsx)(U.d,{pill:!0,isInModal:r,id:t.id,likeButtonState:ew})}),(0,n.jsxs)("div",{className:"flex items-center gap-x-2 select-none",children:[(0,n.jsxs)("button",{type:"button",className:"playground-button subtle md:flex gap-2 hidden",onClick:()=>{let e=s.data?.user.id===t.userId;(0,C.ZP)(t,{withWatermark:!e}),F().track("Downloaded image",{from:"image post",imageCreatorId:t.userId,isOwnImage:e})},children:[(0,n.jsx)(B.$L,{}),(0,n.jsx)("span",{children:"Download"})]}),(0,n.jsx)(_,{}),(0,n.jsx)("div",{className:`relative ${s.data?.user?"":"hidden"}`,children:(0,n.jsxs)(T.fC,{modal:!1,children:[(0,n.jsx)(T.xz,{children:(0,n.jsx)(S,{})}),(0,n.jsx)(T.VY,{asChild:!0,className:L().Content,align:"end",sideOffset:4,side:"top",children:(0,n.jsxs)(T.ZA,{children:[(0,n.jsx)(et,{canEditImage:I,isPrivate:N,updateImagePrivacy:D,id:t.id}),I&&(0,n.jsxs)(T.Tr,{children:[(0,n.jsx)(ed.u,{label:"Too large to upscale",placement:"right",className:"pai-canvas-tooltip arrow-bottom duration-75",isOpen:!!eP&&void 0,children:(0,n.jsx)("div",{children:(0,n.jsxs)(T.fF,{className:L().Item,disabled:eP,children:[(0,n.jsx)(q.Z,{height:14,width:14,className:"mr-[2px]"}),"Upscale by 4x",!eP&&(0,n.jsx)(eu.XCv,{})]})})}),(0,n.jsxs)(T.tu,{className:L().Content,sideOffset:4,children:[(0,n.jsx)(T.ck,{className:L().Item,onClick:e=>{e.stopPropagation(),eo()},disabled:!1,children:"Creative"}),(0,n.jsx)(T.ck,{className:L().Item,onClick:e=>{e.stopPropagation(),ei()},disabled:!1,children:"Subtle"})]})]}),I&&es,!I&&(0,n.jsx)(R,{id:t.id}),I&&Q,I&&(0,n.jsx)(ej,{imageId:t.id}),I&&(0,n.jsx)(ev.e,{permission:"design:create-template",children:(0,n.jsx)(T.ck,{className:L().Item,onClick:e=>(F().track("Action on image post",{imageId:t.id,action:"Create a template from image"}),t.prompt.length<ex.hv.prompt.min)?J(`Prompt must be at least ${ex.hv.prompt.min} characters`,{time:3e3}):t.source!==ec.Hn.PLAYGROUND_V3?J("Only images created with the Playground V3 model can be used to create templates",{time:3e3}):t.start_schedule?J("Cannot create a template from an Image to Image image",{time:3e3}):eb.gf.some(e=>t.width===e.width&&t.height===e.height)?void(l.back(),eL.open({imageId:t.id})):J(`Can only create a template in the following aspect ratios: ${eb.gf.map(e=>e.displayText).join(", ")}
                                  `,{time:3e3}),children:(0,n.jsx)(T.ck,{children:"Create Template"})})}),(0,n.jsx)(X,{image:t}),(0,n.jsx)(el,{id:t.id})]})})]})})]})]})]}),(0,n.jsx)("div",{className:"flex flex-col justify-between md:pl-0 flex-grow py-2 md:py-8",children:(0,n.jsx)("div",{className:"max-w-[min(400px,85vw)]",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"hidden md:block",children:em}),I?(0,n.jsxs)("form",{className:"my-4 relative",children:[(0,n.jsx)(V,{value:m,onChange:e=>{x(e.currentTarget.value),M(e.currentTarget.value)},onKeyDown:e=>{e.stopPropagation()},className:`${h().title} bg-transparent border-b-2 border-low outline-none resize-none w-full`}),(0,n.jsx)("span",{className:`absolute right-0 bottom-8 transition-all ${"saved"===u?"":"opacity-0"}`,children:(0,n.jsx)(B.XZ,{})})]}):(0,n.jsx)("h1",{className:`${h().title} my-4 border-b-2 border-transparent`,children:m}),(0,n.jsxs)("div",{className:"space-y-5",children:[t.prompt&&(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)("label",{className:"color-secondary text-base font-pg-semibold",children:ek?"Edit instruction":"Prompt"}),(0,n.jsx)("div",{className:"mr-0 ",children:(0,n.jsx)(j,{text:t.prompt})})]}),eN&&(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)("label",{className:"color-secondary text-base font-pg-semibold",children:"Parent Image Prompt"}),(0,n.jsx)("div",{className:"mr-0 ",children:(0,n.jsx)(j,{text:eN})})]}),t.negative_prompt&&(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)("label",{className:"color-secondary text-base font-pg-semibold",children:"Removed From Image"}),(0,n.jsx)("div",{className:"mr-0 ",children:(0,n.jsx)(j,{text:t.negative_prompt})})]}),(0,n.jsxs)("div",{className:"flex flex-wrap text-sm my-4 gap-4",children:[t.prompt&&ef,en]}),(0,n.jsx)("hr",{className:"!my-6 border-low"}),(0,n.jsx)("ul",{className:"list-none grid grid-cols-2 gap-y-4 gap-x-2",children:eS.map(e=>e.value||e.component?(0,n.jsxs)("div",{className:"space-y-0.5 text-sm",children:[(0,n.jsx)("dt",{className:"color-secondary font-pg-semibold",children:e.label}),(0,n.jsx)("dl",{className:"text-gray-200",children:e.href?(0,n.jsx)("a",{href:e.href,className:"hover:underline",target:"_blank",rel:"noreferrer",children:e.value}):(0,n.jsx)(n.Fragment,{children:e.component||e.value})})]},e.label):(0,n.jsx)(f.Fragment,{},e.label))})]})]})})})]}),(0,n.jsxs)("div",{className:"p-6",children:[(0,n.jsx)("h2",{className:"text-white/90 text-xl font-semibold mb-4",children:"More images like this"}),(0,n.jsx)(Z,{})]})]})};function e_(e){let{url:t,title:r,prompt:i,userName:o}=e;return(0,n.jsxs)(l(),{children:[(0,n.jsx)("meta",{property:"og:image",content:t}),(0,n.jsx)("meta",{property:"og:image:type",content:"image/png"}),(0,n.jsx)("meta",{property:"og:image:alt",content:"Playground"}),(0,n.jsx)("title",{children:`${(r??(0,A.G)(i))+" by "+o} - Playground`}),(0,n.jsx)("meta",{property:"og:description",content:`${i.substring(0,200).trim()}...`}),(0,n.jsx)("meta",{property:"og:title",content:"Playground - "+(r??(0,A.G)(i))}),(0,n.jsx)("meta",{property:"twitter:card",content:"summary_large_image"}),(0,n.jsx)("meta",{property:"twitter:title",content:"Playground - "+(r??(0,A.G)(i))}),(0,n.jsx)("meta",{property:"twitter:image",content:t}),(0,n.jsx)("meta",{property:"twitter:description",content:`Prompt: "${i?.substring(0,200)+"..."}"`}),(0,n.jsx)("meta",{property:"twitter:url",content:`https://playground.com${(0,d.useRouter)().asPath}`})]})}function ej(e){let t=(0,em.L)(),{submitToDailyTheme:r}=(0,eh.h)({imageId:e.imageId});return(0,n.jsxs)(T.ck,{className:L().Item,onClick:n=>(F().track("Action on image post",{imageId:e.imageId,dailyThemeId:t.data?.id,action:"Submit to daily theme"}),r()),children:[(0,n.jsx)(ep.f,{className:"h-5 w-5 -ml-[2.5px]"}),(0,n.jsx)(ef.p,{imageId:e.imageId})]})}},23659:function(e,t,r){"use strict";r.d(t,{ZP:function(){return tP},vX:function(){return tN},XC:function(){return tT}});var n=r(85893),i=r(9008),o=r.n(i),a=r(67294),s=r(48563),l=r(38372),u=r(92323),c=r(8891),d=r.n(c),f=r(9669),p=r.n(f),h=r(96486),m=r.n(h),g=r(47435),v=r(86544),y=r(42897),x=r(88246),b=r(37914),w=r(10443),_=r(94525);let j="pai-default-options",C=["width","height","modelType","filter","sampler","cfg_scale","guidance_scale","strength","steps","high_noise_frac","num_images","private","brushRadius","expandPrompt"],k=(e,t)=>{if("undefined"==typeof localStorage){console.warn("localStorage is undefined");return}let r=JSON.parse(localStorage.getItem(j)||"{}");localStorage.setItem(j,JSON.stringify({...r,[e]:t}))},E=()=>JSON.parse(localStorage.getItem(j)||"{}"),S=(e,t,r)=>{let n=E();if(r)return n?.[e];let i=n?.[e]||null;return t&&isNaN(Number(i))?null:i};var N=r(33299),P=r(59345),L=r(96897),T=r(51879),O=r(57718),R=r(18794),A=r(46825),I=r(23878),M=r(46302),D=r(17701),F=r(79134);function z(e){let{modelType:t,session:r,isPro:n,isTurbo:i}=e,o=[A.Hn.STABLE_DIFFUSION].includes(t)?512:1024,a=S("width",!0)??o,s=S("height",!0)??o,l=!!((n||i)&&S("private")),u=n||i?D.L.paid:D.L.free;t!==A.Hn.STABLE_DIFFUSION||T.XP.some(e=>e.width===a&&e.height===s)?t!==A.Hn.STABLE_DIFFUSION_2||T.QA.some(e=>e.width===a&&e.height===s)||(a=768,s=768):(a=512,s=512);let c=S("filter"),d=!!w.Vt.has(c)&&("default"===t||w.Vt.get(c)?.models.includes(t)),f=S("expandPrompt",!0,!0)??r?.user.db.preferences?.[F.Kw],p={width:a,height:s,seed:(0,T.mZ)(),num_images:S("num_images",!0)??1,modelType:t,sampler:S("sampler",!0)??M.HH.fromKey("DPMPP_2M_K").samplerId,cfg_scale:S("cfg_scale",!0)??7,guidance_scale:S("guidance_scale",!0)??7,strength:S("strength",!0)??T.ui,steps:Math.min(S("steps",!0)??25,u),high_noise_frac:S("high_noise_frac",!0)??.6,private:l,negativePrompt:T.D2,prompt:"",filter:d?c:"none",controlNetOptions:x.Gc,expandPrompt:f},h=[A.Hn.PLAYGROUND_V2,A.Hn.PLAYGROUND_V2_5].includes((0,I.CX)(p))?3:7;return p.cfg_scale=h,p.guidance_scale=h,p}let B=e=>{let{modelType:t,baseImageOptions:r,isPro:n,isTurbo:i,session:o,override:a}=e,s=n||i?D.L.paid:D.L.free;return{...function(){switch(t){case A.Hn.STABLE_DIFFUSION:case A.Hn.STABLE_DIFFUSION_2:case A.Hn.STABLE_DIFFUSION_XL:case A.Hn.PLAYGROUND_V2:case A.Hn.PLAYGROUND_V2_5:case A.Hn.PLAYGROUND_V1:case A.Hn.PLAYGROUND_V3:let e=z({modelType:t,session:o,isPro:n,isTurbo:i});return r?{width:n?r.width??e.width:e.width,height:n?r.height??e.height:e.height,cfg_scale:r.cfg_scale??e.cfg_scale,guidance_scale:r.cfg_scale??e.guidance_scale,strength:r.start_schedule??e.strength,steps:Math.min(r.steps??e.steps??30,s),seed:r.seed??e.seed,sampler:r.sampler??e.sampler,num_images:1,private:e.private,negativePrompt:r.negative_prompt??"",prompt:(0,I.Cs)(r)??"",filter:r.filter??w.$p.id,controlNetOptions:x.Gc,high_noise_frac:r.ImageMetadata?.high_noise_frac??.6,modelType:t}:e;default:return z({modelType:t,session:o,isPro:n,isTurbo:i})}}(),...a}};var U=r(63518),V=r(92890),$=r(58309);let H={negativePrompt:null};var Z=r(5787),W=r(44746),q=r(32178),G=r(11959),Y=r(11255);let K=e=>function(){let t=e.filter,r=t?w.Vt.get(t):null,n=e.modelType;return n!==A.Hn.PLAYGROUND_V3||t?n===A.Hn.STABLE_DIFFUSION_XL||n===A.Hn.PLAYGROUND_V2||n===A.Hn.PLAYGROUND_V2_5?(0,G.W)({height:e.height??1024,width:e.width??1024,modelType:n,dream_booth_model:t,filter:t,sampler:M.HH.fromSamplerId(e.sampler??11)?.samplerId??11,controlnet_images:e.controlNetOptions?.map(e=>e.base64Image).filter(Boolean)})?"fast_pgv2_5":"sdxl":n===A.Hn.DALLE?null:r?.dream_booth_model?"sdxl":"slow":"v3"};var X=r(57632),J=r(75266),Q=r(37513),ee=r(53416),et=r(81084),er=r(95995),en=r(158),ei=r(15696),eo=r(85821),ea=r(47922);let es="pai-board-image-history";var el=r(11163),eu=r(11350),ec=r(4404),ed=r(74371),ef=r(32478),ep=r(13346),eh=r(1233);function em(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1109 15.5923C13.5859 15.5923 15.5923 13.5859 15.5923 11.1109C15.5923 8.63595 13.5859 6.62958 11.1109 6.62958C8.63595 6.62958 6.62958 8.63595 6.62958 11.1109C6.62958 13.5859 8.63595 15.5923 11.1109 15.5923ZM11.1109 17.2219C14.4859 17.2219 17.2219 14.4859 17.2219 11.1109C17.2219 7.73596 14.4859 5 11.1109 5C7.73596 5 5 7.73596 5 11.1109C5 14.4859 7.73596 17.2219 11.1109 17.2219Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M13.8147 15.3741L14.967 14.2218L19 18.2548L17.8477 19.4071L13.8147 15.3741Z",fill:"currentColor"})]})}var eg=r(76581),ev=r(69306),ey=r(64529),ex=r(61116),eb=r(35362);function ew(){let{searchQuery:e,setSearchQuery:t,isSearchOpen:r,openSearch:i,closeSearch:o,handleKeyDown:a,searchBarRef:s,isSearchExpanded:l}=e_();return((0,ev.OV)("xs"),r)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,eh.cn)("fixed inset-0 z-10","animate-fade-in duration-100 fade-in-5 bg-pg-900/50 backdrop-blur-xl"),onClick:()=>o()}),(0,n.jsxs)("div",{className:(0,eh.cn)(["flex-shrink flex-grow items-start rounded-pg-md text-pg-00 self-start font-normal","border-none","shadow-xl",r?"md:max-w-3xl absolute left-4 right-4 max-md:z-30 bg-pg-600":"md:max-w-sm bg-pg-600","absolute top-4 md:left-[50%] md:-translate-x-[50%] z-20 overflow-hidden"]),children:[(0,n.jsx)(ex.a,{}),(0,n.jsxs)("div",{className:"flex items-center gap-2 h-12 pl-3 pr-2 relative",onClick:()=>{s.current?.focus()},children:[(0,n.jsx)(em,{className:"text-pg-300 shrink-0"}),(0,n.jsx)("input",{id:"search",autoComplete:"off",type:"search",ref:s,onChange:e=>t(e.target.value),className:"text-md selection:bg-selection xs:text-base font-pg-medium text-pg-100 placeholder:text-pg-300 flex-grow min-w-4 w-full bg-transparent outline-none",placeholder:"Search images",onKeyDown:a,value:e}),(0,n.jsx)(ep.z,{size:"icon",hidden:!l,onClick:()=>t(""),className:"shrink-0 bg-transparent shadow-none",children:(0,n.jsx)(ef.Z,{})})]})]})]}):(0,n.jsxs)(eg.u,{children:[(0,n.jsx)(eg.aJ,{asChild:!0,children:(0,n.jsx)(ep.z,{variant:"ghost",size:"icon",onClick:i,className:(0,eh.cn)("text-pg-300","hidden xs:inline-flex"),children:(0,n.jsx)(em,{className:"h-7 w-7"})})}),(0,n.jsx)(eg._v,{children:"Search images"})]})}function e_(){let e=ej(e=>e.isSearchOpen),t=function(){let{setIsSearchOpen:e}=ej();return()=>e(!0)}(),r=function(){let{setIsSearchOpen:e}=ej();return()=>e(!1)}(),[n,i]=(0,a.useState)(""),o=(0,a.useRef)(null),s=(0,el.useRouter)(),l=()=>{let e=new URLSearchParams;return e.set("q",n),e.set("mine","true"),`/search?${e.toString()}`};function u(){return t(),requestAnimationFrame(()=>{o.current?.focus()})}function c(){r()}return(0,a.useEffect)(()=>{s&&s.query.q&&i(s.query.q)},[s.query]),(0,eb.i)(t=>{"/"!==t.key||e||(t.preventDefault(),u())}),{searchQuery:n,setSearchQuery:i,isSearchOpen:e,router:s,handleKeyDown:e=>"Enter"===e.key?(c(),function(){let e=l();return"/search"===s.pathname?s.replace(e,void 0,{shallow:!1}):"/create"===s.pathname?window.open(e,"_blank"):s.push(e,void 0,{shallow:!1})}()):"Escape"===e.key?c():void 0,searchBarRef:o,isSearchExpanded:n.length>0,openSearch:u,closeSearch:c}}let ej=(0,ey.Ue)()(e=>({isSearchOpen:!1,setIsSearchOpen:t=>e({isSearchOpen:t})}));function eC(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{d:"M4 14.8573C4 17.1414 5.50177 19.0551 7.51496 19.0551H8.94368C7.48249 18.0442 6.88178 16.5163 6.88178 14.7801C6.8899 12.8509 7.67731 11.4697 8.37544 10.6363H7.2146C5.40436 10.6363 4 12.4883 4 14.8573ZM8.00202 14.7955C8.00202 17.6121 10.3156 19.7882 14.0903 19.7882H15.1943C16.2415 19.7882 17.0208 19.7187 17.4591 19.603C18.0923 19.4564 18.7012 19.086 18.7012 18.3606C18.7012 18.0597 18.62 17.8436 18.5225 17.6815C18.4576 17.5812 18.4738 17.5041 18.5713 17.4655C19.0745 17.2648 19.4886 16.8173 19.4886 16.2077C19.4886 15.8604 19.383 15.5518 19.2044 15.3434C19.1151 15.2277 19.1232 15.1196 19.2775 15.0425C19.6347 14.8418 19.8944 14.4097 19.8944 13.9081C19.8944 13.5455 19.7727 13.1674 19.5616 12.9821C19.4317 12.8741 19.4561 12.797 19.586 12.6812C19.8376 12.4806 20 12.1333 20 11.6935C20 10.9527 19.3912 10.3431 18.5875 10.3431H15.7301C15.0076 10.3431 14.5286 9.98809 14.5286 9.41706C14.5286 8.39075 15.8843 6.49247 15.8843 5.13434C15.8843 4.4167 15.3972 4 14.7641 4C14.1796 4 13.8955 4.37811 13.587 4.95686C12.3775 7.18696 10.7702 8.99265 9.54439 10.536C8.50532 11.8478 8.00202 12.9821 8.00202 14.7955Z",fill:"currentColor"})})}var ek=r(62469),eE=r(6809),eS=r.n(eE),eN=r(24011),eP=r(30282),eL=r(49325);function eT(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.25 19C15.1495 19 17.5 16.7207 17.5 13.9091C17.5 11.9438 16.3409 10.5405 15.2159 9.1785C14.1553 7.8944 13.125 6.64702 13.125 5C11.375 7.12121 10.0625 9.4678 10.9375 12.4375C10.0625 11.5625 9.1875 10.25 8.65734 9.095C7.42031 10.7615 7 12.318 7 13.9091C7 16.7207 9.35051 19 12.25 19ZM13.5625 16.375C12.3544 16.375 11.375 15.3778 11.375 14.1477C11.375 13.2879 11.858 12.674 12.3267 12.0781C12.7686 11.5163 13.1979 10.9706 13.1979 10.25C13.1979 10.25 14.482 11.2247 15.0594 12.0416C15.5749 12.7707 15.75 13.4516 15.75 14.1477C15.75 15.3778 14.7706 16.375 13.5625 16.375Z",fill:"currentColor"})})}var eO=r(13998);function eR(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{d:"M7.40589 15.23C7.05882 15.23 6.82941 14.9947 6.82941 14.6653V13.5771C6.82941 13.2418 7.05882 13.0124 7.40589 13.0124H8.84706C9.19412 13.0124 9.42353 13.2418 9.42353 13.5771V14.6653C9.42353 14.9947 9.19412 15.23 8.84706 15.23H7.40589ZM5 10.7124V9.37709H18.8236V10.7124H5ZM6.84706 17.0535H16.9765C18.2118 17.0535 18.8236 16.4477 18.8236 15.2359V8.83002C18.8236 7.61826 18.2118 7.00649 16.9765 7.00649H6.84706C5.61765 7.00649 5 7.61826 5 8.83002V15.2359C5 16.4477 5.61765 17.0535 6.84706 17.0535Z",fill:"currentColor"})})}function eA(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 12C19 15.866 15.866 19 12 19C8.13401 19 5 15.866 5 12C5 8.13401 8.13401 5 12 5C15.866 5 19 8.13401 19 12ZM12.7241 7.89655V8.13793H14.1724C14.5723 8.13793 14.8966 8.46214 14.8966 8.86207C14.8966 9.262 14.5723 9.58621 14.1724 9.58621H11.3966C10.9299 9.58621 10.5517 9.96444 10.5517 10.431C10.5517 10.8977 10.9299 11.2759 11.3966 11.2759H12.6034C13.8699 11.2759 14.8966 12.3025 14.8966 13.569C14.8966 14.795 13.9345 15.7962 12.7241 15.8589V16.1034C12.7241 16.5034 12.3999 16.8276 12 16.8276C11.6001 16.8276 11.2759 16.5034 11.2759 16.1034V15.8621H9.82759C9.42766 15.8621 9.10345 15.5379 9.10345 15.1379C9.10345 14.738 9.42766 14.4138 9.82759 14.4138H12.6034C13.0701 14.4138 13.4483 14.0356 13.4483 13.569C13.4483 13.1023 13.0701 12.7241 12.6034 12.7241H11.3966C10.1301 12.7241 9.10345 11.6975 9.10345 10.431C9.10345 9.20508 10.0655 8.20381 11.2759 8.14105V7.89655C11.2759 7.49662 11.6001 7.17241 12 7.17241C12.3999 7.17241 12.7241 7.49662 12.7241 7.89655Z",fill:"currentColor"})})}function eI(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,n.jsx)("path",{d:"M8.83045 18.6665H15.1012C16.3235 18.6665 16.9316 18.0465 16.9316 16.8124V12.9154H12.5681C12.2552 12.9154 11.9894 12.6496 11.9894 12.3308C11.9894 12.0119 12.2552 11.7403 12.5681 11.7403H16.9316V7.85503C16.9316 6.62686 16.3235 6.00687 15.1012 6.00687H8.83045C7.60818 6.00687 7 6.62686 7 7.85503V16.8124C7 18.0465 7.60818 18.6665 8.83045 18.6665Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M16.4712 12.3296C16.4712 12.5835 16.6778 12.7961 16.9258 12.7961H18.6441L19.5298 12.7607L19.1106 13.1621L18.1599 14.0538C18.0654 14.1364 18.0182 14.2604 18.0182 14.3726C18.0182 14.6206 18.1894 14.8037 18.4315 14.8037C18.5555 14.8037 18.65 14.7564 18.7445 14.6678L20.6694 12.6721C20.7875 12.554 20.8229 12.4477 20.8229 12.3296C20.8229 12.2056 20.7875 12.1052 20.6694 11.9871L18.7445 9.99136C18.65 9.90278 18.5555 9.84964 18.4315 9.84964C18.1894 9.84964 18.0182 10.0268 18.0182 10.2748C18.0182 10.3929 18.0654 10.5169 18.1599 10.5995L19.1106 11.4971L19.5298 11.8985L18.6441 11.8572H16.9258C16.6778 11.8572 16.4712 12.0757 16.4712 12.3296Z",fill:"currentColor"})]})}var eM=r(35893),eD=r(2113),eF=r(41664),ez=r.n(eF);function eB(){return(0,n.jsxs)("div",{className:"flex w-fit gap-1 justify-between text-xs py-1 px-2",children:[(0,n.jsx)(ez(),{href:"/jobs",className:"text-pg-300 hover:text-pg-200",target:"_blank",rel:"noopener noreferrer",onClick:()=>{d().track("Used Navigation menu",{key:"careers"})},children:"Careers"}),(0,n.jsx)("span",{className:"text-pg-300",children:"•"}),(0,n.jsx)(ez(),{href:"/terms",className:"text-pg-300 hover:text-pg-200",target:"_blank",rel:"noopener noreferrer",children:"Terms of Service"}),(0,n.jsx)("span",{className:"text-pg-300",children:"•"}),(0,n.jsx)(ez(),{href:"/privacy",className:"text-pg-300 hover:text-pg-200",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"})]})}function eU(e){let{href:t,children:r,...i}=e,o=(0,el.useRouter)(),s=a.useRef(null),{setShowSidebars:l}=(0,ed.Z)();return(0,n.jsx)(eM.Xi,{ref:s,...i,onSelect:e=>i.onSelect?i.onSelect(e):("/create"===t&&l(!0),t)?o.push(t):void 0,mixpanelEvent:i.mixpanelEvent,mixpanelKey:i.mixpanelKey,children:t?(0,n.jsx)(ez(),{href:t,className:(0,eh.cn)("cursor-default",i.className),onClick:e=>{s.current?.click(),e.stopPropagation()},children:r}):r})}var eV=r(14319);function e$(e){return(0,n.jsx)(eV.C,{variant:"turbo",...e,children:"Turbo"})}function eH(e){return(0,n.jsx)(eV.C,{variant:"pro",...e,children:"Pro"})}function eZ(e){return(0,n.jsx)(eV.C,{variant:"outline",...e,children:"Free"})}function eW(e){let t=(0,W.WI)(),r=(0,W.s4)();return t||r?t?(0,n.jsx)(eH,{...e}):r?(0,n.jsx)(e$,{...e}):(0,n.jsx)(eZ,{...e}):null}var eq=r(43857),eG=r(86076);let eY=(0,a.forwardRef)(()=>{let e=(0,l.Z)(),t=(0,N.useSession)(),r=(0,en.H)(),i=r.data?.numImagesInLastDay,o=(0,eG.Pp)(t.data),{open:a}=(0,eq.useUserUsageDialog)(),s=(0,W.WI)(),u=(0,W.s4)(),c=i||0,d=`${c/o*100}%`;return(0,n.jsxs)(eM.Xi,{className:"px-4 py-4 gap-4 flex flex-col h-full w-full items-start text-start cursor-default",onClick:()=>requestAnimationFrame(()=>a()),children:[(0,n.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,n.jsx)("p",{className:"text-pg-100 text-sm font-pg-semibold",children:e?.displayName}),(0,n.jsx)(eW,{})]}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)("div",{className:"flex w-full h-1 bg-pg-300/20 rounded-full overflow-hidden",role:"progressbar",children:(0,n.jsx)("div",{className:(0,eh.cn)("flex flex-col justify-center rounded-full overflow-hidden text-xs text-white text-center whitespace-nowrap transition duration-500",u&&"bg-turbo",s&&"bg-pro"),style:{width:d}})}),(0,n.jsxs)("p",{className:"text-sm mt-2 text-pg-300 font-pg-medium",children:[c.toLocaleString()," / ",o.toLocaleString()," images created"]})]})]})});function eK(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{d:"M19 12C19 15.8226 15.8294 19 12 19C8.17746 19 5 15.8226 5 12C5 8.17059 8.17059 5 11.9931 5C15.8226 5 19 8.17059 19 12ZM11.0735 14.8412C11.0735 15.2461 11.4304 15.5755 11.8422 15.5755C12.2539 15.5755 12.6108 15.253 12.6108 14.8412C12.6108 14.4295 12.2608 14.1 11.8422 14.1C11.4236 14.1 11.0735 14.4363 11.0735 14.8412ZM9.86569 9.60491C9.83138 9.71471 9.80393 9.83138 9.80393 9.95491C9.80393 10.2706 10.0579 10.4422 10.2912 10.4422C10.5314 10.4422 10.6892 10.3255 10.8196 10.1608L10.9431 9.98923C11.1971 9.57746 11.5608 9.34413 12.0343 9.34413C12.6726 9.34413 13.0912 9.70785 13.0912 10.2431C13.0912 10.7235 12.7961 10.9569 12.1784 11.3893C11.6706 11.7461 11.2863 12.1167 11.2863 12.8167C11.2863 12.8441 11.2863 12.8784 11.2863 12.9059C11.2863 13.2765 11.4921 13.4686 11.8559 13.4686C12.2128 13.4686 12.4324 13.2422 12.4324 12.9608C12.4324 12.9334 12.4324 12.899 12.4324 12.8784C12.4324 12.4804 12.6588 12.2265 13.153 11.904C13.8393 11.451 14.3334 11.0392 14.3334 10.1882C14.3334 9.00785 13.2833 8.38334 12.0755 8.38334C10.8539 8.38334 10.0579 8.95295 9.86569 9.60491Z",fill:"currentColor"})})}eY.displayName="HeaderUserUsage";var eX=r(81810);function eJ(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 12C19 15.866 15.866 19 12 19C8.13401 19 5 15.866 5 12C5 8.13401 8.13401 5 12 5C15.866 5 19 8.13401 19 12ZM12.7307 7.99102C12.7307 7.58762 12.4037 7.2606 12.0003 7.2606C11.5969 7.2606 11.2699 7.58762 11.2699 7.99102V12.3993L14.7202 14.6047C15.0601 14.822 15.5117 14.7226 15.729 14.3827C15.9463 14.0428 15.8468 13.5911 15.5069 13.3739L12.7307 11.5993V7.99102Z",fill:"currentColor"})})}function eQ(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 12.2508C19 16.7514 15.3793 18.5016 12 18.5016C11.4887 18.5016 10.9717 18.4615 10.4627 18.3779C10.2181 18.3377 9.96855 18.3336 9.72513 18.3809L6.62835 18.9824C5.96095 19.112 5.3763 18.5063 5.50143 17.815L5.75459 16.4165C5.84652 15.9086 5.73011 15.3904 5.52257 14.9205C5.18962 14.1667 5 13.2807 5 12.2508C5 7.75023 8.62069 6 12 6C15.3793 6 19 7.75023 19 12.2508ZM9.10345 11.2514C8.57019 11.2514 8.13793 11.6992 8.13793 12.2515C8.13793 12.8038 8.57019 13.2517 9.10345 13.2517C9.63671 13.2517 10.069 12.8038 10.069 12.2515C10.069 11.6992 9.63671 11.2514 9.10345 11.2514ZM11.0345 12.2515C11.0345 11.6992 11.4668 11.2514 12 11.2514C12.5332 11.2514 12.9655 11.6992 12.9655 12.2515C12.9655 12.8038 12.5332 13.2517 12 13.2517C11.4668 13.2517 11.0345 12.8038 11.0345 12.2515ZM14.8966 11.2514C14.3634 11.2514 13.931 11.6992 13.931 12.2515C13.931 12.8038 14.3634 13.2517 14.8966 13.2517C15.4298 13.2517 15.8621 12.8038 15.8621 12.2515C15.8621 11.6992 15.4298 11.2514 14.8966 11.2514Z",fill:"currentColor"})})}function e0(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{d:"M16.061 6H18.2069L13.4952 11.3649L19 18.6425H14.6801L11.2979 14.2199L7.42586 18.6425H5.27991L10.2716 12.9044L5 6H9.42719L12.4828 10.04L16.061 6ZM15.3099 17.3829H16.4995L8.80207 7.21293H7.52383L15.3099 17.3829Z",fill:"currentColor"})})}var e1=r(17929),e2=r(99861),e5=r(72690);function e4(){let e=(0,e5.J)(),t=!!(0,eX.R5)(),r=(0,ev.OV)("xs"),i=(0,e2.l)(),o=[{visible:!0,label:"FAQs",href:T.gO,mixpanelKey:"faqs",icon:(0,n.jsx)(eJ,{})},{visible:!0,label:"Live chat",onSelect:()=>window.Intercom?.("showNewMessage"),href:"#",mixpanelKey:"live-chat",icon:(0,n.jsx)(eQ,{})},{visible:!0,label:"Follow on X",href:T.N$,mixpanelKey:"twitter",icon:(0,n.jsx)(e0,{})},{visible:t,label:"New to Canvas? Learn the basics",mixpanelKey:"open-canvas-tutorial",onSelect:i},{visible:!0,label:"Status",href:T.a3,mixpanelKey:"status",icon:(0,n.jsx)(eK,{})},{visible:null!==e,label:"Download Diagnostics",mixpanelKey:"diagnostics",href:"#",onSelect:e}];return r?(0,n.jsx)(e1.UQ,{type:"single",collapsible:!0,className:"w-full",children:(0,n.jsxs)(e1.Qd,{value:"canvas",children:[(0,n.jsxs)(e1.o4,{children:[(0,n.jsx)(eK,{}),"Help"]}),(0,n.jsx)(e1.vF,{children:o.filter(e=>e.visible||void 0===e.visible).map(e=>(0,a.createElement)(eU,{...e,key:e.href,mixpanelEvent:"Used Navigation menu",className:"flex items-center gap-2 pr-4",children:[e.icon,e.label]}))})]})}):(0,n.jsxs)(eM.Ph,{children:[(0,n.jsxs)(eM.kt,{className:"flex items-center gap-2 pr-4",children:[(0,n.jsx)(eK,{}),"Help"]}),(0,n.jsx)(eM.TG,{className:"min-w-[200px]",alignOffset:-4,sideOffset:8,children:o.filter(e=>e.visible||void 0===e.visible).map(e=>(0,a.createElement)(eU,{...e,key:e.href,mixpanelEvent:"Used Navigation menu",className:"flex items-center gap-2 pr-4",children:[e.icon,e.label]}))})]})}var e3=r(14622),e6=r(13728),e8=r(17877);function e7(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M19 12H5",stroke:"#E6E6E7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12 19L5 12L12 5",stroke:"#E6E6E7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}var e9=r(39332);function te(e){let{isSingleImagePage:t}=e,r=(0,ev.OV)("md"),i=(0,ev.OV)("xs"),o=tt(),{setShowSidebars:a}=(0,ed.Z)();return(0,n.jsxs)("div",{className:(0,eh.cn)('flex items-center h-full px-0 "md:gap-3'),children:[t&&r?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ep.z,{size:"icon",variant:"ghost",onClick:()=>document.dispatchEvent(new Event("pai:modal:close")),children:(0,n.jsx)(e7,{})})}):(0,n.jsxs)(ez(),{href:"/",className:(0,eh.cn)("group flex items-center relative outline-none focus:outline-none focus:ring-none ring-0 bg-pg-700/50 hover:bg-pg-600 transition-all duration-100",o?"":"md:py-3 md:pl-4 md:pr-6 md:w-48",i&&"hidden",o?"bg-inherit":"bg-pg-700/50 hover:bg-pg-600","h-10 w-10 p-0  rounded-pg-base"),onClick:()=>a(!1),children:[(0,n.jsx)(e8.d,{className:o?"hidden h-7":"hidden md:block h-7"}),(0,n.jsx)(e8.K,{className:o?"block h-7":"block md:hidden h-7"}),(0,n.jsx)("div",{className:(0,eh.cn)("rounded-full transition-all duration-150 h-0.5 w-4 absolute bottom-1 bg-pg-500 left-[50%] -translate-x-[50%] group-hover:w-6 group-hover:bg-pg-300",o?"hidden":"block")})]}),(0,n.jsx)(tr,{})]})}function tt(){let e=!!(0,l.Z)(),t=(0,ev.OV)("md");return e&&!t}function tr(){let{setShowSidebars:e}=(0,ed.Z)(),t=tt(),r=(0,e9.usePathname)(),i=(0,l.Z)(),o=[{href:"/feed",active:"/"===r,label:"Explore"},{href:"/me",label:"My Creations",active:"/me"===r||r?.includes(`/profile/${i?.id}`)||r?.includes(`/profile/likes/${i?.id}`)},{href:"/design",label:"Design"}];return(0,n.jsx)("div",{className:t?"flex gap-1":"hidden",children:o.map(t=>{let{href:r,label:i,active:o=!1}=t;return(0,n.jsx)(ep.z,{asChild:!0,variant:"ghost",className:"relative group font-pg-bold text-base text-pg-200 h-10",children:(0,n.jsxs)(ez(),{prefetch:!0,href:r,onClick:()=>e(!1),children:[i,(0,n.jsx)("div",{className:(0,eh.cn)("w-0 bottom-1 absolute left-1/2 -translate-x-1/2",o?"w-[calc(100%_-_2rem)]":"group-hover:w-4","transition-all duration-150 ease-in-out","bg-pg-500 h-[2px] rounded-full")})]},r)},r)})})}function tn(e){let t=(0,N.useSession)();return t?.data?.user?.db?(0,n.jsx)(n.Fragment,{children:e.children}):null}function ti(e){let t=(0,N.useSession)();return t?.data?.user?.db?null:(0,n.jsx)(n.Fragment,{children:e.children})}function to(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,n.jsx)("path",{d:"M12 12.1173C13.8476 12.1173 15.3453 10.5241 15.3453 8.55866C15.3453 6.59327 13.8476 5 12 5C10.1524 5 8.65466 6.59327 8.65466 8.55866C8.65466 10.5241 10.1524 12.1173 12 12.1173Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M6.69635 19H17.3036C18.479 19 19.3844 17.9248 18.8356 16.8193C18.0281 15.1929 16.1873 13.2514 12 13.2514C7.81267 13.2514 5.97187 15.1929 5.16443 16.8193C4.61552 17.9248 5.52093 19 6.69635 19Z",fill:"currentColor"})]})}var ta=r(45563),ts=r(15274),tl=r(57755);let tu=e=>{let{isDeveloperMode:t,toggleDeveloperMode:r,toggleOutpaintContext:i}=e,{setModalContent:o}=(0,u.d)(),a=e=>{o((0,n.jsx)(eu.ZP,{tab:e}),{transitionModal:!0,useBlurredBackground:!0,removeBorder:!0})},l=(0,ea.y)("disabled-background-scroll-for-modals"),c=(0,ev.OV)("xs"),f=(0,ev.OV)("md");(0,ev.OV)("lg");let p=(0,ta.zq)(),h=(0,N.useSession)(),m=h?.data?.user.db,g=(0,R.z0)(),v=(0,el.useRouter)(),y=eL.t5.useUserHasPermission("admin-home-page"),x=eL.t5.useUserHasPermission("research-home-page"),b=m?.image||"https://cdn.playground.com/logo/Logo.png",w=(0,et.h)(),_=tt(),j=(0,s.K)(),C=j>0?j.toLocaleString("en-US"):j,k=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(tn,{children:(0,n.jsx)(eY,{})}),!_&&(0,n.jsxs)(tn,{children:[(0,n.jsx)(eM.VD,{}),(0,n.jsxs)(eU,{href:m?`/profile/${m.id}`:"/login",className:"flex items-center gap-2 pr-4",mixpanelEvent:"Used Navigation menu",mixpanelKey:"profile",children:[(0,n.jsx)(ts.t,{}),"My creations"]}),(0,n.jsxs)(eU,{href:"/feed",mixpanelEvent:"Used Navigation menu",mixpanelKey:"community-feed",className:"flex items-center gap-2 pr-4",children:[(0,n.jsx)(eT,{}),"Community feed"]})]}),c&&(0,n.jsx)(tn,{children:(0,n.jsxs)(eU,{href:"/notifications",mixpanelEvent:"Used Navigation menu",mixpanelKey:"notifications",className:"flex items-center gap-2 pr-4",children:[(0,n.jsxs)("div",{className:"relative shrink-0",children:[(0,n.jsx)(ec.on,{className:"-right-1 -bottom-2"}),(0,n.jsx)(e3.D,{})]}),"Notifications ",C?`(${C})`:""]})}),c&&(0,n.jsx)(tn,{children:(0,n.jsxs)(eM.Xi,{className:"flex items-center gap-2 pr-4",onClick:()=>{d().track("Rate images button clicked"),w(!0,!0)},children:[(0,n.jsx)(eC,{}),"Rate images"]})}),(0,n.jsxs)(tn,{children:[(0,n.jsx)(eM.VD,{}),(0,n.jsxs)(eM.Xi,{className:"flex items-center gap-2 pr-4",onClick:()=>v.push("/design"),children:[(0,n.jsx)(tl.P,{className:"h-5 w-5 ml-[2px] mr-[2px]"}),"Design Mode"]})]}),(0,n.jsxs)(tn,{children:[(0,n.jsx)(eM.VD,{}),(0,n.jsxs)(eM.Xi,{onSelect:()=>a(),mixpanelEvent:"Used Navigation menu",mixpanelKey:"settings",className:"flex items-center gap-2 pr-4",children:[(0,n.jsx)(eO.e,{}),"Settings"]}),(0,n.jsxs)(eM.Xi,{onSelect:()=>a("billing"),mixpanelEvent:"Used Navigation menu",mixpanelKey:"billing",className:"flex items-center gap-2 pr-4",children:[(0,n.jsx)(eR,{}),"Billing"]})]}),(0,n.jsxs)(eU,{href:"/pricing",mixpanelEvent:"Used Navigation menu",mixpanelKey:"pricing",className:"flex items-center gap-2 pr-4",children:[(0,n.jsx)(eA,{}),"Pricing"]}),(0,n.jsx)(e4,{}),g&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(eM.Ph,{children:[(0,n.jsx)(eM.kt,{disabled:!(r||i),className:"pr-4 flex items-center gap-2",children:"Debug"}),(0,n.jsx)(eM.TG,{alignOffset:-4,sideOffset:3,children:r&&(0,n.jsxs)(eM.bO,{checked:t,"data-variant":t?"inset":void 0,onCheckedChange:()=>r(),children:[(0,n.jsx)(eD.nC,{children:(0,n.jsx)(ek.nQG,{})}),"Developer Mode",(0,n.jsx)(tc,{children:(0,n.jsx)(eP.Z,{})})]})})]})}),y&&(0,n.jsx)(eU,{href:"/admin",mixpanelEvent:"Used Navigation menu",mixpanelKey:"admin",children:"Admin"}),x&&(0,n.jsx)(eU,{href:"/research",mixpanelEvent:"Used Navigation menu",mixpanelKey:"research",children:"Research"}),(0,n.jsxs)(ti,{children:[(0,n.jsx)(eM.VD,{}),(0,n.jsxs)(eM.Xi,{onSelect:()=>p(),className:"flex items-center gap-2 pr-4",children:[(0,n.jsx)(to,{}),"Log In"]})]}),(0,n.jsxs)(tn,{children:[(0,n.jsx)(eM.VD,{}),(0,n.jsxs)(eM.Xi,{onSelect:async()=>{await (0,N.signOut)({redirect:!1}),await v.push("/")},className:"flex items-center gap-2 pr-4",children:[(0,n.jsx)(eI,{}),"Log Out"]})]}),(0,n.jsx)(eM.VD,{}),(0,n.jsx)(eB,{})]});return(0,n.jsxs)(eM.h_,{modal:c||l,children:[(0,n.jsx)(eM.$F,{"data-cy":"header-user-dropdown-trigger",asChild:!0,id:"pai-dropdown-menubar",children:(0,n.jsx)(ep.z,{className:"data-[state=open]:bg-pg-500/50 data-[state=open]:text-pg-100",variant:"ghost",size:"icon",children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)(tn,{children:[(0,n.jsx)("img",{className:"rounded-full h-6 w-6",src:b,alt:"Avatar or logo"},b),(0,n.jsx)("span",{hidden:!0,"data-testid":"currentUserId",children:m?.id})]}),(0,n.jsx)(ti,{children:(0,n.jsx)(to,{})})]})})}),(0,n.jsx)(eM.AW,{align:"end",side:"top",sideOffset:c?0:f?12:8,className:(0,eh.cn)("max-xs:w-screen max-xs:rounded-t-none"),children:(0,n.jsx)(e6.x,{ViewportProps:{className:"max-h-[calc(100vh_-_14rem)] xs:max-h-[calc(100vh_-_12.5rem)]"},children:k})})]})},tc=(0,eN.L)("div",eS().RightSlot);var td=r(97416);function tf(){let{config:e}=function(){let e=(0,a.useContext)(tv);if(!e)throw Error("useHeader must be used within a HeaderProvider");return e}(),t=(0,el.useRouter)(),r=(0,N.useSession)(),i=r.data?.user.db,{setModalContent:o}=(0,u.d)(),s=()=>{o((0,n.jsx)(eu.ZP,{}),{transitionModal:!0,useBlurredBackground:!0,removeBorder:!0})};(0,a.useEffect)(()=>{t?.query?.settings==="1"&&(s(),t.replace(t.pathname,t.pathname,{shallow:!0}))},[]);let{showSidebars:l}=(0,ed.Z)(),c=(0,ev.OV)("xs"),d=(!!e?.rateImages||l)&&!c&&i,f=(!!e?.notifications||l)&&!c;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:(0,eh.cn)(i?"md:pt-0":"","flex flex-col items-end"),children:(0,n.jsxs)("div",{className:(0,eh.cn)("flex h-full items-center w-full","gap-2"),children:[(0,n.jsxs)(tn,{children:[(0,n.jsx)(ew,{}),d&&(0,n.jsx)(tp,{}),f&&(0,n.jsx)(ec.Ok,{}),(0,n.jsx)(tu,{}),(0,n.jsx)(th,{})]}),(0,n.jsx)(ti,{children:(0,n.jsx)(tu,{})})]})})})}function tp(){let e=(0,et.h)(),[t,r]=function(){let[e,t]=(0,a.useState)(!0),r=(0,td.g)();return[r.data&&0===r.data.num_images_today&&e,t]}(),i=(0,a.useCallback)(()=>{r(!1),d().track("Rate images button clicked"),e(!0,!0)},[e,r]);return(0,n.jsxs)(eg.u,{children:[(0,n.jsx)(eg.aJ,{asChild:!0,children:(0,n.jsxs)(ep.z,{onClick:i,variant:"ghost",size:"icon",className:"relative text-pg-300",children:[(0,n.jsx)(eC,{}),t&&(0,n.jsx)(ec.$N,{className:(0,eh.cn)("bottom-[14px] right-[14px] w-3 h-3","bottom-1.5 right-1.5")})]})}),(0,n.jsx)(eg._v,{children:"Rate images"})]})}function th(){let{pathname:e}=(0,el.useRouter)(),{showSidebars:t,setShowSidebars:r}=(0,ed.Z)(),i=(0,ev.OV)("xs"),o=function(e){let[t,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{function t(t){let{key:n}=t;e.includes(n)&&r(!0)}function n(t){let{key:n}=t;e.includes(n)&&r(!1)}return window.addEventListener("keydown",t),window.addEventListener("keyup",n),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",n)}},[e]),t}(["Meta","Control"]);return"/create"===e||t||i?null:(0,n.jsx)(ep.z,{className:"ml-1",size:"lg",variant:"create",onClick:()=>{o||r(!0)},asChild:!0,children:(0,n.jsx)(ez(),{href:"/create",children:"Create"})})}var tm=r(32622),tg=r(77428);let tv=(0,a.createContext)(void 0);function ty(e){let t=function(){let e=(0,el.useRouter)();if("/"===e.asPath||e.asPath.startsWith("/feed"))return"top"===e.query.sort?"Top":"Rising";if(e.asPath.startsWith("/profile"))return"Profile";if(e.asPath.startsWith("/create"))return"Create";if(e.asPath.startsWith("/notifications"))return"Notifications";if(e.asPath.startsWith("/pricing"))return"Pricing";if(e.asPath.startsWith("/search"))return"Search";if(e.asPath.startsWith("/daily-theme"))return"Daily Theme";if(e.asPath.startsWith("/playground-v3"))return"Playground v3";if(e.asPath.startsWith("/my-feed"))return"My Feed";if(e.asPath.startsWith("/c/")){let t=Object.values(tg.j).find(t=>t&&e.asPath.startsWith(t.url));return t?t.name:e.asPath.split("/").pop().replace(/-/g," ").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}return""}(),r=(0,ei.cK)(),{showSidebars:i}=(0,ed.Z)(),o=(0,el.useRouter)(),a=!!o?.query.postId;return(0,n.jsxs)(tx,{...e,children:[(0,n.jsx)(tm.r,{}),(0,n.jsx)(te,{isSingleImagePage:a}),(0,n.jsx)("div",{className:(0,eh.cn)("xs:hidden absolute w-[calc(100%-32px)] text-center text-md font-pg-semibold pointer-events-none"),children:t}),(0,n.jsx)(tf,{}),(0,n.jsx)(tb,{isExpanded:r||i})]})}function tx(e){let{zIndex:t}=e,r=(0,ev.OV)("xs");return(0,n.jsx)(tv.Provider,{value:e,children:(0,n.jsx)("nav",{className:(0,eh.cn)("flex justify-between gap-4 p-4 left-0 right-0 fixed bg-background items-center transition-all duration-layout-speed",e.showHeader?"top-0":"-top-20",r?"h-11":"h-16"),style:{zIndex:t},children:e.children})})}function tb(e){return(0,n.jsx)("div",{className:(0,eh.cn)("absolute bottom-0 border-b-border border-b transition-all duration-layout-speed",e.isExpanded?"right-0 left-0":"right-4 left-4")})}var tw=r(5152),t_=r.n(tw),tj=r(40607);function tC(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 12C19 15.866 15.866 19 12 19C8.13401 19 5 15.866 5 12C5 8.13401 8.13401 5 12 5C15.866 5 19 8.13401 19 12ZM9.9 12C11.265 12 12 11.1922 12 9.9C12 11.1922 12.735 12 14.1 12C12.735 12 12 12.8078 12 14.1C12 12.8078 11.265 12 9.9 12Z",fill:"currentColor"})})}function tk(){let e=(0,el.useRouter)(),{setShowSidebars:t}=(0,ed.Z)(),{openSearch:r,isSearchOpen:i}=e_(),[o,s]=(0,a.useState)(0),l=[{title:"Community",icon:(0,n.jsx)(tC,{className:"h-10 w-10"}),onClick:()=>{t(!1),e.push("/feed")}},{title:"My creations",icon:(0,n.jsx)(ts.t,{className:"h-10 w-10"}),onClick:()=>{t(!1),e.push("/me")}},{title:"Create",icon:(0,n.jsx)(e8.K,{height:32,width:32,className:"w-[34px]"}),onClick:()=>{t(!0),e.push("/create")}},{title:"Search",icon:(0,n.jsx)(em,{className:"h-10 w-10"}),onClick:()=>{t(!1),r()}},{title:"Notifications",icon:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(ec.on,{className:"-right-[8px] top-[0px]"}),(0,n.jsx)(e3.D,{className:"h-10 w-10"})]}),onClick:()=>{t(!1),e.push("/notifications")}}],u=(0,a.useMemo)(()=>e.asPath.includes("/search")||i?"Search":e.asPath.includes("/feed")||"/"===e.asPath?"Community":e.asPath.includes("/create")?"Create":e.asPath.includes("/profile")?"My creations":e.asPath.includes("/notifications")?"Notifications":"",[e.asPath,i]);return(0,a.useEffect)(()=>{s(o+1)},[e.asPath,i]),(0,n.jsx)("div",{className:(0,eh.cn)("fixed xs:hidden z-30 inset-x-0 bottom-0 bg-pg-900 text-white text-xs flex justify-around items-center","pb-[calc(8px+env(safe-area-inset-bottom))] pt-[8px]"),children:(0,n.jsx)(tj.mQ,{defaultValue:u,className:"w-full",children:(0,n.jsx)(tj.dr,{className:"w-full rounded-none m-0 px-1 bg-inherit",children:l.map(e=>{let{icon:t,...r}=e;return(0,n.jsx)(tj.SP,{value:r.title,className:(0,eh.cn)("w-full h-full px-0 py-0","inline-flex items-center justify-center whitespace-nowrap rounded-none text-base 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-inherit data-[state=active]:text-foreground data-[state=active]:shadow-none"),onClick:r.onClick,children:(0,n.jsx)("div",{className:"flex flex-col items-center",children:t})},r.title)})})},`mobile-tabs-${o}`)})}let tE=t_()(()=>Promise.resolve().then(r.bind(r,43857)).then(e=>e.UserUsageDialog),{loadableGenerated:{webpack:()=>[43857]},ssr:!1}),tS=(0,a.createContext)({imageOptions:{},batches:[],imageHistory:[],filters:[],usage:{}});function tN(){return(0,a.useContext)(tS)}function tP(e){let{children:t,className:r,liftHeaderZIndex:i,disableTitle:o,headerConfig:s,baseImage:l}=e,c=(0,W.WI)(),h=(0,W.s4)(),{data:j}=(0,en.H)(),{batches:E,buttonTimeoutUntil:D,filters:z,generateImage:G,setImageHistory:el,updateControlNetOptions:eu,deleteControlNetAtIndex:ec,setInitImage:ed,setOverlayImage:ef,setShowNegativePrompt:ep,showNegativePrompt:em,setColumns:eg,setUsesRandomSeed:ey,highResFixEnabled:ex,setHighResFixEnabled:eb,setNegativePromptSetting:ew,negativePromptSetting:e_,strokePaths:ej,updateImageOptions:eC,filterStyle:ek,imageHistory:eE,imageOptions:eS,columns:eN,setImageOptions:eP,usesRandomSeed:eL,imageModal:eT,setImageModal:eO,textAreaRef:eR,promptBoxRef:eA,generateButtonRef:eI,firstPhotoRef:eM,editedImageRef:eD,usage:eF,presetId:ez,setPresetId:eB,navigateToImage:eU,gridTopRef:eV,isFocused:e$,setIsFocused:eH,handleUploadDescribeImage:eZ,describeImageDataURL:eW,setDescribeImageDataURL:eG,describeImageAbortController:eY,promptLoading:eK,setPromptLoading:eX}=function(e){let{baseImage:t,isPro:r,isTurbo:i}=e,[o,s]=(0,a.useState)(!1),l=(0,a.useRef)(null),c=(0,N.useSession)(),h=(0,R.z0)(),j=(0,R.Bg)(),[E,D]=(0,a.useState)(!t),[z,G]=(0,a.useState)(!1),[el,eu]=(0,a.useState)(!!t?.negative_prompt),[ec,ed]=(0,a.useState)(!1),{setModalContent:ef,closeModal:ep}=(0,u.d)(),[eh,em]=(0,a.useState)(()=>{let e=S("modelType");return B({modelType:t?.source&&!T.NP[t?.source]?.deprecated?t?.source:e&&!T.NP[e]?.deprecated?e:"default",baseImageOptions:t,isPro:r,isTurbo:i,highResFixEnabled:z,session:c?.data,controlNetOptions:x.Gc})}),[eg,ev]=(0,a.useState)([]),ey=(0,W.sA)(),ex=(0,a.useMemo)(()=>({session:c.data,isPaidPlan:ey}),[c.data,ey]),[eb,ew]=(0,a.useState)([]),e_=(e,t)=>{ew(r=>r.map(r=>r.expandPromptBatchId===e?{...r,...t}:r))};(0,Z.Z)(()=>{let e=sessionStorage.getItem(es);if(e)try{let t=JSON.parse(e);if(Array.isArray(t)){if(t.some(e=>e.meta==={}))throw Error("Invalid image history - expected meta to not be an empty object");ew(t)}else throw Error("Invalid image history - expected array")}catch(e){console.error(e),sessionStorage.removeItem(es)}});let ej=m().debounce(()=>{let e=eb.filter(e=>!e.loading).slice(0,100).map(e=>({...e,url_jpeg:void 0,...e.meta?{meta:{...e.meta,options:{...e.meta.options,controlNetOptions:void 0,controlnet:void 0,controlnet_conditioning_scale:void 0,controlnet_images:void 0,preprocessor_settings:void 0,init_image:void 0,mask_image:void 0}}}:{}}));try{sessionStorage.setItem(es,JSON.stringify(e))}catch(e){console.error(e),sessionStorage.removeItem(es)}},1e3);(0,a.useEffect)(()=>(ej(),()=>{ej.cancel()}),[eb]);let eC=(0,a.useCallback)(()=>{sessionStorage.removeItem(es)},[]);(0,Z.Z)(()=>(window.addEventListener("beforeunload",eC),()=>{window.removeEventListener("beforeunload",eC)}));let{columns:ek,setColumns:eE}=(0,eo.b)(),[eS,eN]=(0,a.useState)(!1),[eP,eL]=(0,a.useState)(null),[eT,eO]=(0,a.useState)(null),eR=(0,a.useRef)(null),eA=(0,a.useRef)(null),eI=(0,a.useRef)(null),eM=(0,a.useRef)(null),eD=(0,a.useRef)(null),{data:eF,mutate:ez}=(0,en.H)(),[eB,eU]=(0,a.useState)(()=>(function(e){let{baseImageOptions:t}=e,r=w.Vt.get(t?.filter??"");return r?r.negativePrompt?"custom":"none":t?.negative_prompt?"custom":"none"})({baseImageOptions:t})),[eV,e$]=(0,a.useState)(),eH=(0,et.h)(),eZ=(0,ei.cK)();(0,a.useEffect)(()=>{(0,P.U)(),setTimeout(()=>{eZ&&(j?eA.current?.focus():eR.current?.focus())},250),new Image().src="/images/base.png"},[eZ,j,eA,eR]),(0,a.useEffect)(()=>{if(!t||eS||t.width||t.height)return;let e=new Image;e.onload=()=>{em(t=>({...t,width:e.width,height:e.height})),eN(!0)},e.src=t.url},[]);let eW=(0,a.useCallback)(e=>n=>{C.includes(e)&&k(e,n);let i={};"modelType"===e&&(n===A.Hn.STABLE_DIFFUSION&&d().track("Setting model to SD1.5 on Board"),i=B({modelType:n,baseImageOptions:t,isPro:r,session:c?.data,override:{private:eh.private,prompt:eh.prompt,expandPrompt:eh.expandPrompt,negativePrompt:eh.negativePrompt??void 0,seed:eh.seed,start_schedule:eh.start_schedule,init_image:eh.init_image,width:eh.width,height:eh.height,num_images:eh.num_images,high_noise_frac:eh.high_noise_frac},controlNetOptions:x.Gc})),e in V.Cq&&eh.modelType&&V.Cq[e]?.({modelType:eh.modelType})&&(0,V.u7)(e,n),em(t=>({...t,...i,[e]:n}))},[eh,t,r,c?.data]),eq=function(e){let t=(0,R.z0)(),r=(0,R.l6)(),n=(0,W.sA)(),i=(0,R.cd)(),[o]=(0,q.I)(F.M9,!1);return(0,a.useMemo)(()=>w.wz.filter(a=>{if(1===a.models.length&&a.models[0]===A.Hn.STABLE_DIFFUSION||a.is_pro&&!i)return!1;let s=!0;return"beta"===a.hide_behind_feature_flag?s=r:"paid"===a.hide_behind_feature_flag?s=n:a.hide_behind_feature_flag&&(s=t),(!o||!!a.models.includes(A.Hn.PLAYGROUND_V3))&&("default"===e?(a.models.includes(A.Hn.STABLE_DIFFUSION_XL)||a.models.includes(A.Hn.PLAYGROUND_V2)||a.models.includes(A.Hn.PLAYGROUND_V2_5))&&s:a.models.includes(e)&&s)}),[e,i,r,t,n,o])}(eh.modelType),eG=(0,a.useMemo)(()=>(0,I.rT)(eq),[eq]),eY=(0,a.useMemo)(()=>eG.find(e=>e.id===eh.filter)??w.$p,[eG,eh.filter]),eK=function(e){let t=(0,a.useMemo)(()=>K(e),[e]);return Y.t.useEstimatedQueueTime(t)}(eh),eX=Y.t.useBlockGenerationDueToHighQueueTime(eK),eJ=(0,a.useCallback)(async e=>{let{variants:r=!1,override:n,expandPromptBatchId:i}=e;if(eX.isBlocked){Y.t.notifyUserThatGenerationWasBlockedDueToLongQueue({priorityLevel:eX.priorityLevel,isPaidPlan:ey});return}let o=()=>{(0,P.U)()},a={...eh,...n??{}};a.isPrivate=!!a.private,delete a.private,a.filter===w.$p.id&&delete a.filter,"default"===eh.modelType&&(a.modelType=(0,I.CX)(eh)),"default"!==eh.modelType&&a.filter&&!w.Vt.get(a.filter)?.models.includes(eh.modelType)&&delete a.filter;let s=a.num_images||1,l=Array(s).fill(0).map(()=>Math.random().toString()),u=(0,b.Y)(10),c=setTimeout(()=>(0,U.K)("pai:board:long-generation"),2e4),m=new AbortController;if((a?.width||1)*(a?.height||1)>1048576){J._.showKnownError("DIMENSIONS_TOO_LARGE",ex);return}if(a.init_image&&a.mode&&[y.yB.GenUpscale,y.yB.Upscale].includes(a.mode)){let[e,t]=await (0,g.vn)(a.init_image);if(e*t>1048576){J._.showKnownError("UPSCALE_IMAGE_TOO_LARGE",ex);return}}setTimeout(()=>{(0,O.b)("(max-width: 1280px)")&&eM.current?.scrollIntoView({behavior:"smooth"})},100);let v=E?(0,T.mZ)():a.seed,_=n?.prompt??a.prompt,j=("prompt_callback"in eY?eY.prompt_callback(_):eY.prompt?.length?_+", "+eY.prompt:_).split("\n").filter(e=>!e.startsWith("#")).join("\n"),C=(0,X.Z)(),k={...a,prompt:j,seed:v,baseImageId:t?.id,batchId:u,generateVariants:!!r,dream_booth_model:eY?.dream_booth_model,initImageFromPlayground:!1,statusUUID:C},S=function(e){let{imageOptions:t,filterStyle:r,type:n}=e;return t.modelType===A.Hn.DALLE||"none"===n?H:(t.modelType===A.Hn.STABLE_DIFFUSION_2||(t.modelType,A.Hn.STABLE_DIFFUSION_XL),{negativePrompt:t.negativePrompt??null})}({filterStyle:eY,imageOptions:eh,type:eB});k.negativePrompt=S.negativePrompt??void 0;let N=k?.width||1,R=k?.height||1,D=N/R;if([A.Hn.STABLE_DIFFUSION,A.Hn.PLAYGROUND_V1].includes(eh.modelType)&&!k.init_image&&N>512&&R>512&&D>.5&&D<2?k.high_res_fix=!0:h&&(k.high_res_fix=z),!k.init_image){let e=[],t=[],r=[],n=[];for(let i=0;i<x.L5;i++){let o=k.controlNetOptions?.[i];o&&o.type&&o.base64Image&&o.conditioningScale&&(e.push(o.type),t.push(o.base64Image),r.push(o.conditioningScale),o.type===x.sU.Canny?n.push(o.preprocessorSettings||{}):n.push({}))}e.length&&t.length&&r.length&&n.length&&(k.controlnet=e,k.controlnet_images=t,k.controlnet_conditioning_scale=r,k.preprocessor_settings=n)}delete k.controlNetOptions,k.init_image&&(k.initImageFromPlayground=ec),k.init_image&&k.mask_image&&(k.modelType=A.Hn.STABLE_DIFFUSION_XL,k.start_schedule=.98,k.high_noise_frac=1,k.strength=.02);let[F,B]=(0,I.e_)(k);F&&(k.high_noise_frac=1);let V=k.modelType===A.Hn.PLAYGROUND_V2_5,$=k.modelType===A.Hn.PLAYGROUND_V3;console.log(k.modelType),V&&(k.guidance_scale=3,k.cfg_scale=3,k.sampler=M.HH.fromKey("DPMPP_2M_K").samplerId),$&&(k.sampler=M.HH.fromKey("DPM2").samplerId,k.guidance_scale=6,k.cfg_scale=6),delete k.invert_mask;let Z={...k},W=Z.expandPrompt&&!!Z.prompt&&!r&&![y.yB.GenUpscale,y.yB.Upscale,y.yB.Instruct].includes(Z?.mode||y.yB.Image),q=[],G="/images/base.png";(Z.mode===y.yB.GenUpscale||Z.mode===y.yB.Upscale)&&Z.init_image&&(G=Z.init_image);for(let e=0;e<s;e++)q.push({loading:!0,url:G,imageKey:l[e],prompt:j,abortController:m,width:a?.width??1,height:a?.height??1,aspectRatio:(a?.width??1)/(a?.height??1),createdAt:new Date,statusUUID:C,batchId:u,expandPromptBatchId:i,isExpanding:W,meta:{options:k,filterStyle:eY,prompt:_,negativePrompt:k.negativePrompt??"",batchId:u}});ew(e=>[...q,...e]);try{d().track("Created image",{...Z,modeText:(0,I.GT)(Z.mode)})}catch(e){console.error(e)}let K=await (0,L.wX)(async()=>{if(W){e_(i,{isExpanding:!0});let e=await Q.Z.getExpandedPrompt(i||(0,ee.x0)(),{prompt:Z.prompt,mode:$?"prompt-expander":void 0});Z.original_prompt=Z.prompt,Z.prompt=e,e_(i,{isExpanding:!1,prompt:e})}return p().post("/api/models",Z,{signal:m.signal})});if(c&&clearTimeout(c),(0,L.dZ)(K)){let e=K.error;if(console.log(e),e instanceof f.CanceledError)d().track("Cancelled image generation");else{let t=e.response?.data?.error,r=e.response?.data?.errorCode;("RATE_LIMITED"===r||"SAFETY_FILTER_RATE_LIMITED"===r)&&eL(new Date(e.response.data.validDate)),"EXPAND_PROMPT_LIMIT_EXCEEDED"!==r&&"EXPAND_PROMPT_ERROR"!==r&&(console.log("Error creating image",e),J._.showError(r,{errBody:t,...ex},k)),d().track("Error creating image",{error:t,errorCode:r,error_raw:e}),ew(e=>e.filter(e=>e.batchId?e.batchId!==u:e.id!==u))}o();return}let{data:{images:et,warningCode:er,warningMessage:en,meta:ei}}=K;if(ei?.numImagesInLast24Hours){let e=eF.numImagesInLastDay+(a.num_images||1);d().track("Updating usage count",{numImagesInLast24Hours:ei?.numImagesInLast24Hours,numImagesInLastDay:e,difference:e-ei?.numImagesInLast24Hours,num_images:a.num_images||1,mode:a.mode,modelType:a.modelType}),ez({...eF,numImagesInLastDay:ei?.numImagesInLast24Hours})}if(ei?.numImagesInLast24Hours&&ei?.numImagesInLast24Hours>T.mw?eH():d().track("Ratings modal didn't launch",{reason:"not enough images today"}),et.length!==s){0===et.length&&console.error("We received no images.");let e=s-et.length;d().track("Unexpected number of images from API",{num_received:et.length,num_requested:s}),e&&et.length>=1?J._.showKnownError("SAFETY_FILTER_MULTI",ex,k):J._.showKnownError("UNKNOWN_ERROR",ex,k);for(let t=s-1;t>=s-e;t--){let e=l[t];ew(t=>t.filter(t=>t.imageKey!==e))}}"SAFETY_FILTER_MULTI"===er||er&&J._.showError(er,ex),await Promise.all(et.map(async(e,t)=>{if(e){await (0,g.Wv)(e.url);let r=["hide"];ew(n=>n.map(n=>n.imageKey===l[t]?{...e,...r.reduce((e,t)=>({...e,[t]:n[t]}),{}),loading:!1,meta:{options:k,filterStyle:eY,prompt:_,negativePrompt:k.negativePrompt??"",batchId:u}}:n))}}));let eo=et.length,ea=(await p().get(`/api/images/batch?batchId=${u}&batchSize=${eo}`)).data.images;await Promise.all(ea.map(async e=>{e&&ew(t=>t.map(t=>t.imageKey===e.fileName?{...e,url_jpeg:t.url,meta:{options:k,filterStyle:eY,prompt:_,negativePrompt:k.negativePrompt??"",batchId:u,upscaledFromUrl:Z.mode===y.yB.GenUpscale||Z.mode===y.yB.Upscale?G:void 0}}:t))})),o()},[t?.id,eY,eh,el,E,z,eB,eX,ex,ey]),eQ=(0,ea.y)("scroll-top-top-board"),e0=(0,a.useCallback)(async e=>{let{variants:t=!1,override:n}=e,o=(0,ee.x0)(),a=n?.num_images||eh.num_images,s=r||i,u=a&&(eF.numImagesInLastDay<T.Ew||a>4),d=["patrick@playgroundai.com","suhail@playgroundai.com","shivam@playgroundai.com","joao.souza@playgroundai.com"].includes(c.data?.user.email??"");eQ&&l.current?.scrollIntoView({block:"end",behavior:"smooth"}),a&&s&&u||d?await Promise.all(Array(a).fill(null).map(()=>eJ({variants:t,override:{...n,num_images:1},expandPromptBatchId:o}))):await eJ({variants:t,override:n,expandPromptBatchId:o})},[eF,eJ,eh.num_images,r,i,c.data?.user.email,eQ]),e1=(0,a.useCallback)(async(e,t)=>{em(t=>(t.mask_image=e,eh.mode==y.yB.Image&&void 0===eh.mask_strength&&(t.mask_strength=v.M2),t)),ev(t)},[em,eh]),e2=async(e,t)=>{let{inpaint:r,mode:i,preserveStartSchedule:o=!1,useCurrentImageDimensions:a=!1,initImageFromPlayground:s}=t,l=await (0,g.Wv)(e),u=eh.width??1024,c=eh.height??1024,d=(0,I.CX)(eh);r&&eh.modelType!==A.Hn.STABLE_DIFFUSION_XL&&eW("modelType")(A.Hn.STABLE_DIFFUSION_XL),a||([u,c]=(0,I.V8)([l.width,l.height])),d===A.Hn.PLAYGROUND_V3&&(u=(0,g.mm)(u),c=(0,g.mm)(c)),void 0===s&&(s=await (0,$.N)(e)),ed(s),em(t=>{let a=!o||null==eh.start_schedule||void 0===eh.start_schedule,s={...t,init_image:e,...a?{start_schedule:v.W$}:{},mask_strength:v.M2,height:c,mask_image:void 0,width:u,mode:i};return r&&(ev([]),ef((0,n.jsx)(_.ZP,{imageOptions:s,setOverlayImage:e1,handleClickClearInpaintingMask:()=>{em(e=>({...e,mask_image:void 0,mask_strength:void 0})),ev([])},strokePaths:[],close:ep}),{showCloseButton:!0,closeOnOutsideClick:!1})),s})},e5=(0,a.useMemo)(()=>{let e=[];return eb.forEach(t=>{if(t.hide)return;let r=e.find(e=>e.id===t.meta?.batchId);r?r.images.push(t):ek>0?e.push({id:t.id??t.imageKey??(0,b.Y)(10),images:[t]}):e.push({id:t.meta?.batchId,images:[t]})}),e},[eb,ek]),e4=function(e){let{imageHistory:t,imageModal:r,setImageModal:n}=e,i=t.filter(e=>{let{loading:t,hide:r}=e;return!t&&!r}),o=i.findIndex(e=>e.url===r?.url),s=o<i.length-1?i?.[o+1]:null,l=o>0?i?.[o-1]:null;(0,er.l)(r?.url),(0,er.l)(r?.compareToUrl),(0,er.l)(s?.url),(0,er.l)(s?.meta?.upscaledFromUrl),(0,er.l)(l?.url),(0,er.l)(l?.meta?.upscaledFromUrl);let u=(0,a.useCallback)(e=>{if(r){if("Next"===e&&s)return n({url:s?.url,compareToUrl:s?.meta?.upscaledFromUrl});if("Prev"===e&&l)return n({url:l?.url,compareToUrl:l?.meta?.upscaledFromUrl})}},[r,s,l,n]);return(0,a.useEffect)(()=>{let e=e=>"Escape"===e.key&&r?n(null):"ArrowRight"===e.key?u("Next"):"ArrowLeft"===e.key?u("Prev"):void 0;return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[r,u,t,n]),u}({imageHistory:eb,imageModal:eT,setImageModal:eO}),[e3,e6]=(0,a.useState)(!1),[e8,e7]=(0,a.useState)(null),e9=(0,a.useRef)(null),te=(0,a.useCallback)(async e=>{e6(!0),e9.current?.abort(),e9.current=new AbortController;let t=await (0,g.Kk)(e);e7(t);let r=JSON.stringify({image_url:t}),n=await fetch("/api/models/v2/describe-image",{method:"POST",body:r,headers:{"Content-Type":"application/json"},signal:e9.current.signal}).catch(()=>null),i=await n?.json();e6(!1),e7(null),!e9.current.signal.aborted&&(i?.errorCode==="CAPTIONER_LIMIT_EXCEEDED"?J._.showKnownError(i.errorCode,{isPaidPlan:ey,session:c.data,errBody:i.errorMessage,type:"error"}):i?.description&&eW("prompt")(i.description))},[eW,e6,e9,e7,ey,c.data]);return{navigateToImage:e4,batches:e5,filters:eG,updateControlNetOptions:(e,t)=>{em(r=>{let n=[...r.controlNetOptions||x.Gc];return n[t]=e,{...r,controlNetOptions:n}})},deleteControlNetAtIndex:e=>{em(t=>{let r=t.controlNetOptions?[...t.controlNetOptions]:[];return r.splice(e,1),{...t,controlNetOptions:r}})},setInitImage:e2,setImageHistory:ew,updateImageOptions:eW,generateImage:e0,highResFixEnabled:z,setHighResFixEnabled:G,setOverlayImage:e1,setUsesRandomSeed:D,setShowNegativePrompt:eu,setColumns:eE,setImageOptions:em,setImageModal:eO,showNegativePrompt:el,strokePaths:eg,buttonTimeoutUntil:eP,filterStyle:eY,imageOptions:eh,imageHistory:eb,usesRandomSeed:E,columns:ek,imageModal:eT,textAreaRef:eR,promptBoxRef:eA,generateButtonRef:eI,firstPhotoRef:eM,editedImageRef:eD,usage:eF,negativePromptSetting:eB,setNegativePromptSetting:eU,presetId:eV,setPresetId:e$,gridTopRef:l,isFocused:o,setIsFocused:s,handleUploadDescribeImage:te,describeImageDataURL:e8,setDescribeImageDataURL:e7,describeImageAbortController:e9,promptLoading:e3,setPromptLoading:e6}}({baseImage:l,generationUsage:j,isPro:c,isTurbo:h}),eJ=(0,a.useMemo)(()=>eS,[eS]),eQ=(0,a.useMemo)(()=>({batches:E,buttonTimeoutUntil:D,filters:z,generateImage:G,setImageHistory:el,updateControlNetOptions:eu,deleteControlNetAtIndex:ec,setInitImage:ed,setOverlayImage:ef,setShowNegativePrompt:ep,showNegativePrompt:em,setColumns:eg,setUsesRandomSeed:ey,highResFixEnabled:ex,setHighResFixEnabled:eb,setNegativePromptSetting:ew,negativePromptSetting:e_,strokePaths:ej,updateImageOptions:eC,filterStyle:ek,imageHistory:eE,imageOptions:eJ,columns:eN,setImageOptions:eP,usesRandomSeed:eL,imageModal:eT,setImageModal:eO,textAreaRef:eR,promptBoxRef:eA,generateButtonRef:eI,firstPhotoRef:eM,editedImageRef:eD,usage:eF,presetId:ez,setPresetId:eB,navigateToImage:eU,gridTopRef:eV,isFocused:e$,setIsFocused:eH,handleUploadDescribeImage:eZ,describeImageDataURL:eW,setDescribeImageDataURL:eG,describeImageAbortController:eY,promptLoading:eK,setPromptLoading:eX}),[E,D,z,G,el,eu,ec,ed,ef,ep,em,eg,ey,ex,eb,ew,e_,ej,eC,ek,eE,eJ,eN,eP,eL,eT,eO,eR,eA,eI,eM,eD,eF,ez,eB,eU,eV,e$,eH,eZ,eW,eG,eK,eX,eY]),{isOpen:e0,setOpen:e1}=(0,eq.useUserUsageDialog)(),e2=(0,ei.cK)(),{rightSidebarOpen:e5}=(0,eo.A)(),e4=(0,ea.y)("zen-mode"),e3=(0,ev.r$)()||!e4||!e2||e5;return(0,n.jsxs)(tS.Provider,{value:eQ,children:[(0,n.jsx)(tL,{disableTitle:o}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ty,{zIndex:i?900:40,config:s,showHeader:e3}),(0,n.jsx)("div",{className:(0,eh.cn)("transition-all duration-layout-speed",`${e3?"mt-11 xs:mt-16":"xs-mt-16"}`,"min-h-[calc(100vh_-_4rem)]",r),children:(0,n.jsx)(ei.ZP,{isPro:c,isTurbo:h,generationUsage:j,children:t})}),(0,n.jsx)(tk,{})]}),(0,n.jsx)(tE,{open:e0,onOpenChange:e1})]})}function tL(e){let{disableTitle:t}=e,r=(0,s.K)(),i=r?`(${r}) `:"",a=!!(0,l.Z)(),u=`${i}Playground AI${a?"":" - Free AI Image Generator"}`;return(0,n.jsxs)(o(),{children:[!t&&(0,n.jsx)("title",{children:u}),(0,n.jsx)("link",{rel:"shortcut icon",href:"/favicon.ico"})]})}function tT(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!0===t?"max-w-screen-lg mx-auto px-10 text-white py-10":t;return function(t){return(0,n.jsx)(tP,{className:r||"",children:(0,n.jsx)(e,{...t})})}}},2291:function(e,t,r){"use strict";r.d(t,{d:function(){return l},_:function(){return a}});var n=r(5152),i=r.n(n),o=r(67294);function a(e,t){let[r,n]=(0,o.useState)(e),[i,a]=(0,o.useState)(t);return(0,o.useEffect)(()=>{n(e)},[e]),(0,o.useEffect)(()=>{a(t)},[t]),{numLikes:r,isLiked:i,onReactionChange:(0,o.useCallback)(e=>{e?(a(!0),n(e=>e+1)):(a(!1),n(e=>e-1))},[])}}let s=i()(()=>Promise.all([r.e(871),r.e(296),r.e(9260),r.e(2818)]).then(r.bind(r,42818)).then(e=>e.LikeButton),{loadableGenerated:{webpack:()=>[42818]},ssr:!1}),l=o.memo(s)},627:function(e,t,r){"use strict";r.d(t,{OG:function(){return s},ZP:function(){return o},s8:function(){return a}});var n=r(85893),i=r(86010);function o(e){let{small:t=!1,small2:r=!1,smaller:o=!1,smallest:a=!1,flex:s=!1,...l}=e;return(0,n.jsx)("span",{...l,className:(0,i.Z)(l.className,"inline-block",s&&"flex"),children:(0,n.jsxs)("div",{className:(0,i.Z)(t&&"small",r&&"small2",o&&"smaller",a&&"smallest","lds-spinner",s&&"mx-auto my-auto"),children:[(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{})]})})}function a(e){let{className:t,width:r=16,height:i=16}=e;return(0,n.jsx)("svg",{width:r,height:i,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",className:`spinner_aj0A ${t??"fill-gray-25"}`})})}function s(e){let{...t}=e;return(0,n.jsx)("div",{style:{background:"conic-gradient(transparent, white)",mask:"radial-gradient(7.5px, #0000 100%, #000)",WebkitMask:"radial-gradient(0.46875rem, #0000 99%, #000)",clipPath:"circle(10.5px)",filter:"blur(0.1px)"},className:"animate-spin w-6 h-6"})}r(67294)},46704:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(85893),i=r(22797);function o(e){return(0,n.jsx)(i.r,{className:"[&>span]:bg-[#39324E] [&>span[data-checked]]:bg-[#76ADFF] [&>span]:p-1",size:"md",...e})}r(67294)},33268:function(e,t,r){"use strict";r.d(t,{f:function(){return g}});var n=r(85893),i=r(3949),o=r(33299),a=r(25675),s=r.n(a),l=r(41664),u=r.n(l),c=r(11163),d=r(92323),f=r(70315),p=r(13346),h=r(1233),m=(r(7871),r(12242),r(20293),r(62469),r(627),r(38228));function g(e){let{hideCloseButton:t,redirectTo:r}=e,{closeModal:a}=(0,d.d)(),l=(0,c.useRouter)().query.redirect??r,{email:g,setEmail:v,code:y,setCode:x,loading:b,setLoading:w,error:_,setError:j,resendCodeCountdown:C,resetCodeCountdown:k,emailIsInUse:E,setEmailIsInUse:S,page:N,setPage:P,back:L}=(0,m.Bd)();return(0,n.jsxs)("div",{className:(0,h.cn)("text-white grid grid-cols-1 relative md:grid-cols-2 gap-8 mx-auto max-w-screen-lg rounded-md overflow-hidden bg-pg-950","p-8 md:p-0 md:pr-8 w-full m-8 md:m-auto md:w-auto"),children:[!t&&(0,n.jsx)("button",{type:"button",onClick:a,className:"absolute top-2 right-2",children:(0,n.jsx)(i.P,{})}),(0,n.jsx)("div",{className:"h-full relative flex",children:(0,n.jsx)("div",{className:"hidden md:block",children:(0,n.jsx)(s(),{src:"/images/sign_in_grid_2x.png",width:1024,height:1292,alt:"",className:"hidden md:inline md:object-contain object-cover w-full object-center content-center md:h-auto md:max-h-[80vh] max-w-[90vw]"})})}),(0,n.jsx)("div",{className:"flex flex-col gap-4 justify-center",children:(0,n.jsxs)("div",{className:"flex flex-col justify-items-stretch space-y-4 justify-center",children:[N===m.Bv.LOGIN_OPTIONS&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"relative flex items-center justify-center",children:(0,n.jsx)(u(),{href:"/feed",children:(0,n.jsx)("img",{src:"/logo-light.svg",alt:"",className:"md:w-36 h-8"})})}),(0,n.jsx)("h1",{className:"text-center text-base text-pg-50",children:"Sign in to create your first image"}),(0,n.jsxs)(p.z,{onClick:()=>(0,o.signIn)("google",l?{callbackUrl:l.toString()}:void 0),className:"gap-2",size:"lg",children:[(0,n.jsx)(f.Z,{}),"Continue with Google"]}),!1]}),!1,!1,_&&(0,n.jsx)("div",{className:"text-pai-error-red text-sm mt-2 text-center w-full",children:_})]})})]})}},20293:function(e,t,r){"use strict";r.d(t,{n:function(){return n}});let n=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)},38228:function(e,t,r){"use strict";r.d(t,{Bd:function(){return s},Bv:function(){return i},ek:function(){return l}});var n,i,o=r(11163),a=r(67294);function s(){(0,o.useRouter)();let[e,t]=(0,a.useState)(""),[r,n]=(0,a.useState)(""),[i,s]=(0,a.useState)(),[l,u]=(0,a.useState)(!1),[c,d]=(0,a.useState)(0),[f,p]=(0,a.useState)(!1),[h,m]=(0,a.useState)(0),g=(0,a.useCallback)(()=>{s(void 0),1===h?m(0):2===h&&m(1)},[h]);return{email:e,setEmail:t,code:r,setCode:n,loading:l,setLoading:u,error:i,setError:s,resendCodeCountdown:c,resetCodeCountdown:(0,a.useCallback)(()=>{d(30);let e=setInterval(()=>{d(t=>0===t?(clearInterval(e),0):t-1)},1e3);return()=>clearInterval(e)},[]),emailIsInUse:f,setEmailIsInUse:p,page:h,setPage:m,back:g,emailLoginFF:!0}}function l(){return(0,o.useRouter)(),{appleLoginFF:!0}}(n=i||(i={}))[n.LOGIN_OPTIONS=0]="LOGIN_OPTIONS",n[n.EMAIL_FORM=1]="EMAIL_FORM",n[n.VERIFICATION_CODE=2]="VERIFICATION_CODE"},37933:function(e,t,r){"use strict";r.d(t,{Z:function(){return L}});var n=r(85893),i=r(1679),o=r(34670),a=r.n(o),s=r(67294),l=r(95995),u=r(56888),c=r(29065);function d(){return(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M33 16.6198V17.9998C32.9982 21.2344 31.9508 24.3818 30.014 26.9725C28.0773 29.5633 25.3549 31.4585 22.253 32.3756C19.1511 33.2928 15.8359 33.1826 12.8017 32.0617C9.76752 30.9407 7.17698 28.8689 5.41644 26.1554C3.6559 23.4418 2.81969 20.2319 3.03252 17.0043C3.24534 13.7766 4.49581 10.7043 6.59742 8.24541C8.69903 5.78653 11.5392 4.07287 14.6943 3.36002C17.8494 2.64716 21.1504 2.9733 24.105 4.2898",stroke:"currentColor",strokeWidth:"3.41667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M33.0001 6L18.0001 21.015L13.5001 16.515",stroke:"currentColor",strokeWidth:"3.41667",strokeLinecap:"round",strokeLinejoin:"round"})]})}var f=r(86245);function p(e){let{attribute:t,onClick:r,src:i,message:o,useImageThumbnails:a}=e,c=(0,s.useMemo)(()=>a?(0,f.B)(i):i,[i,a]),d=(0,l.uo)(c,200),[p,m]=(0,u.h)();return(0,n.jsx)("li",{className:"lg:w-1/2 max-lg:h-1/2 lg:h-full max-lg:w-full",children:(0,n.jsxs)("button",{ref:p,type:"button",disabled:!1,onClick:r,className:"flex flex-col group justify-center items-center transition-all relative w-full h-full",style:{transform:d?"scale(1)":"scale(0.95)",opacity:d?1:0,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"center",transitionDelay:`${100*Math.random()}ms`},children:[(0,n.jsx)("img",{className:"max-w-full !max-h-full rounded-md absolute top-1/2 -translate-y-1/2 peer",src:d?d.url:"",alt:""}),d&&(0,n.jsx)(h,{ar:d?d.size[0]/d.size[1]:null,dimensions:m,message:o,attribute:t})]})})}function h(e){let{dimensions:t,ar:r,message:i,attribute:o}=e,a=t?t?.width/t?.height:0,s={INCORRECT:{color:"bg-dark-pink",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{color:"white"})," Incorrect answer"]})},CORRECT:{color:"bg-green-35",message:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d,{})," Correct answer"]})},default:{color:"bg-gray-50/90",message:(0,n.jsxs)(n.Fragment,{children:["Better ",o.name]})}}[i??"default"];return(0,n.jsx)("div",{className:`
      max-lg:hidden
      rounded-md ${s.color}
      pointer-events-none ${i?null:"opacity-0"} peer-hover:opacity-100 transition-opacity duration-100
      inline-block absolute ${a>(r??0)?"top-0 h-full":"left-0 w-full"}
      `,style:{mask:"url(/rankoverlay2.svg) center/contain no-repeat, linear-gradient(#fff 0 0)",WebkitMask:"url(/rankoverlay2.svg) center/contain no-repeat, linear-gradient(#fff 0 0)",maskComposite:"exclude",WebkitMaskComposite:"destination-out",aspectRatio:r+" / 1"},children:(0,n.jsx)("div",{className:`absolute bottom-0 font-pg-medium ${(r??0)>1.5?"text-xs":"text-sm"} text-white text-center w-full flex gap-1 h-[9%] items-center justify-center`,children:s.message})})}var m=r(50081),g=r(92323);function v(){return(0,n.jsxs)("svg",{width:"40",height:"41",viewBox:"0 0 40 41",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M7.9165 11.7513C7.9165 9.91035 9.40889 8.41797 11.2498 8.41797H28.7498C30.5908 8.41797 32.0832 9.91035 32.0832 11.7513V25.918C32.0832 27.759 30.5908 29.2513 28.7498 29.2513H24.3748L19.9998 32.5846L15.6248 29.2513H11.2498C9.40889 29.2513 7.9165 27.759 7.9165 25.918V11.7513Z",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M15.75 19.25L18 21.75L24.25 15.25",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}var y=r(8891),x=r.n(y);function b(e){let{style:t,onClose:r}=e;return(0,s.useEffect)(()=>{x().track("No more images on ELO page")},[]),(0,n.jsxs)("div",{style:t,className:"bg-gray-90 flex flex-col gap-3 justify-center items-center",children:[(0,n.jsx)("div",{className:"text-teal-primary scale-150",children:(0,n.jsx)(v,{})}),(0,n.jsxs)("div",{className:"text-white text-center font-pg-medium space-y-1 px-4",children:[(0,n.jsx)("h2",{className:"text-gray-25",children:"Thank you for your feedback!"}),(0,n.jsx)("p",{className:"text-gray-50",children:"There are no more images to rate today. Check back in tomorrow."}),(0,n.jsx)("button",{type:"button",className:"button button-secondary mx-auto !mt-4",onClick:r,children:"Close"})]})]})}function w(){return(0,n.jsx)("div",{className:"bg-gray-90 w-full h-full"})}var _=r(77832);let j=(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M7.75 8.75L11.25 12L7.75 15.25",stroke:"#C0C0C3",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.75 8.75L16.25 12L12.75 15.25",stroke:"#C0C0C3",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]});var C=r(24011),k=r(51879),E=r(26516),S=r(97686),N=r(97416);function P(){let{data:e}=(0,N.g)();return e?(0,n.jsxs)("dl",{className:"max-lg:hidden pl-5 flex gap-3 items-center",children:[(0,n.jsxs)("div",{className:a().StreakContainer,children:[(0,n.jsx)("div",{className:a()["icon-container"],children:(0,n.jsx)(S.Z,{size:16})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:"Streak"}),(0,n.jsx)("dd",{style:{minWidth:"45px"},children:e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"tabular-nums",children:e.streak})," ",1===e.streak?"day":"days"]}):(0,n.jsx)(n.Fragment,{children:"\xa0"})})]})]}),(0,n.jsxs)("div",{className:a().StreakContainer,children:[(0,n.jsx)("div",{className:a()["icon-container"],children:(0,n.jsx)(E.f,{className:"-translate-y-px",width:18})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:"Today's Goal"}),(0,n.jsx)("dd",{children:e?(0,n.jsxs)(n.Fragment,{children:[e.num_images_today," / ",k.Ci," ratings"]}):(0,n.jsx)(n.Fragment,{children:"\xa0"})})]})]})]}):null}function L(e){let{type:t,initialData:r}=e;return(0,n.jsx)("div",{className:"lg:w-[90vw] lg:max-h-[90vh] lg:aspect-video max-lg:w-screen max-lg:h-[100vh] bg-gray-90",children:(0,n.jsx)(T,{initialData:r??[],typeForSession:t})})}function T(e){let{typeForSession:t,initialData:r}=e,i=(0,m.i9)(t,r),{closeModal:o}=(0,g.d)();return i.noMoreImages?(0,n.jsx)(b,{onClose:o,style:{width:"100%",height:"100%"}}):i.pair?(0,n.jsx)(O,{useImageThumbnails:"elo"===t,...i}):(0,n.jsx)(w,{})}function O(e){let{pair:t,back:r,errorMessage:o,next:s,skip:l,useImageThumbnails:u}=e,{closeModal:c}=(0,g.d)(),d=()=>{s({selectedId:t.img2.id,pairId:t.id,attribute:t.attribute.name,experiment:t.experiment})},f=()=>{s({selectedId:t.img1.id,pairId:t.id,attribute:t.attribute.name,experiment:t.experiment})};return(0,_.K)("ArrowLeft",f),(0,_.K)("ArrowRight",d),(0,_.K)("ArrowDown",l),(0,n.jsxs)("div",{className:"text-gray-25 divide-y divide-gray-80 bg-gray-90 h-full flex flex-col","aria-modal":!0,children:[(0,n.jsx)("header",{className:"space-y-2 gap-3 lg:gap-4 p-4 px-8 flex-col lg:flex-row",children:(0,n.jsxs)("div",{className:"flex justify-between w-full lg:pr-5 items-center",children:[(0,n.jsxs)("div",{className:"flex divide-x divide-gray-80 gap-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-0.5 text-gray-50 font-pg-medium",children:[(0,n.jsx)("p",{className:"text-sm",children:"Improve your Playground experience"}),(0,n.jsx)("h1",{className:"text-md text-white font-pg-medium",children:"Select the image you like better"})]}),(0,n.jsx)(P,{})]}),(0,n.jsxs)("ul",{className:"flex gap-3 lg:pl-2 justify-between ",children:[(0,n.jsx)("li",{className:"max-lg:hidden",children:(0,n.jsxs)("button",{type:"button",className:a().TopBarButton,onClick:()=>l(),children:[j,"Skip"]})}),(0,n.jsx)("li",{children:(0,n.jsx)("button",{type:"button",className:"",onClick:c,children:(0,n.jsx)(i.T,{className:"text-gray-50 text-xs"})})})]})]})}),(0,n.jsxs)("main",{className:"pb-2 flex flex-col items-center p-2 pt-4 lg:px-4 flex-grow",children:[t.prompt&&(0,n.jsxs)("p",{className:"bg-gray-85 py-2 px-3 text-sm font-pg-medium rounded-md self-start w-full",children:["Prompt: ",t.prompt]}),(0,n.jsxs)("ul",{className:"flex gap-6 p-4 flex-col max-lg:items-center lg:flex-row h-full w-full",children:[(0,n.jsx)(p,{src:t.img1.url,attribute:t.attribute,onClick:f,message:t.img1.message,useImageThumbnails:u}),(0,n.jsx)(p,{src:t.img2.url,attribute:t.attribute,onClick:d,message:t.img2.message,useImageThumbnails:u})]}),(0,n.jsx)("footer",{className:"w-full ",children:o&&(0,n.jsx)("p",{className:"text-dark-pink bg-[#9D0034]/30 py-2 px-3 font-pg-medium text-sm rounded-md",children:o})}),t.img1.id&&(0,n.jsx)(R,{className:"left-2",children:t.img1.id.split(/(?=\.[^.]+$)/)[0].slice(-5)}),t.img2.id&&(0,n.jsx)(R,{className:"right-2",children:t.img2.id.split(/(?=\.[^.]+$)/)[0].slice(-5)})]})]})}let R=(0,C.L)("p","absolute bottom-2 opacity-10 text-xs font-mono")},50081:function(e,t,r){"use strict";r.d(t,{g9:function(){return m},i9:function(){return h}});var n=r(85893),i=r(67294),o=r(37933),a=r(69306),s=r(47435),l=r(8891),u=r.n(l),c=r(97416);let d={aesthetics:{color:"white",name:"aesthetic quality"}};async function f(){let e=await fetch("/api/images/pairs/elo?type=autorankerv2");if(204===e.status||!e.ok)return null;let t=await e.json(),r=[];return t.forEach(e=>{r.push({...e,attribute:d[e.attributeId]})}),r}async function p(){let e=await fetch("/api/images/pairs?type=autorankerv2");return 204===e.status?null:await e.json()}function h(e,t){let[r,n]=(0,i.useState)(t??[]),o=(0,a.r$)(),[s,l]=(0,i.useState)(null),[u,d]=(0,i.useState)([]),[h,m]=(0,i.useState)(!1),g=(0,c.g)(),v=(0,i.useCallback)(async()=>{let t=await ("elo"===e?f():p());if(null===t||0===t.length)return m(!0);n(e=>[...e,...t])},[e]),y=(0,i.useCallback)(async t=>{let{selectedId:i,pairId:a,attribute:s,experiment:u}=t;r.length<4&&v(),n(e=>e.slice(1)),g.incrementNumImagesToday();let c=`/api/images/pairs${"elo"===e?"/elo":""}`;if(200!==(await fetch(c,{method:"POST",body:JSON.stringify({winnerId:i,pairId:a,meta:{isMobile:o},category:s,experiment:u}),headers:{"Content-Type":"application/json"}})).status){l("Failed to submit vote. Please try again later.");return}l(null),d(e=>[...e,r[0]])},[o,v,r,e,g]),x=(0,i.useCallback)(()=>{n(e=>e.slice(1))},[]),b=(0,i.useCallback)(()=>{n(e=>[u[u.length-1],...e]),d(e=>e.slice(0,-1))},[u]),w=r[1];(0,i.useEffect)(()=>{let e=new Image,t=new Image;return w&&(e.src=w.img1.url,t.src=w.img2.url),()=>{e.src="",t.src=""}},[w]);let _=0===r.length;return(0,i.useEffect)(()=>{_&&!h&&v()},[_,h,v]),{pair:r[0],next:y,skip:x,back:b,errorMessage:s,noMoreImages:h}}async function m(e){let{setModalContent:t,skipFetchingInitialImages:r,typeForSession:i}=e,a=[];if(!r){let e="elo"===i?f():p();a=await e??[],await Promise.all([a[0]?.img1?.url,a[0]?.img2?.url].map(s.Wv))}t((0,n.jsx)(o.Z,{initialData:a,type:i}),{transitionModal:!0,showCloseButton:!1,className:"max-lg:w-screen max-lg:h-screen max-lg:rounded-none rounded-xl",onClose(){u().track("Autoranker Modal Closed",{type:i})}})}d.aesthetics},81084:function(e,t,r){"use strict";r.d(t,{h:function(){return f}});var n=r(92323),i=r(47041),o=r(64529),a=r(782);let s=(0,o.Ue)()((0,a.tJ)(e=>({lastOpened:null,opened:()=>{(0,i.setCookie)("pai-rank-images-status","opened",{maxAge:86400}),e(()=>({lastOpened:Date.now()}))}}),{name:"pai-rank-images-status"}));var l=r(50081),u=r(8891),c=r.n(u),d=r(49870);function f(){let{setModalContent:e}=(0,n.d)(),t=s(e=>e.opened),r=function(){let{data:e}=(0,d.Z)("/api/images/pairs/more",e=>fetch(e).then(async e=>200===e.status&&await e.json()));return e?"normal":"elo"}();return async(n,o)=>{let a=()=>(t(),c().track("Ratings modal launched"),(0,l.g9)({setModalContent:e,skipFetchingInitialImages:o,typeForSession:r}));if(n)return a();let u=s.getState().lastOpened??0,d=Date.now(),f=(0,i.getCookie)("pai-rank-images-status");if(d-u<864e5){c().track("Ratings modal didn't launch",{reason:"was opened recently"});return}if("opened"===f){c().track("Ratings modal didn't launch",{reason:"was opened recently (cookie)"});return}let p=await fetch("/api/images/pairs/elo/more").then(e=>200===e.status),h="Cypress"in window,m="Playwright"in window;if(p&&!h&&!m)return a();c().track("Ratings modal didn't launch",{reason:"unknown"})}}},20835:function(e,t,r){"use strict";r.d(t,{I:function(){return o}});var n=r(85893),i=r(598);function o(e){let{fallback:t=null,...r}=e;return(0,i.Z)()?(0,n.jsx)(n.Fragment,{children:r.children}):(0,n.jsx)(n.Fragment,{children:t})}r(67294)},88246:function(e,t,r){"use strict";var n,i;r.d(t,{Gc:function(){return a},L5:function(){return s},O0:function(){return o},sU:function(){return n}}),(i=n||(n={})).Canny="canny",i.Depth="depth",i.Pose="pose";let o={canny:"Edge → Image",depth:"Depth → Image",pose:"Pose → Image"},a=[{}],s=3},15696:function(e,t,r){"use strict";r.d(t,{ZP:function(){return et},Ud:function(){return en},cK:function(){return ee}});var n=r(85893),i=r(33048),o=r(59420),a=r(69306),s=r(8891),l=r.n(s),u=r(67294),c=r(11163),d=r(74371),f=r(18794),p=r(23659),h=r(5152),m=r.n(h),g=r(22543),v=r(40607);function y(e){let t=e.tabs[0].title;return(0,n.jsxs)(v.mQ,{defaultValue:t,className:"w-full",children:[(0,n.jsx)("div",{className:"px-4 py-4",children:(0,n.jsx)(v.dr,{className:"w-full",children:e.tabs.map(e=>{let{icon:t,...r}=e;return(0,n.jsxs)(v.SP,{value:r.title,className:"gap-2 w-full",children:[(0,n.jsx)(t,{className:"h-4 w-4"}),r.title]},r.title)})})}),e.tabs.map(e=>{let{...t}=e;return(0,n.jsx)(v.nU,{value:t.title,children:t.content},t.title)})]})}var x=r(91170),b=r(91132),w=r(1233),_=r(35758),j=r(29338),C=r(63518),k=r(44746),E=r(41664),S=r.n(E);function N(){return(0,n.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M3.66797 8.0026L7.33464 4.33594",stroke:"currentColor",strokeOpacity:"0.8",strokeWidth:"0.78125",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M4.33464 13.3361H4.66797C5.03616 13.3361 5.33464 13.0376 5.33464 12.6694V11.0026C5.33464 10.6344 5.03616 10.3359 4.66797 10.3359H4.33464C3.96645 10.3359 3.66797 10.6344 3.66797 11.0026V12.6694C3.66797 13.0376 3.96645 13.3361 4.33464 13.3361Z",stroke:"currentColor",strokeOpacity:"0.8",strokeWidth:"0.78125",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8.33464 13.3361H8.66797C9.03617 13.3361 9.33464 13.0376 9.33464 12.6694V9.0026C9.33464 8.6344 9.03617 8.33594 8.66797 8.33594H8.33464C7.96644 8.33594 7.66797 8.6344 7.66797 9.0026V12.6694C7.66797 13.0376 7.96644 13.3361 8.33464 13.3361Z",stroke:"currentColor",strokeOpacity:"0.8",strokeWidth:"0.78125",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.3346 13.3309H12.668C13.0362 13.3309 13.3346 13.0324 13.3346 12.6642V4.33073C13.3346 3.96254 13.0362 3.66406 12.668 3.66406H12.3346C11.9664 3.66406 11.668 3.96254 11.668 4.33073V12.6642C11.668 13.0324 11.9664 13.3309 12.3346 13.3309Z",stroke:"currentColor",strokeOpacity:"0.8",strokeWidth:"0.78125",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8.0013 5.9974V3.66406H5.66797",stroke:"currentColor",strokeOpacity:"0.8",strokeWidth:"0.78125",strokeLinecap:"round",strokeLinejoin:"round"})]})}var P=r(9669),L=r.n(P),T=r(85686);function O(){let e=(0,k.sA)(),[t,r]=(0,u.useState)(!1),[i,o]=(0,u.useState)(!1),[a,s]=(0,u.useState)(null),c=(0,u.useCallback)(()=>{L().get("/api/announcements",{headers:{"Cache-Control":"no-cache"}}).then(e=>{e.data?(o(!0),s(e.data),l().track("Announcement banner shown",{...e.data,fromCanvas:!1,from:"board"})):o(!1)})},[]);(0,u.useEffect)(()=>{c();let e=setInterval(c,3e4);return()=>{clearInterval(e)}},[c]),(0,C.Z)("pai:board:long-generation",()=>{e||(r(!0),l().track("High queue times banner shown (waited 20s)"))});let d=function(){let[e,t]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let e=()=>{let e=new Date().getUTCHours()-8;e<0&&(e+=24),e>=7&&e<14?t(!0):t(!1)};e();let r=setInterval(e,6e4);return()=>clearInterval(r)},[]),e}();return(0,n.jsx)(j.Z,{visible:t||i,classNames:i?"bg-[#EBA800] bg-opacity-[24%]":"gap-3",children:i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(T.Z,{className:"text-[#F7BE00]"}),(0,n.jsx)("p",{className:"font-pg-medium text-gray-10",children:a?.title||(0,n.jsxs)(n.Fragment,{children:["Playground is having site reliability issues.",(0,n.jsx)("span",{className:"max-xl:hidden",children:" Our team is aware and working to resolve it."})]})})]}):t?(0,n.jsxs)(n.Fragment,{children:[d&&(0,n.jsx)("div",{className:"inline max-lg:hidden text-[11px] font-semibold  bg-white/[0.12] text-white rounded-full py-1 px-1.5 pr-2",children:(0,n.jsxs)("p",{className:"flex gap-1",children:[(0,n.jsx)(N,{}),"Peak time"]})}),(0,n.jsxs)("p",{className:"font-pg-medium text-gray-10",children:[(0,n.jsx)("span",{className:"max-xl:hidden",children:"You are on a slower version while on the Free plan."})," ","Upgrade to Pro for shorter wait times."]})," ",(0,n.jsxs)(S(),{href:"/pricing",target:"_blank",className:"text-[#45A5FF] font-semibold group",onClick:()=>{l().track("Upgrade to Pro Notice Clicked",{from:"board long generation notice"})},children:["Upgrade ",(0,n.jsx)("span",{className:"max-lg:hidden xl:hidden 2xl:inline",children:"to Pro"})," ",(0,n.jsx)("span",{className:"inline-block group-hover:translate-x-0.5 transition-transform",children:"→"})]})]}):null})}var R=r(30506);function A(){return(0,n.jsxs)("div",{className:"p-4 py-6 flex flex-col gap-3",children:[(0,n.jsx)(R.O,{className:"h-4 w-56"}),(0,n.jsx)(R.O,{className:"h-4 w-48"}),(0,n.jsx)(R.O,{className:"h-4 w-24"}),(0,n.jsx)(R.O,{className:"h-4 w-52"}),(0,n.jsx)(R.O,{className:"h-4 w-16"})]})}var I=r(13728),M=r(33299),D=r(39163),F=r(85821),z=r(47922),B=r(59820),U=r(21506),V=r(32478),$=r(13346),H=r(14319);function Z(){let e=(0,k.sA)(),[t,r]=(0,u.useState)(!1),i=(0,B.ZP)("/api/announcements",e=>L().get(e,{headers:{"Cache-Control":"no-cache"}}).then(e=>(e.data&&l().track("Announcement banner shown",{...e.data,fromCanvas:!1,from:"board"}),e.data)),{refreshInterval:3e4}),o=!!i.data,a=i.data;(0,C.Z)("pai:board:long-generation",()=>{e||(r(!0),l().track("High queue times banner shown (waited 20s)"))});let s=function(){let[e,t]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let e=()=>{let e=new Date().getUTCHours()-8;e<0&&(e+=24),e>=7&&e<14?t(!0):t(!1)};e();let r=setInterval(e,6e4);return()=>clearInterval(r)},[]),e}(),[c,d]=(0,u.useState)(!1),f=t||o;return c||!f?null:(0,n.jsxs)(U.q,{variant:o?"warning":"info",className:(0,w.cn)("w-full flex justify-center !rounded-none max-lg:pr-8 items-center gap-3 text-sm py-3 lg:py-2 transition-transform z-30 min-h-[41px]",f?"translate-y-0 relative":"absolute -translate-y-full"),children:[o?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("p",{className:"font-pg-medium inline-flex gap-1",children:[(0,n.jsx)(T.Z,{}),a?.title||(0,n.jsxs)(n.Fragment,{children:["Playground is having site reliability issues.",(0,n.jsx)("span",{className:"max-xl:hidden",children:" Our team is aware and working to resolve it."})]})]})}):t?(0,n.jsxs)(n.Fragment,{children:[s&&(0,n.jsx)(H.C,{variant:"info",className:"max-lg:hidden",children:(0,n.jsxs)("p",{className:"flex gap-1",children:[(0,n.jsx)(N,{}),"Peak time"]})}),(0,n.jsxs)("p",{className:"font-pg-medium",children:[(0,n.jsx)("span",{className:"max-xl:hidden",children:"You are on a slower version while on the Free plan."})," ","Upgrade to Pro for shorter wait times."]})," ",(0,n.jsxs)(S(),{href:"/pricing",target:"_blank",className:"text-pg-50 font-semibold group",onClick:()=>{l().track("Upgrade to Pro Notice Clicked",{from:"board long generation notice"})},children:["Upgrade ",(0,n.jsx)("span",{className:"max-lg:hidden xl:hidden 2xl:inline",children:"to Pro"})," ",(0,n.jsx)("span",{className:"inline-block group-hover:translate-x-0.5 transition-transform",children:"→"})]})]}):null,(0,n.jsx)($.z,{type:"button",size:"iconSm",onClick:()=>{d(!0)},className:"absolute right-2 p-0.5 shrink-0 bg-transparent hover:bg-transparent shadow-none",children:(0,n.jsx)(V.Z,{height:16,width:16})})]})}var W=r(61116),q=r(81410),G=r(87536),Y=r(24581);function K(){let e=(0,a.r$)(),t=(0,Y.s)(),r=(0,z.y)("scroll-to-hide-promptbox")&&!t,i=(0,z.y)("shrinking-prompt-box"),o=(0,z.y)("top-prompt-box"),{rightSidebarOpen:s,shrinkPromptBox:l,setShrinkPromptBox:c}=(0,F.A)(),d=(0,q.C)({scrollDownDelta:200,scrollUpDelta:t?50:0});return((0,u.useEffect)(()=>{i&&"down"===d&&!0!==l&&!t?c(!0):"up"===d&&!1!==l&&c(!1)},[d]),e)?null:o?(0,n.jsxs)("div",{className:(0,w.cn)(`items-center relative flex-shrink flex-grow rounded-pg-md overflow-hidden
      text-gray-5 self-start font-normal transition-all`,"prompt-box-shadow"),children:[(0,n.jsx)(W.a,{}),(0,n.jsx)(G.s,{})]}):(0,n.jsx)("div",{className:(0,w.cn)("transition-all flex flex-row w-full gap-2 z-30 duration-layout-speed","down"!==d||s||!r||i?"translate-y-0":"translate-y-[200%]",l?"px-[100px] xl:px-[15vw]":"mx-0"),children:(0,n.jsxs)("div",{className:(0,w.cn)(`items-center relative flex-shrink flex-grow rounded-pg-md overflow-hidden
      text-gray-5 self-start font-normal transition-all`,"prompt-box-shadow"),children:[(0,n.jsx)(W.a,{}),(0,n.jsx)(G.s,{})]})})}var X=r(5266);let J=m()(()=>Promise.all([r.e(57),r.e(2015),r.e(296),r.e(5115),r.e(9260),r.e(9042),r.e(5550),r.e(4250),r.e(4176),r.e(6634),r.e(3135),r.e(4283),r.e(6296)]).then(r.bind(r,6296)).then(e=>e.GenerateRightSidebar),{loadableGenerated:{webpack:()=>[6296]},ssr:!1,loading:()=>(0,n.jsx)(A,{})}),Q=m()(()=>Promise.all([r.e(57),r.e(4176),r.e(3135)]).then(r.bind(r,13135)).then(e=>e.GenerateLeftSidebar),{loadableGenerated:{webpack:()=>[13135]},ssr:!1});function ee(){let e=(0,c.useRouter)();return g.D.arePathsEqual("/create",e.asPath)}function et(e){let{children:t,isPro:r,isTurbo:i}=e,o=(0,a.OV)("lg"),s=(0,f.Bg)(),{buttonTimeoutUntil:l,filters:c,generateImage:h,updateControlNetOptions:m,deleteControlNetAtIndex:g,setInitImage:v,setOverlayImage:j,setShowNegativePrompt:C,showNegativePrompt:k,setUsesRandomSeed:E,highResFixEnabled:S,setHighResFixEnabled:N,strokePaths:P,updateImageOptions:L,filterStyle:T,imageHistory:R,imageOptions:A,setImageOptions:B,usesRandomSeed:U,textAreaRef:V,promptBoxRef:$,generateButtonRef:H,usage:W}=(0,p.vX)(),q=(0,n.jsx)(Q,{filterStyle:T,filters:c,showNegativePrompt:k,setShowNegativePrompt:C,generateImage:h,imageOptions:A,setImageOptions:B,updateImageOptions:L,updateControlNetOptions:m,deleteControlNetAtIndex:g,setInitImage:v,setOverlayImage:j,strokePaths:P,textAreaRef:V,timeoutUntil:l,imageHistory:R,generateButtonRef:H}),G=(0,n.jsx)(J,{imageOptions:A,updateImageOptions:L,setImageOptions:B,usesRandomSeed:U,setUsesRandomSeed:E,highResFixEnabled:S,setHighResFixEnabled:N,isPro:r,isTurbo:i,hasGenerateButton:o,generateImage:h}),Y=ee(),et=(0,M.useSession)(),en=et?.data?.user?.db,ei=((0,d.Z)(e=>e.showSidebars)||Y)&&en,eo=(0,_.J)(),ea=(0,a.OV)("xs"),es=(0,z.y)("new-create-notification-banner"),el=(0,z.y)("top-prompt-box"),{height:eu}=(0,X.iP)(),ec=ea?eu-44:eu-64,ed="w-1/4 xl:w-1/5",ef=(0,u.useCallback)(()=>es?(0,n.jsx)(Z,{}):(0,n.jsx)(O,{}),[es]),{rightSidebarOpen:ep,setRightSidebarOpen:eh,shrinkPromptBox:em,setShrinkPromptBox:eg}=(0,F.A)(),ev=(0,z.y)("shrinking-prompt-box"),ey=(0,u.useCallback)(e=>{ev&&e!==em&&eg(e)},[em,eg,ev]);return(0,n.jsxs)("div",{className:o?"mx-auto":(0,w.cn)("flex mx-auto z-10",ei?"h-full":"",ei&&"lg:overflow-y-hidden"),children:[o&&ei&&(0,n.jsxs)(n.Fragment,{children:[ef(),(0,n.jsx)(y,{tabs:[{icon:b.ZP,title:"Prompt",content:q},{icon:x.Z,title:"Settings",content:G}]})]}),!o&&!s&&(0,n.jsx)("div",{className:(0,w.cn)(ed,ei?"translate-x-0":"-translate-x-full","z-20 fixed left-0 transform transition-transform duration-layout-speed",eo?"-translate-x-full transition-transform":"","flex flex-col lg:overflow-y-auto !overflow-x-hidden","bg-pg-900 border-r border-pg-600"),children:(0,n.jsx)(I.x,{style:{height:ec},children:q})}),Y&&!o&&!s&&(0,n.jsx)("div",{className:"w-1/4 xl:w-1/5"}),(0,n.jsxs)("main",{className:o?"col-span-5 relative lg:overflow-y-auto lg:overflow-x-hidden ":(0,w.cn)("w-full z-15 duration-layout-speed",ei&&!Y?"opacity-0 transition-opacity pointer-events-none":"opacity-100 pointer-events-auto",Y?ep?"w-1/2 xl:w-3/5":"w-3/4 xl:w-4/5":"w-full",Y&&s?ep?"w-3/4 xl:w-4/5":"w-full xl:w-full":""),children:[Y&&!o&&ef(),ei&&!Y&&o?(0,n.jsx)(n.Fragment,{}):t]}),!s&&(0,n.jsx)(er,{rightSidebarOpen:ep,setRightSidebarOpen:eh,showSidebars:ei,isMobile:o}),!o&&(0,n.jsx)("div",{className:(0,w.cn)(ed,ei&&ep?"translate-x-0":"translate-x-full","z-40 fixed right-0 transform transition-transform duration-layout-speed",`transition-all lg:overflow-y-auto ${eo?"translate-x-full":""} overflow-x-hidden border-l border-pg-600`,"bg-pg-900"),children:(0,n.jsx)(I.x,{style:{height:ec},children:G})}),s&&!o&&(0,n.jsx)(n.Fragment,{children:el?null:(0,n.jsx)("div",{onMouseEnter:()=>ey(!1),children:(0,n.jsxs)("div",{className:(0,w.cn)("p-4 fixed z-30 flex items-end justify-center gap-4 transition-all duration-200 pointer-events-none","flex-grow-0",ep?"w-3/4 xl:w-4/5 right-[20%] xl:right-[20%]":"w-full right-0",ei?"bottom-0":"-bottom-80"),children:[(0,n.jsx)("div",{className:(0,w.cn)("pointer-events-auto transition-all duration-layout-speed space-4 fixed left-[176px] xl:left-[15%] 3xl:left-[25%]",ep?"right-[calc(25%+176px)] xl:right-[35%] 3xl:right-[45%]":"right-[176px] xl:right-[15%] 3xl:right-[25%]"),children:(0,n.jsx)(K,{})}),(0,n.jsx)("div",{className:(0,w.cn)("pointer-events-auto fixed pr-4 transition-all duration-layout-speed z-0",ep?"right-[25%] xl:right-[20%]":"right-0",ev&&em?"translate-x-[200%]":"translate-x-0"),children:(0,n.jsx)(D.X,{})})]})})})]})}let er=e=>{let{rightSidebarOpen:t,setRightSidebarOpen:r,showSidebars:a,isMobile:s}=e;return!a||s?null:(0,n.jsx)("button",{"aria-label":"Toggle sidebar",onClick:()=>{l().track("Toggle sidebar",{sidebarOpen:!t}),r(!t)},type:"button",className:(0,w.cn)(t?"right-[calc(25%-16px)] xl:right-[calc(20%-16px)]":"-right-0","absolute top-32 z-10 hidden lg:flex h-12 w-10 items-center justify-center rounded-l-full border-l border-white/10 bg-gray-95 pr-2"),children:t?(0,n.jsx)(o.Z,{}):(0,n.jsx)(i.Z,{})})};function en(){let e=(0,X.iP)(),t=(0,a.OV)("xl"),r=(0,a.OV)("lg");return(0,u.useMemo)(()=>r?e.width:t?.25*e.width:.2*e.width,[t,r,e.width])}},85931:function(e,t,r){"use strict";r.d(t,{Z:function(){return s},k:function(){return a}});var n=r(85893),i=r(67294);function o(e){let t;return Math.min(Math.max((t=1.05*e)<.9?t:t<1.06?(Math.sin(10*(t-.9))+9)/10:1,0),1)}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.9,n=(0,i.useRef)(Date.now()),[a,s]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let i=setInterval(()=>{s(t((Date.now()-n.current)/e)*r)},10);return()=>{clearInterval(i)}},[t,e,r]),a}function s(e){let{estimatedTime:t,easing:r=o,hangAt:i=.9}=e,s=a(t,r,i);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("progress",{className:"mt-0 pt-0",value:s,children:s})})}},6894:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(85893),i=r(10443),o=r(46825),a=r(51879),s=r(11615),l=r(67294);let u=[o.Hn.PLAYGROUND_V2_5,o.Hn.PLAYGROUND_V2,o.Hn.STABLE_DIFFUSION_XL,o.Hn.STABLE_DIFFUSION];function c(e){let{filter:t,willOutpaint:r=!1,model:c}=e,d=(0,l.useMemo)(()=>{let e=Object.values(o.Hn).includes(c)?c:(0,s.Ou)(c),n=function(){if("default"!==e)return a.NP[e];if(r&&!t.dream_booth_model)return a.NP[o.Hn.STABLE_DIFFUSION_XL];let n=u.find(e=>t.models.includes(e));return n?a.NP[n]:null}();return n?.shortName??n?.name},[c,t.dream_booth_model,t.models,r]);return d&&t.id!==i.$p.id?(0,n.jsx)("span",{className:"absolute top-1 left-1 bg-black/20 rounded-full backdrop-blur-md border border-white/20 text-[10px] text-white font-pg-medium px-1",children:d}):null}},67539:function(e,t,r){"use strict";r.d(t,{k:function(){return u},l:function(){return l}});var n=r(1604),i=r(46302);let o="filterSettings",a=n.z.object({cfgScale:n.z.number().int().optional(),steps:n.z.number().int().optional(),schedulerKey:i.HH.getKeySchema().optional()}),s=n.z.record(n.z.string(),a.optional());function l(){let e=localStorage.getItem(o);if(!e)return;let t=JSON.parse(e),r=s.safeParse(t);if(!r.success){console.error("Invalid filter settings in local storage",r.error),localStorage.removeItem(o);return}return r.data}function u(e,t){let r=l()||{},n={...r,[e]:{...r[e],...t}};try{localStorage.setItem(o,JSON.stringify(n))}catch(e){console.error("Failed to save filter settings to local storage",e)}}},27042:function(e,t,r){"use strict";r.d(t,{U:function(){return f}});var n=r(85893),i=r(96365),o=r.n(i),a=r(67294),s=r(45697),l=r.n(s);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var c=(0,a.forwardRef)(function(e,t){var r=e.color,n=e.size,i=void 0===n?24:n,o=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["color","size"]);return a.createElement("svg",u({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:void 0===r?"currentColor":r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),a.createElement("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}))});c.propTypes={color:l().string,size:l().oneOfType([l().string,l().number])},c.displayName="Triangle";var d=r(56888);function f(e){let{left:t,right:r,initialPosition:i=.5,showLabels:s=!0,className:l,style:u}=e,[c,f]=(0,a.useState)(i),[h,m]=(0,a.useState)(!1),[g,{width:v}]=(0,d.h)();return(0,n.jsxs)("div",{className:`${o().Comparison} ${l??""}`,style:{"--slider-position":c,...u},"data-show-before":(s||h)&&v*c>80,"data-show-after":(s||h)&&v*(1-c)>80,ref:g,children:[(0,n.jsx)("div",{className:o().ImageWrapper,children:(0,n.jsx)("img",{src:t,alt:"left"})}),(0,n.jsx)("div",{className:o().ImageWrapper,children:(0,n.jsx)("img",{src:r,alt:"right"})}),(0,n.jsx)(p,{parentWidth:v,setPosition:f,setSliderHovered:m})]})}function p(e){let{setPosition:t,parentWidth:r,setSliderHovered:i}=e,s=(0,a.useRef)(null),[l,u]=(0,a.useState)(null),[d,f]=(0,a.useState)(null);return(0,a.useEffect)(()=>{let e=e=>{if(null!==l&&s.current){let n=s.current,i=n.parentElement?.getBoundingClientRect();i&&t(Math.max(0,Math.min(1,(e.clientX-i.left-l+10)/r)))}},n=()=>{u(null)},i=e=>{if(null!==d&&s.current){let n=s.current,i=n.parentElement?.getBoundingClientRect();i&&t(Math.max(0,Math.min(1,(e.touches[0].clientX-i.left+10-d)/r)))}},o=()=>{f(null)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",n),document.addEventListener("touchmove",i),document.addEventListener("touchend",o),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",o)}},[l,t,r,d]),(0,n.jsxs)("div",{className:o().Slider,ref:s,role:"slider-thumb","data-pressed":null!==l,onClick:e=>e.stopPropagation(),onMouseDown:e=>{if(e.stopPropagation(),e.preventDefault(),s.current){let t=s.current.getBoundingClientRect();u(e.clientX-t.left)}},onTouchStart:e=>{if(e.stopPropagation(),s.current){let t=s.current.getBoundingClientRect();f(e.touches[0].clientX-t.left)}},onMouseOver:()=>i(!0),onMouseOut:()=>i(!1),children:[(0,n.jsx)("div",{className:o().Line}),(0,n.jsxs)("div",{className:"flex rounded-md border border-white gap-px w-7 h-12 justify-center items-center bg-black/10 backdrop-blur-lg",children:[(0,n.jsx)(c,{size:9,color:"transparent",fill:"white",style:{transform:"rotate(270deg)"}}),(0,n.jsx)(c,{size:9,color:"transparent",fill:"white",style:{transform:"rotate(90deg)"}})]})]})}},86544:function(e,t,r){"use strict";r.d(t,{KH:function(){return k},M2:function(){return j},W$:function(){return C}});var n=r(85893),i=r(17394),o=r(2267),a=r(67294),s=r(92323),l=r(32155),u=r(94525),c=r(47435),d=r(96394),f=r(94670),p=r(88246),h=r(23878),m=r(46825),g=r(49296),v=r(58309),y=r(42897),x=r(27632),b=r(14650),w=r(35171),_=r(89565);let j=.7,C=.7;function k(e){let{imageOptions:t,setInitImage:r,setOverlayImage:d,handleInitImageDelete:g,strokePaths:j,updateImageOptions:C}=e,{setModalContent:k,closeModal:S}=(0,s.d)(),N=(0,a.useCallback)(async e=>{r(await (0,c.sq)(e),{inpaint:!1,mode:y.yB.Image,preserveStartSchedule:!0,initImageFromPlayground:await (0,v.N)(e)})},[r]),P=(0,a.useCallback)(e=>{N(e.target.files[0])},[N]),L=(0,a.useCallback)(()=>{C("mask_image")(void 0),C("mask_strength")(void 0),d(void 0,[])},[C,d]),T=(0,a.useCallback)(e=>{if(e)return k((0,n.jsx)(u.ZP,{imageOptions:t,setOverlayImage:d,strokePaths:j,handleClickClearInpaintingMask:L,close:S}),{showCloseButton:!0,closeOnOutsideClick:!1})},[t,k,d,j,L,S]),O=(0,a.useMemo)(()=>(0,h.c9)(t?.filter),[t?.filter]),R=!1;if(t.controlNetOptions)for(let e=0;e<p.L5;e++){let r=t.controlNetOptions[e];if(r?.type&&r?.base64Image){R=!0;break}}return(0,n.jsxs)("fieldset",{className:`create-fieldset ${R?"opacity-50 pointer-events-none":""}`,children:[(0,n.jsx)(x.R,{className:"mb-3",init_image:t.init_image}),(0,n.jsxs)("label",{children:["Image to Image"," ",(0,n.jsx)(b.Z,{coverImageUrl:"https://cdn.playground.com/tooltips/canvas_tooltip_img2img_header.png",title:"Start From Inspiration",description:"Transform an existing image into a new one with Image to Image.",ctaLabel:"Watch video",ctaUrl:"https://www.youtube.com/watch?v=7GT4zCjib80&t=712s",mixpanelId:"image-to-image",source:"board"})]}),(0,n.jsx)("p",{children:"Upload an image to use as inspiration."}),(0,n.jsx)("div",{className:"image-to-image",children:t.init_image?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"image-to-image-container relative mb-4 w-32 rounded-md",children:[(0,n.jsx)("img",{src:t.init_image,alt:"Initial image"}),t.mask_image&&(0,n.jsx)("img",{className:"absolute top-0 left-0",src:t.mask_image,alt:"Mask image"}),(0,n.jsx)("div",{className:"absolute inset-0 flex flex-col opacity-0 hover:opacity-100",children:(0,n.jsx)("button",{onClick:g,title:"Remove initial image",className:"image-to-image-remove-button blur-card absolute top-1 right-1 flex h-8 w-8 items-center justify-center rounded-full !bg-black/40 text-white transition-colors hover:text-red-500",children:(0,n.jsx)(o.Z,{})})})]}),(0,_.Ek)(t.modelType)&&!t.mask_image&&(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-sm",children:"Image strength"}),(0,n.jsx)(i.Z,{min:0,max:100,step:1,onChange:e=>{C("start_schedule")(1-e/100)},value:Math.round((1-(t.start_schedule??0))*100)})]})}),(0,_.Ek)(t.modelType)&&!t.mask_image&&0===t.start_schedule&&w.Pk,t.mode===y.yB.Image&&t.modelType===m.Hn.PLAYGROUND_V1&&t.mask_image&&(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-sm",children:"Mask strength"}),(0,n.jsx)(i.Z,{min:0,max:100,step:1,onChange:e=>{C("mask_strength")(e/100)},value:Math.floor((t.mask_strength??0)*100)})]})}),(0,n.jsx)(f.u,{label:O?"Inpainting is not supported with the selected filter yet.":"",placement:"top",color:"white",className:"left-4",children:(0,n.jsx)(E,{dreamBoothModel:O,handleClickInpaintingMask:T,imageOptions:t})})]}):(0,n.jsx)("div",{className:"file-upload flex flex-row justify-center",onDragOver:e=>{e.preventDefault()},onDrop:e=>{N(e.dataTransfer.files[0]),e.preventDefault()},children:(0,n.jsx)("div",{children:(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{className:"hidden",type:"file",accept:"image/*",onChange:P}),(0,n.jsx)(l.Z,{})]})})})})]})}function E(e){let{dreamBoothModel:t,handleClickInpaintingMask:r,imageOptions:i}=e,o=(0,a.useRef)(null),[s,l]=(0,a.useState)(!1);(0,g.p)(o,()=>l(!1));let u=!!t||"photorealism"===i.filter;return d.dT,(0,n.jsx)("div",{className:"flex gap-1",children:(0,n.jsxs)("button",{style:{fontSize:"0.9rem"},type:"button",className:"gap-2 font-medium hover:text-gray-300 disabled:pointer-events-none disabled:opacity-50 [&>svg]:inline [&>svg]:align-sub text-left",onClick:()=>r(!0),disabled:u,children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.dT,{})," ",i.mask_image?"Edit Inpainting Mask":"Add inpainting mask"]}),u&&(0,n.jsx)("p",{className:"text-xs leading-[130%]",children:"Not supported with the selected filter"})]})})}},94525:function(e,t,r){"use strict";r.d(t,{ZP:function(){return B}});var n,i,o=r(85893),a=r(67294);function s(){var e="/Users/vinoth/Projects/react-sketch-canvas/packages/react-sketch-canvas/dist/index.mjs",t=Function("return this")(),r="__coverage__",n=t[r]||(t[r]={});n[e]&&"f0c2fe8244038a299e0ad050a2e8bf51c7fd1d8a"===n[e].hash||(n[e]={path:"/Users/vinoth/Projects/react-sketch-canvas/packages/react-sketch-canvas/dist/index.mjs",statementMap:{0:{start:{line:1,column:7},end:{line:1,column:28}},1:{start:{line:1,column:32},end:{line:1,column:55}},2:{start:{line:1,column:63},end:{line:1,column:95}},3:{start:{line:1,column:102},end:{line:1,column:130}},4:{start:{line:1,column:138},end:{line:1,column:169}},5:{start:{line:1,column:173},end:{line:1,column:210}},6:{start:{line:1,column:217},end:{line:1,column:225}},7:{start:{line:1,column:228},end:{line:1,column:310}},8:{start:{line:1,column:237},end:{line:1,column:310}},9:{start:{line:1,column:313},end:{line:1,column:428}},10:{start:{line:1,column:321},end:{line:1,column:370}},11:{start:{line:1,column:344},end:{line:1,column:370}},12:{start:{line:1,column:370},end:{line:1,column:419}},13:{start:{line:1,column:375},end:{line:1,column:419}},14:{start:{line:1,column:393},end:{line:1,column:419}},15:{start:{line:1,column:419},end:{line:1,column:427}},16:{start:{line:1,column:431},end:{line:1,column:449}},17:{start:{line:1,column:438},end:{line:1,column:449}},18:{start:{line:1,column:541},end:{line:1,column:635}},19:{start:{line:1,column:555},end:{line:1,column:562}},20:{start:{line:1,column:565},end:{line:1,column:572}},21:{start:{line:1,column:573},end:{line:1,column:634}},22:{start:{line:1,column:638},end:{line:1,column:805}},23:{start:{line:1,column:685},end:{line:1,column:686}},24:{start:{line:1,column:689},end:{line:1,column:693}},25:{start:{line:1,column:696},end:{line:1,column:700}},26:{start:{line:1,column:703},end:{line:1,column:705}},27:{start:{line:1,column:708},end:{line:1,column:715}},28:{start:{line:1,column:718},end:{line:1,column:739}},29:{start:{line:1,column:742},end:{line:1,column:752}},30:{start:{line:1,column:755},end:{line:1,column:772}},31:{start:{line:1,column:775},end:{line:1,column:792}},32:{start:{line:1,column:793},end:{line:1,column:804}},33:{start:{line:1,column:808},end:{line:1,column:1087}},34:{start:{line:1,column:826},end:{line:1,column:979}},35:{start:{line:1,column:843},end:{line:1,column:864}},36:{start:{line:1,column:864},end:{line:1,column:870}},37:{start:{line:1,column:877},end:{line:1,column:910}},38:{start:{line:1,column:910},end:{line:1,column:916}},39:{start:{line:1,column:924},end:{line:1,column:973}},40:{start:{line:1,column:973},end:{line:1,column:978}},41:{start:{line:1,column:988},end:{line:1,column:1041}},42:{start:{line:1,column:1042},end:{line:1,column:1086}},43:{start:{line:1,column:1155},end:{line:1,column:1272}},44:{start:{line:1,column:1185},end:{line:1,column:1189}},45:{start:{line:1,column:1192},end:{line:1,column:1195}},46:{start:{line:1,column:1196},end:{line:1,column:1271}},47:{start:{line:1,column:1278},end:{line:1,column:1344}},48:{start:{line:1,column:1298},end:{line:1,column:1340}},49:{start:{line:1,column:1345},end:{line:1,column:1449}},50:{start:{line:1,column:1478},end:{line:1,column:1661}},51:{start:{line:1,column:1530},end:{line:1,column:1659}},52:{start:{line:1,column:1669},end:{line:1,column:1671}},53:{start:{line:1,column:1679},end:{line:1,column:1886}},54:{start:{line:1,column:1682},end:{line:1,column:1886}},55:{start:{line:1,column:1708},end:{line:1,column:1717}},56:{start:{line:1,column:1718},end:{line:1,column:1884}},57:{start:{line:1,column:1749},end:{line:1,column:1796}},58:{start:{line:1,column:1829},end:{line:1,column:1833}},59:{start:{line:1,column:1914},end:{line:1,column:1959}},60:{start:{line:1,column:1962},end:{line:1,column:1975}},61:{start:{line:1,column:1978},end:{line:1,column:1992}},62:{start:{line:1,column:1993},end:{line:1,column:2147}},63:{start:{line:1,column:2155},end:{line:1,column:6304}},64:{start:{line:1,column:2581},end:{line:1,column:2582}},65:{start:{line:1,column:2585},end:{line:1,column:2599}},66:{start:{line:1,column:2602},end:{line:1,column:2616}},67:{start:{line:1,column:2619},end:{line:1,column:2871}},68:{start:{line:1,column:2641},end:{line:1,column:2693}},69:{start:{line:1,column:2694},end:{line:1,column:2743}},70:{start:{line:1,column:2749},end:{line:1,column:2777}},71:{start:{line:1,column:2780},end:{line:1,column:2808}},72:{start:{line:1,column:2809},end:{line:1,column:2866}},73:{start:{line:1,column:2874},end:{line:1,column:3030}},74:{start:{line:1,column:2880},end:{line:1,column:2958}},75:{start:{line:1,column:2951},end:{line:1,column:2958}},76:{start:{line:1,column:2964},end:{line:1,column:3006}},77:{start:{line:1,column:3009},end:{line:1,column:3013}},78:{start:{line:1,column:3014},end:{line:1,column:3020}},79:{start:{line:1,column:3033},end:{line:1,column:3109}},80:{start:{line:1,column:3039},end:{line:1,column:3082}},81:{start:{line:1,column:3075},end:{line:1,column:3082}},82:{start:{line:1,column:3088},end:{line:1,column:3092}},83:{start:{line:1,column:3093},end:{line:1,column:3097}},84:{start:{line:1,column:3112},end:{line:1,column:3198}},85:{start:{line:1,column:3118},end:{line:1,column:3190}},86:{start:{line:1,column:3199},end:{line:1,column:4426}},87:{start:{line:1,column:3228},end:{line:1,column:4309}},88:{start:{line:1,column:3244},end:{line:1,column:3958}},89:{start:{line:1,column:3264},end:{line:1,column:3956}},90:{start:{line:1,column:3274},end:{line:1,column:3283}},91:{start:{line:1,column:3284},end:{line:1,column:3329}},92:{start:{line:1,column:3290},end:{line:1,column:3329}},93:{start:{line:1,column:3363},end:{line:1,column:3368}},94:{start:{line:1,column:3371},end:{line:1,column:3419}},95:{start:{line:1,column:3422},end:{line:1,column:3429}},96:{start:{line:1,column:3430},end:{line:1,column:3589}},97:{start:{line:1,column:3438},end:{line:1,column:3589}},98:{start:{line:1,column:3448},end:{line:1,column:3453}},99:{start:{line:1,column:3454},end:{line:1,column:3463}},100:{start:{line:1,column:3473},end:{line:1,column:3588}},101:{start:{line:1,column:3589},end:{line:1,column:3941}},102:{start:{line:1,column:3619},end:{line:1,column:3651}},103:{start:{line:1,column:3652},end:{line:1,column:3727}},104:{start:{line:1,column:3733},end:{line:1,column:3751}},105:{start:{line:1,column:3752},end:{line:1,column:3797}},106:{start:{line:1,column:3758},end:{line:1,column:3797}},107:{start:{line:1,column:3797},end:{line:1,column:3922}},108:{start:{line:1,column:3873},end:{line:1,column:3891}},109:{start:{line:1,column:3935},end:{line:1,column:3939}},110:{start:{line:1,column:3951},end:{line:1,column:3955}},111:{start:{line:1,column:3973},end:{line:1,column:4308}},112:{start:{line:1,column:4003},end:{line:1,column:4306}},113:{start:{line:1,column:4013},end:{line:1,column:4039}},114:{start:{line:1,column:4040},end:{line:1,column:4258}},115:{start:{line:1,column:4070},end:{line:1,column:4075}},116:{start:{line:1,column:4076},end:{line:1,column:4104}},117:{start:{line:1,column:4082},end:{line:1,column:4097}},118:{start:{line:1,column:4097},end:{line:1,column:4103}},119:{start:{line:1,column:4104},end:{line:1,column:4257}},120:{start:{line:1,column:4258},end:{line:1,column:4291}},121:{start:{line:1,column:4301},end:{line:1,column:4305}},122:{start:{line:1,column:4329},end:{line:1,column:4419}},123:{start:{line:1,column:4375},end:{line:1,column:4418}},124:{start:{line:1,column:4432},end:{line:1,column:4475}},125:{start:{line:1,column:4446},end:{line:1,column:4470}},126:{start:{line:1,column:4458},end:{line:1,column:4469}},127:{start:{line:1,column:4478},end:{line:1,column:4597}},128:{start:{line:1,column:4499},end:{line:1,column:4500}},129:{start:{line:1,column:4501},end:{line:1,column:4591}},130:{start:{line:1,column:4524},end:{line:1,column:4585}},131:{start:{line:1,column:4598},end:{line:1,column:6302}},132:{start:{line:1,column:5213},end:{line:1,column:5342}},133:{start:{line:1,column:5609},end:{line:1,column:5903}},134:{start:{line:1,column:5811},end:{line:1,column:5814}},135:{start:{line:1,column:5823},end:{line:1,column:5901}},136:{start:{line:1,column:6105},end:{line:1,column:6299}},137:{start:{line:1,column:6336},end:{line:1,column:8814}},138:{start:{line:1,column:6790},end:{line:1,column:6791}},139:{start:{line:1,column:6794},end:{line:1,column:6807}},140:{start:{line:1,column:6814},end:{line:1,column:6828}},141:{start:{line:1,column:6835},end:{line:1,column:6849}},142:{start:{line:1,column:6856},end:{line:1,column:6870}},143:{start:{line:1,column:6877},end:{line:1,column:6891}},144:{start:{line:1,column:6898},end:{line:1,column:6912}},145:{start:{line:1,column:6915},end:{line:1,column:7031}},146:{start:{line:1,column:6948},end:{line:1,column:6998}},147:{start:{line:1,column:6999},end:{line:1,column:7025}},148:{start:{line:1,column:7032},end:{line:1,column:8812}},149:{start:{line:1,column:7056},end:{line:1,column:7059}},150:{start:{line:1,column:7083},end:{line:1,column:7087}},151:{start:{line:1,column:7123},end:{line:1,column:8067}},152:{start:{line:1,column:7138},end:{line:1,column:7143}},153:{start:{line:1,column:7162},end:{line:1,column:7177}},154:{start:{line:1,column:7189},end:{line:1,column:7229}},155:{start:{line:1,column:7206},end:{line:1,column:7222}},156:{start:{line:1,column:7222},end:{line:1,column:7228}},157:{start:{line:1,column:7229},end:{line:1,column:7276}},158:{start:{line:1,column:7234},end:{line:1,column:7255}},159:{start:{line:1,column:7262},end:{line:1,column:7275}},160:{start:{line:1,column:7288},end:{line:1,column:7351}},161:{start:{line:1,column:7308},end:{line:1,column:7329}},162:{start:{line:1,column:7336},end:{line:1,column:7349}},163:{start:{line:1,column:7381},end:{line:1,column:7421}},164:{start:{line:1,column:7422},end:{line:1,column:7439}},165:{start:{line:1,column:7427},end:{line:1,column:7439}},166:{start:{line:1,column:7439},end:{line:1,column:7497}},167:{start:{line:1,column:7513},end:{line:1,column:7680}},168:{start:{line:1,column:7545},end:{line:1,column:7583}},169:{start:{line:1,column:7584},end:{line:1,column:7678}},170:{start:{line:1,column:7599},end:{line:1,column:7603}},171:{start:{line:1,column:7616},end:{line:1,column:7620}},172:{start:{line:1,column:7697},end:{line:1,column:7742}},173:{start:{line:1,column:7717},end:{line:1,column:7740}},174:{start:{line:1,column:7721},end:{line:1,column:7725}},175:{start:{line:1,column:7735},end:{line:1,column:7739}},176:{start:{line:1,column:7757},end:{line:1,column:7774}},177:{start:{line:1,column:7762},end:{line:1,column:7773}},178:{start:{line:1,column:7797},end:{line:1,column:8030}},179:{start:{line:1,column:7817},end:{line:1,column:7883}},180:{start:{line:1,column:7883},end:{line:1,column:8028}},181:{start:{line:1,column:7893},end:{line:1,column:8008}},182:{start:{line:1,column:7925},end:{line:1,column:7955}},183:{start:{line:1,column:7959},end:{line:1,column:7987}},184:{start:{line:1,column:7988},end:{line:1,column:8004}},185:{start:{line:1,column:8009},end:{line:1,column:8013}},186:{start:{line:1,column:8023},end:{line:1,column:8027}},187:{start:{line:1,column:8048},end:{line:1,column:8065}},188:{start:{line:1,column:8314},end:{line:1,column:8326}},189:{start:{line:1,column:8332},end:{line:1,column:8337}},190:{start:{line:1,column:8340},end:{line:1,column:8406}},191:{start:{line:1,column:8407},end:{line:1,column:8482}},192:{start:{line:1,column:8473},end:{line:1,column:8481}},193:{start:{line:1,column:8502},end:{line:1,column:8515}},194:{start:{line:1,column:8508},end:{line:1,column:8515}},195:{start:{line:1,column:8521},end:{line:1,column:8535}},196:{start:{line:1,column:8538},end:{line:1,column:8571}},197:{start:{line:1,column:8572},end:{line:1,column:8598}},198:{start:{line:1,column:8577},end:{line:1,column:8597}},199:{start:{line:1,column:8625},end:{line:1,column:8650}},200:{start:{line:1,column:8643},end:{line:1,column:8650}},201:{start:{line:1,column:8656},end:{line:1,column:8706}},202:{start:{line:1,column:8707},end:{line:1,column:8726}},203:{start:{line:1,column:8719},end:{line:1,column:8726}},204:{start:{line:1,column:8732},end:{line:1,column:8768}},205:{start:{line:1,column:8769},end:{line:1,column:8795}},206:{start:{line:1,column:8774},end:{line:1,column:8794}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:1,column:228},end:{line:1,column:229}},loc:{start:{line:1,column:237},end:{line:1,column:310}},line:1},1:{name:"(anonymous_1)",decl:{start:{line:1,column:313},end:{line:1,column:314}},loc:{start:{line:1,column:320},end:{line:1,column:428}},line:1},2:{name:"(anonymous_2)",decl:{start:{line:1,column:431},end:{line:1,column:432}},loc:{start:{line:1,column:438},end:{line:1,column:449}},line:1},3:{name:"(anonymous_3)",decl:{start:{line:1,column:541},end:{line:1,column:542}},loc:{start:{line:1,column:548},end:{line:1,column:635}},line:1},4:{name:"(anonymous_4)",decl:{start:{line:1,column:638},end:{line:1,column:639}},loc:{start:{line:1,column:641},end:{line:1,column:805}},line:1},5:{name:"(anonymous_5)",decl:{start:{line:1,column:808},end:{line:1,column:809}},loc:{start:{line:1,column:817},end:{line:1,column:1087}},line:1},6:{name:"J",decl:{start:{line:1,column:1097},end:{line:1,column:1098}},loc:{start:{line:1,column:1154},end:{line:1,column:1450}},line:1},7:{name:"(anonymous_7)",decl:{start:{line:1,column:1287},end:{line:1,column:1288}},loc:{start:{line:1,column:1298},end:{line:1,column:1340}},line:1},8:{name:"ue",decl:{start:{line:1,column:1459},end:{line:1,column:1461}},loc:{start:{line:1,column:1477},end:{line:1,column:1662}},line:1},9:{name:"(anonymous_9)",decl:{start:{line:1,column:1523},end:{line:1,column:1524}},loc:{start:{line:1,column:1530},end:{line:1,column:1659}},line:1},10:{name:"(anonymous_10)",decl:{start:{line:1,column:1679},end:{line:1,column:1680}},loc:{start:{line:1,column:1682},end:{line:1,column:1886}},line:1},11:{name:"(anonymous_11)",decl:{start:{line:1,column:1694},end:{line:1,column:1695}},loc:{start:{line:1,column:1701},end:{line:1,column:1885}},line:1},12:{name:"(anonymous_12)",decl:{start:{line:1,column:1744},end:{line:1,column:1745}},loc:{start:{line:1,column:1748},end:{line:1,column:1797}},line:1},13:{name:"(anonymous_13)",decl:{start:{line:1,column:1826},end:{line:1,column:1827}},loc:{start:{line:1,column:1829},end:{line:1,column:1833}},line:1},14:{name:"re",decl:{start:{line:1,column:1896},end:{line:1,column:1898}},loc:{start:{line:1,column:1901},end:{line:1,column:2148}},line:1},15:{name:"(anonymous_15)",decl:{start:{line:1,column:2168},end:{line:1,column:2169}},loc:{start:{line:1,column:2175},end:{line:1,column:6303}},line:1},16:{name:"(anonymous_16)",decl:{start:{line:1,column:2621},end:{line:1,column:2622}},loc:{start:{line:1,column:2624},end:{line:1,column:2867}},line:1},17:{name:"(anonymous_17)",decl:{start:{line:1,column:2876},end:{line:1,column:2877}},loc:{start:{line:1,column:2879},end:{line:1,column:3021}},line:1},18:{name:"(anonymous_18)",decl:{start:{line:1,column:3035},end:{line:1,column:3036}},loc:{start:{line:1,column:3038},end:{line:1,column:3098}},line:1},19:{name:"(anonymous_19)",decl:{start:{line:1,column:3114},end:{line:1,column:3115}},loc:{start:{line:1,column:3117},end:{line:1,column:3191}},line:1},20:{name:"(anonymous_20)",decl:{start:{line:1,column:3223},end:{line:1,column:3224}},loc:{start:{line:1,column:3228},end:{line:1,column:4309}},line:1},21:{name:"(anonymous_21)",decl:{start:{line:1,column:3241},end:{line:1,column:3242}},loc:{start:{line:1,column:3244},end:{line:1,column:3958}},line:1},22:{name:"(anonymous_22)",decl:{start:{line:1,column:3256},end:{line:1,column:3257}},loc:{start:{line:1,column:3263},end:{line:1,column:3957}},line:1},23:{name:"(anonymous_23)",decl:{start:{line:1,column:3609},end:{line:1,column:3610}},loc:{start:{line:1,column:3612},end:{line:1,column:3923}},line:1},24:{name:"(anonymous_24)",decl:{start:{line:1,column:3869},end:{line:1,column:3870}},loc:{start:{line:1,column:3872},end:{line:1,column:3892}},line:1},25:{name:"(anonymous_25)",decl:{start:{line:1,column:3931},end:{line:1,column:3932}},loc:{start:{line:1,column:3934},end:{line:1,column:3940}},line:1},26:{name:"(anonymous_26)",decl:{start:{line:1,column:3969},end:{line:1,column:3970}},loc:{start:{line:1,column:3973},end:{line:1,column:4308}},line:1},27:{name:"(anonymous_27)",decl:{start:{line:1,column:3985},end:{line:1,column:3986}},loc:{start:{line:1,column:3992},end:{line:1,column:4307}},line:1},28:{name:"(anonymous_28)",decl:{start:{line:1,column:4324},end:{line:1,column:4325}},loc:{start:{line:1,column:4329},end:{line:1,column:4419}},line:1},29:{name:"(anonymous_29)",decl:{start:{line:1,column:4370},end:{line:1,column:4371}},loc:{start:{line:1,column:4374},end:{line:1,column:4419}},line:1},30:{name:"(anonymous_30)",decl:{start:{line:1,column:4442},end:{line:1,column:4443}},loc:{start:{line:1,column:4446},end:{line:1,column:4470}},line:1},31:{name:"(anonymous_31)",decl:{start:{line:1,column:4455},end:{line:1,column:4456}},loc:{start:{line:1,column:4458},end:{line:1,column:4469}},line:1},32:{name:"(anonymous_32)",decl:{start:{line:1,column:4488},end:{line:1,column:4489}},loc:{start:{line:1,column:4492},end:{line:1,column:4592}},line:1},33:{name:"(anonymous_33)",decl:{start:{line:1,column:4517},end:{line:1,column:4518}},loc:{start:{line:1,column:4524},end:{line:1,column:4585}},line:1},34:{name:"(anonymous_34)",decl:{start:{line:1,column:5206},end:{line:1,column:5207}},loc:{start:{line:1,column:5213},end:{line:1,column:5342}},line:1},35:{name:"(anonymous_35)",decl:{start:{line:1,column:5602},end:{line:1,column:5603}},loc:{start:{line:1,column:5609},end:{line:1,column:5903}},line:1},36:{name:"(anonymous_36)",decl:{start:{line:1,column:5804},end:{line:1,column:5805}},loc:{start:{line:1,column:5811},end:{line:1,column:5814}},line:1},37:{name:"(anonymous_37)",decl:{start:{line:1,column:5820},end:{line:1,column:5821}},loc:{start:{line:1,column:5823},end:{line:1,column:5901}},line:1},38:{name:"(anonymous_38)",decl:{start:{line:1,column:6098},end:{line:1,column:6099}},loc:{start:{line:1,column:6105},end:{line:1,column:6299}},line:1},39:{name:"(anonymous_39)",decl:{start:{line:1,column:6349},end:{line:1,column:6350}},loc:{start:{line:1,column:6356},end:{line:1,column:8813}},line:1},40:{name:"(anonymous_40)",decl:{start:{line:1,column:6726},end:{line:1,column:6727}},loc:{start:{line:1,column:6729},end:{line:1,column:6731}},line:1},41:{name:"(anonymous_41)",decl:{start:{line:1,column:6743},end:{line:1,column:6744}},loc:{start:{line:1,column:6750},end:{line:1,column:6752}},line:1},42:{name:"(anonymous_42)",decl:{start:{line:1,column:6929},end:{line:1,column:6930}},loc:{start:{line:1,column:6933},end:{line:1,column:7026}},line:1},43:{name:"(anonymous_43)",decl:{start:{line:1,column:7051},end:{line:1,column:7052}},loc:{start:{line:1,column:7055},end:{line:1,column:7060}},line:1},44:{name:"(anonymous_44)",decl:{start:{line:1,column:7078},end:{line:1,column:7079}},loc:{start:{line:1,column:7082},end:{line:1,column:7088}},line:1},45:{name:"(anonymous_45)",decl:{start:{line:1,column:7118},end:{line:1,column:7119}},loc:{start:{line:1,column:7123},end:{line:1,column:8067}},line:1},46:{name:"(anonymous_46)",decl:{start:{line:1,column:7134},end:{line:1,column:7135}},loc:{start:{line:1,column:7137},end:{line:1,column:7144}},line:1},47:{name:"(anonymous_47)",decl:{start:{line:1,column:7157},end:{line:1,column:7158}},loc:{start:{line:1,column:7161},end:{line:1,column:7178}},line:1},48:{name:"(anonymous_48)",decl:{start:{line:1,column:7184},end:{line:1,column:7185}},loc:{start:{line:1,column:7188},end:{line:1,column:7277}},line:1},49:{name:"(anonymous_49)",decl:{start:{line:1,column:7231},end:{line:1,column:7232}},loc:{start:{line:1,column:7234},end:{line:1,column:7255}},line:1},50:{name:"(anonymous_50)",decl:{start:{line:1,column:7259},end:{line:1,column:7260}},loc:{start:{line:1,column:7262},end:{line:1,column:7275}},line:1},51:{name:"(anonymous_51)",decl:{start:{line:1,column:7283},end:{line:1,column:7284}},loc:{start:{line:1,column:7287},end:{line:1,column:7352}},line:1},52:{name:"(anonymous_52)",decl:{start:{line:1,column:7305},end:{line:1,column:7306}},loc:{start:{line:1,column:7308},end:{line:1,column:7329}},line:1},53:{name:"(anonymous_53)",decl:{start:{line:1,column:7333},end:{line:1,column:7334}},loc:{start:{line:1,column:7336},end:{line:1,column:7349}},line:1},54:{name:"(anonymous_54)",decl:{start:{line:1,column:7365},end:{line:1,column:7366}},loc:{start:{line:1,column:7368},end:{line:1,column:7498}},line:1},55:{name:"(anonymous_55)",decl:{start:{line:1,column:7509},end:{line:1,column:7510}},loc:{start:{line:1,column:7513},end:{line:1,column:7680}},line:1},56:{name:"(anonymous_56)",decl:{start:{line:1,column:7525},end:{line:1,column:7526}},loc:{start:{line:1,column:7532},end:{line:1,column:7679}},line:1},57:{name:"(anonymous_57)",decl:{start:{line:1,column:7595},end:{line:1,column:7596}},loc:{start:{line:1,column:7598},end:{line:1,column:7604}},line:1},58:{name:"(anonymous_58)",decl:{start:{line:1,column:7612},end:{line:1,column:7613}},loc:{start:{line:1,column:7615},end:{line:1,column:7621}},line:1},59:{name:"(anonymous_59)",decl:{start:{line:1,column:7693},end:{line:1,column:7694}},loc:{start:{line:1,column:7697},end:{line:1,column:7742}},line:1},60:{name:"(anonymous_60)",decl:{start:{line:1,column:7709},end:{line:1,column:7710}},loc:{start:{line:1,column:7716},end:{line:1,column:7741}},line:1},61:{name:"(anonymous_61)",decl:{start:{line:1,column:7753},end:{line:1,column:7754}},loc:{start:{line:1,column:7756},end:{line:1,column:7775}},line:1},62:{name:"(anonymous_62)",decl:{start:{line:1,column:7759},end:{line:1,column:7760}},loc:{start:{line:1,column:7762},end:{line:1,column:7773}},line:1},63:{name:"(anonymous_63)",decl:{start:{line:1,column:7793},end:{line:1,column:7794}},loc:{start:{line:1,column:7797},end:{line:1,column:8030}},line:1},64:{name:"(anonymous_64)",decl:{start:{line:1,column:7809},end:{line:1,column:7810}},loc:{start:{line:1,column:7816},end:{line:1,column:8029}},line:1},65:{name:"(anonymous_65)",decl:{start:{line:1,column:7902},end:{line:1,column:7903}},loc:{start:{line:1,column:7909},end:{line:1,column:8005}},line:1},66:{name:"(anonymous_66)",decl:{start:{line:1,column:8043},end:{line:1,column:8044}},loc:{start:{line:1,column:8047},end:{line:1,column:8066}},line:1},67:{name:"(anonymous_67)",decl:{start:{line:1,column:8303},end:{line:1,column:8304}},loc:{start:{line:1,column:8313},end:{line:1,column:8483}},line:1},68:{name:"(anonymous_68)",decl:{start:{line:1,column:8470},end:{line:1,column:8471}},loc:{start:{line:1,column:8473},end:{line:1,column:8481}},line:1},69:{name:"(anonymous_69)",decl:{start:{line:1,column:8498},end:{line:1,column:8499}},loc:{start:{line:1,column:8501},end:{line:1,column:8599}},line:1},70:{name:"(anonymous_70)",decl:{start:{line:1,column:8574},end:{line:1,column:8575}},loc:{start:{line:1,column:8577},end:{line:1,column:8597}},line:1},71:{name:"(anonymous_71)",decl:{start:{line:1,column:8612},end:{line:1,column:8613}},loc:{start:{line:1,column:8616},end:{line:1,column:8796}},line:1},72:{name:"(anonymous_72)",decl:{start:{line:1,column:8771},end:{line:1,column:8772}},loc:{start:{line:1,column:8774},end:{line:1,column:8794}},line:1}},branchMap:{0:{loc:{start:{line:1,column:237},end:{line:1,column:310}},type:"cond-expr",locations:[{start:{line:1,column:244},end:{line:1,column:303}},{start:{line:1,column:304},end:{line:1,column:310}}],line:1},1:{loc:{start:{line:1,column:334},end:{line:1,column:343}},type:"binary-expr",locations:[{start:{line:1,column:334},end:{line:1,column:335}},{start:{line:1,column:338},end:{line:1,column:342}}],line:1},2:{loc:{start:{line:1,column:344},end:{line:1,column:369}},type:"binary-expr",locations:[{start:{line:1,column:344},end:{line:1,column:356}},{start:{line:1,column:358},end:{line:1,column:369}}],line:1},3:{loc:{start:{line:1,column:370},end:{line:1,column:419}},type:"if",locations:[{start:{line:1,column:370},end:{line:1,column:419}},{start:{line:1,column:370},end:{line:1,column:419}}],line:1},4:{loc:{start:{line:1,column:393},end:{line:1,column:418}},type:"binary-expr",locations:[{start:{line:1,column:393},end:{line:1,column:405}},{start:{line:1,column:407},end:{line:1,column:418}}],line:1},5:{loc:{start:{line:1,column:689},end:{line:1,column:693}},type:"binary-expr",locations:[{start:{line:1,column:689},end:{line:1,column:690}},{start:{line:1,column:692},end:{line:1,column:693}}],line:1},6:{loc:{start:{line:1,column:696},end:{line:1,column:700}},type:"binary-expr",locations:[{start:{line:1,column:696},end:{line:1,column:697}},{start:{line:1,column:699},end:{line:1,column:700}}],line:1},7:{loc:{start:{line:1,column:727},end:{line:1,column:738}},type:"cond-expr",locations:[{start:{line:1,column:729},end:{line:1,column:736}},{start:{line:1,column:737},end:{line:1,column:738}}],line:1},8:{loc:{start:{line:1,column:826},end:{line:1,column:979}},type:"switch",locations:[{start:{line:1,column:836},end:{line:1,column:870}},{start:{line:1,column:870},end:{line:1,column:916}},{start:{line:1,column:916},end:{line:1,column:978}}],line:1},9:{loc:{start:{line:1,column:1149},end:{line:1,column:1152}},type:"default-arg",locations:[{start:{line:1,column:1151},end:{line:1,column:1152}}],line:1},10:{loc:{start:{line:1,column:1155},end:{line:1,column:1272}},type:"if",locations:[{start:{line:1,column:1155},end:{line:1,column:1272}},{start:{line:1,column:1155},end:{line:1,column:1272}}],line:1},11:{loc:{start:{line:1,column:1298},end:{line:1,column:1340}},type:"cond-expr",locations:[{start:{line:1,column:1304},end:{line:1,column:1321}},{start:{line:1,column:1322},end:{line:1,column:1340}}],line:1},12:{loc:{start:{line:1,column:1749},end:{line:1,column:1764}},type:"binary-expr",locations:[{start:{line:1,column:1749},end:{line:1,column:1758}},{start:{line:1,column:1760},end:{line:1,column:1764}}],line:1},13:{loc:{start:{line:1,column:1914},end:{line:1,column:1959}},type:"cond-expr",locations:[{start:{line:1,column:1937},end:{line:1,column:1943}},{start:{line:1,column:1944},end:{line:1,column:1959}}],line:1},14:{loc:{start:{line:1,column:2249},end:{line:1,column:2272}},type:"default-arg",locations:[{start:{line:1,column:2251},end:{line:1,column:2272}}],line:1},15:{loc:{start:{line:1,column:2279},end:{line:1,column:2287}},type:"default-arg",locations:[{start:{line:1,column:2281},end:{line:1,column:2287}}],line:1},16:{loc:{start:{line:1,column:2295},end:{line:1,column:2303}},type:"default-arg",locations:[{start:{line:1,column:2297},end:{line:1,column:2303}}],line:1},17:{loc:{start:{line:1,column:2314},end:{line:1,column:2337}},type:"default-arg",locations:[{start:{line:1,column:2316},end:{line:1,column:2337}}],line:1},18:{loc:{start:{line:1,column:2350},end:{line:1,column:2357}},type:"default-arg",locations:[{start:{line:1,column:2352},end:{line:1,column:2357}}],line:1},19:{loc:{start:{line:1,column:2374},end:{line:1,column:2378}},type:"default-arg",locations:[{start:{line:1,column:2376},end:{line:1,column:2378}}],line:1},20:{loc:{start:{line:1,column:2405},end:{line:1,column:2409}},type:"default-arg",locations:[{start:{line:1,column:2407},end:{line:1,column:2409}}],line:1},21:{loc:{start:{line:1,column:2445},end:{line:1,column:2453}},type:"default-arg",locations:[{start:{line:1,column:2447},end:{line:1,column:2453}}],line:1},22:{loc:{start:{line:1,column:2475},end:{line:1,column:2482}},type:"default-arg",locations:[{start:{line:1,column:2477},end:{line:1,column:2482}}],line:1},23:{loc:{start:{line:1,column:2489},end:{line:1,column:2548}},type:"default-arg",locations:[{start:{line:1,column:2491},end:{line:1,column:2548}}],line:1},24:{loc:{start:{line:1,column:2558},end:{line:1,column:2562}},type:"default-arg",locations:[{start:{line:1,column:2560},end:{line:1,column:2562}}],line:1},25:{loc:{start:{line:1,column:2575},end:{line:1,column:2579}},type:"default-arg",locations:[{start:{line:1,column:2577},end:{line:1,column:2579}}],line:1},26:{loc:{start:{line:1,column:2641},end:{line:1,column:2693}},type:"cond-expr",locations:[{start:{line:1,column:2661},end:{line:1,column:2667}},{start:{line:1,column:2668},end:{line:1,column:2693}}],line:1},27:{loc:{start:{line:1,column:2704},end:{line:1,column:2742}},type:"cond-expr",locations:[{start:{line:1,column:2706},end:{line:1,column:2737}},{start:{line:1,column:2738},end:{line:1,column:2742}}],line:1},28:{loc:{start:{line:1,column:2749},end:{line:1,column:2777}},type:"cond-expr",locations:[{start:{line:1,column:2774},end:{line:1,column:2775}},{start:{line:1,column:2776},end:{line:1,column:2777}}],line:1},29:{loc:{start:{line:1,column:2780},end:{line:1,column:2808}},type:"cond-expr",locations:[{start:{line:1,column:2805},end:{line:1,column:2806}},{start:{line:1,column:2807},end:{line:1,column:2808}}],line:1},30:{loc:{start:{line:1,column:2816},end:{line:1,column:2866}},type:"cond-expr",locations:[{start:{line:1,column:2818},end:{line:1,column:2856}},{start:{line:1,column:2857},end:{line:1,column:2866}}],line:1},31:{loc:{start:{line:1,column:2880},end:{line:1,column:2958}},type:"if",locations:[{start:{line:1,column:2880},end:{line:1,column:2958}},{start:{line:1,column:2880},end:{line:1,column:2958}}],line:1},32:{loc:{start:{line:1,column:2883},end:{line:1,column:2950}},type:"binary-expr",locations:[{start:{line:1,column:2883},end:{line:1,column:2892}},{start:{line:1,column:2894},end:{line:1,column:2911}},{start:{line:1,column:2913},end:{line:1,column:2936}},{start:{line:1,column:2938},end:{line:1,column:2950}}],line:1},33:{loc:{start:{line:1,column:2964},end:{line:1,column:3006}},type:"binary-expr",locations:[{start:{line:1,column:2964},end:{line:1,column:2985}},{start:{line:1,column:2987},end:{line:1,column:3006}}],line:1},34:{loc:{start:{line:1,column:3039},end:{line:1,column:3082}},type:"if",locations:[{start:{line:1,column:3039},end:{line:1,column:3082}},{start:{line:1,column:3039},end:{line:1,column:3082}}],line:1},35:{loc:{start:{line:1,column:3042},end:{line:1,column:3074}},type:"binary-expr",locations:[{start:{line:1,column:3042},end:{line:1,column:3044}},{start:{line:1,column:3046},end:{line:1,column:3055}},{start:{line:1,column:3057},end:{line:1,column:3074}}],line:1},36:{loc:{start:{line:1,column:3118},end:{line:1,column:3190}},type:"binary-expr",locations:[{start:{line:1,column:3118},end:{line:1,column:3141}},{start:{line:1,column:3143},end:{line:1,column:3155}},{start:{line:1,column:3157},end:{line:1,column:3166}},{start:{line:1,column:3168},end:{line:1,column:3185}},{start:{line:1,column:3187},end:{line:1,column:3190}}],line:1},37:{loc:{start:{line:1,column:3284},end:{line:1,column:3329}},type:"if",locations:[{start:{line:1,column:3284},end:{line:1,column:3329}},{start:{line:1,column:3284},end:{line:1,column:3329}}],line:1},38:{loc:{start:{line:1,column:3430},end:{line:1,column:3589}},type:"if",locations:[{start:{line:1,column:3430},end:{line:1,column:3589}},{start:{line:1,column:3430},end:{line:1,column:3589}}],line:1},39:{loc:{start:{line:1,column:3433},end:{line:1,column:3437}},type:"binary-expr",locations:[{start:{line:1,column:3433},end:{line:1,column:3434}},{start:{line:1,column:3436},end:{line:1,column:3437}}],line:1},40:{loc:{start:{line:1,column:3752},end:{line:1,column:3797}},type:"if",locations:[{start:{line:1,column:3752},end:{line:1,column:3797}},{start:{line:1,column:3752},end:{line:1,column:3797}}],line:1},41:{loc:{start:{line:1,column:3797},end:{line:1,column:3848}},type:"binary-expr",locations:[{start:{line:1,column:3797},end:{line:1,column:3807}},{start:{line:1,column:3809},end:{line:1,column:3811}},{start:{line:1,column:3814},end:{line:1,column:3847}}],line:1},42:{loc:{start:{line:1,column:4013},end:{line:1,column:4039}},type:"cond-expr",locations:[{start:{line:1,column:4033},end:{line:1,column:4034}},{start:{line:1,column:4035},end:{line:1,column:4039}}],line:1},43:{loc:{start:{line:1,column:4040},end:{line:1,column:4258}},type:"if",locations:[{start:{line:1,column:4040},end:{line:1,column:4258}},{start:{line:1,column:4040},end:{line:1,column:4258}}],line:1},44:{loc:{start:{line:1,column:4076},end:{line:1,column:4104}},type:"if",locations:[{start:{line:1,column:4076},end:{line:1,column:4104}},{start:{line:1,column:4076},end:{line:1,column:4104}}],line:1},45:{loc:{start:{line:1,column:4104},end:{line:1,column:4162}},type:"binary-expr",locations:[{start:{line:1,column:4104},end:{line:1,column:4150}},{start:{line:1,column:4152},end:{line:1,column:4162}}],line:1},46:{loc:{start:{line:1,column:4163},end:{line:1,column:4242}},type:"binary-expr",locations:[{start:{line:1,column:4163},end:{line:1,column:4216}},{start:{line:1,column:4218},end:{line:1,column:4242}}],line:1},47:{loc:{start:{line:1,column:4524},end:{line:1,column:4585}},type:"cond-expr",locations:[{start:{line:1,column:4536},end:{line:1,column:4575}},{start:{line:1,column:4578},end:{line:1,column:4584}}],line:1},48:{loc:{start:{line:1,column:4536},end:{line:1,column:4560}},type:"binary-expr",locations:[{start:{line:1,column:4536},end:{line:1,column:4549}},{start:{line:1,column:4552},end:{line:1,column:4559}}],line:1},49:{loc:{start:{line:1,column:4948},end:{line:1,column:5025}},type:"cond-expr",locations:[{start:{line:1,column:4950},end:{line:1,column:5018}},{start:{line:1,column:5019},end:{line:1,column:5025}}],line:1},50:{loc:{start:{line:1,column:4950},end:{line:1,column:5018}},type:"cond-expr",locations:[{start:{line:1,column:4967},end:{line:1,column:4973}},{start:{line:1,column:4974},end:{line:1,column:5018}}],line:1},51:{loc:{start:{line:1,column:5373},end:{line:1,column:5595}},type:"binary-expr",locations:[{start:{line:1,column:5373},end:{line:1,column:5374}},{start:{line:1,column:5376},end:{line:1,column:5595}}],line:1},52:{loc:{start:{line:1,column:6060},end:{line:1,column:6088}},type:"cond-expr",locations:[{start:{line:1,column:6062},end:{line:1,column:6086}},{start:{line:1,column:6087},end:{line:1,column:6088}}],line:1},53:{loc:{start:{line:1,column:6193},end:{line:1,column:6229}},type:"binary-expr",locations:[{start:{line:1,column:6193},end:{line:1,column:6197}},{start:{line:1,column:6199},end:{line:1,column:6229}}],line:1},54:{loc:{start:{line:1,column:6364},end:{line:1,column:6387}},type:"default-arg",locations:[{start:{line:1,column:6366},end:{line:1,column:6387}}],line:1},55:{loc:{start:{line:1,column:6394},end:{line:1,column:6402}},type:"default-arg",locations:[{start:{line:1,column:6396},end:{line:1,column:6402}}],line:1},56:{loc:{start:{line:1,column:6410},end:{line:1,column:6418}},type:"default-arg",locations:[{start:{line:1,column:6412},end:{line:1,column:6418}}],line:1},57:{loc:{start:{line:1,column:6429},end:{line:1,column:6433}},type:"default-arg",locations:[{start:{line:1,column:6431},end:{line:1,column:6433}}],line:1},58:{loc:{start:{line:1,column:6446},end:{line:1,column:6455}},type:"default-arg",locations:[{start:{line:1,column:6448},end:{line:1,column:6455}}],line:1},59:{loc:{start:{line:1,column:6468},end:{line:1,column:6475}},type:"default-arg",locations:[{start:{line:1,column:6470},end:{line:1,column:6475}}],line:1},60:{loc:{start:{line:1,column:6492},end:{line:1,column:6496}},type:"default-arg",locations:[{start:{line:1,column:6494},end:{line:1,column:6496}}],line:1},61:{loc:{start:{line:1,column:6523},end:{line:1,column:6527}},type:"default-arg",locations:[{start:{line:1,column:6525},end:{line:1,column:6527}}],line:1},62:{loc:{start:{line:1,column:6563},end:{line:1,column:6571}},type:"default-arg",locations:[{start:{line:1,column:6565},end:{line:1,column:6571}}],line:1},63:{loc:{start:{line:1,column:6584},end:{line:1,column:6587}},type:"default-arg",locations:[{start:{line:1,column:6586},end:{line:1,column:6587}}],line:1},64:{loc:{start:{line:1,column:6600},end:{line:1,column:6603}},type:"default-arg",locations:[{start:{line:1,column:6602},end:{line:1,column:6603}}],line:1},65:{loc:{start:{line:1,column:6625},end:{line:1,column:6632}},type:"default-arg",locations:[{start:{line:1,column:6627},end:{line:1,column:6632}}],line:1},66:{loc:{start:{line:1,column:6639},end:{line:1,column:6700}},type:"default-arg",locations:[{start:{line:1,column:6641},end:{line:1,column:6700}}],line:1},67:{loc:{start:{line:1,column:6710},end:{line:1,column:6714}},type:"default-arg",locations:[{start:{line:1,column:6712},end:{line:1,column:6714}}],line:1},68:{loc:{start:{line:1,column:6724},end:{line:1,column:6731}},type:"default-arg",locations:[{start:{line:1,column:6726},end:{line:1,column:6731}}],line:1},69:{loc:{start:{line:1,column:6741},end:{line:1,column:6752}},type:"default-arg",locations:[{start:{line:1,column:6743},end:{line:1,column:6752}}],line:1},70:{loc:{start:{line:1,column:6767},end:{line:1,column:6771}},type:"default-arg",locations:[{start:{line:1,column:6769},end:{line:1,column:6771}}],line:1},71:{loc:{start:{line:1,column:6784},end:{line:1,column:6788}},type:"default-arg",locations:[{start:{line:1,column:6786},end:{line:1,column:6788}}],line:1},72:{loc:{start:{line:1,column:6948},end:{line:1,column:6998}},type:"cond-expr",locations:[{start:{line:1,column:6992},end:{line:1,column:6993}},{start:{line:1,column:6994},end:{line:1,column:6998}}],line:1},73:{loc:{start:{line:1,column:6951},end:{line:1,column:6984}},type:"cond-expr",locations:[{start:{line:1,column:6973},end:{line:1,column:6979}},{start:{line:1,column:6980},end:{line:1,column:6984}}],line:1},74:{loc:{start:{line:1,column:6999},end:{line:1,column:7025}},type:"binary-expr",locations:[{start:{line:1,column:6999},end:{line:1,column:7007}},{start:{line:1,column:7009},end:{line:1,column:7025}}],line:1},75:{loc:{start:{line:1,column:7189},end:{line:1,column:7229}},type:"if",locations:[{start:{line:1,column:7189},end:{line:1,column:7229}},{start:{line:1,column:7189},end:{line:1,column:7229}}],line:1},76:{loc:{start:{line:1,column:7288},end:{line:1,column:7351}},type:"binary-expr",locations:[{start:{line:1,column:7288},end:{line:1,column:7300}},{start:{line:1,column:7303},end:{line:1,column:7350}}],line:1},77:{loc:{start:{line:1,column:7381},end:{line:1,column:7421}},type:"cond-expr",locations:[{start:{line:1,column:7401},end:{line:1,column:7407}},{start:{line:1,column:7408},end:{line:1,column:7421}}],line:1},78:{loc:{start:{line:1,column:7422},end:{line:1,column:7439}},type:"if",locations:[{start:{line:1,column:7422},end:{line:1,column:7439}},{start:{line:1,column:7422},end:{line:1,column:7439}}],line:1},79:{loc:{start:{line:1,column:7545},end:{line:1,column:7583}},type:"cond-expr",locations:[{start:{line:1,column:7565},end:{line:1,column:7571}},{start:{line:1,column:7572},end:{line:1,column:7583}}],line:1},80:{loc:{start:{line:1,column:7584},end:{line:1,column:7678}},type:"cond-expr",locations:[{start:{line:1,column:7586},end:{line:1,column:7622}},{start:{line:1,column:7623},end:{line:1,column:7678}}],line:1},81:{loc:{start:{line:1,column:7817},end:{line:1,column:7882}},type:"binary-expr",locations:[{start:{line:1,column:7817},end:{line:1,column:7818}},{start:{line:1,column:7820},end:{line:1,column:7882}}],line:1},82:{loc:{start:{line:1,column:7925},end:{line:1,column:7955}},type:"cond-expr",locations:[{start:{line:1,column:7952},end:{line:1,column:7953}},{start:{line:1,column:7954},end:{line:1,column:7955}}],line:1},83:{loc:{start:{line:1,column:7959},end:{line:1,column:7987}},type:"cond-expr",locations:[{start:{line:1,column:7984},end:{line:1,column:7985}},{start:{line:1,column:7986},end:{line:1,column:7987}}],line:1},84:{loc:{start:{line:1,column:8306},end:{line:1,column:8310}},type:"default-arg",locations:[{start:{line:1,column:8308},end:{line:1,column:8310}}],line:1},85:{loc:{start:{line:1,column:8332},end:{line:1,column:8337}},type:"binary-expr",locations:[{start:{line:1,column:8332},end:{line:1,column:8334}},{start:{line:1,column:8336},end:{line:1,column:8337}}],line:1},86:{loc:{start:{line:1,column:8364},end:{line:1,column:8377}},type:"cond-expr",locations:[{start:{line:1,column:8366},end:{line:1,column:8367}},{start:{line:1,column:8368},end:{line:1,column:8377}}],line:1},87:{loc:{start:{line:1,column:8390},end:{line:1,column:8395}},type:"cond-expr",locations:[{start:{line:1,column:8392},end:{line:1,column:8393}},{start:{line:1,column:8394},end:{line:1,column:8395}}],line:1},88:{loc:{start:{line:1,column:8407},end:{line:1,column:8467}},type:"binary-expr",locations:[{start:{line:1,column:8407},end:{line:1,column:8408}},{start:{line:1,column:8411},end:{line:1,column:8466}}],line:1},89:{loc:{start:{line:1,column:8502},end:{line:1,column:8515}},type:"if",locations:[{start:{line:1,column:8502},end:{line:1,column:8515}},{start:{line:1,column:8502},end:{line:1,column:8515}}],line:1},90:{loc:{start:{line:1,column:8625},end:{line:1,column:8650}},type:"if",locations:[{start:{line:1,column:8625},end:{line:1,column:8650}},{start:{line:1,column:8625},end:{line:1,column:8650}}],line:1},91:{loc:{start:{line:1,column:8628},end:{line:1,column:8642}},type:"binary-expr",locations:[{start:{line:1,column:8628},end:{line:1,column:8630}},{start:{line:1,column:8633},end:{line:1,column:8641}}],line:1},92:{loc:{start:{line:1,column:8656},end:{line:1,column:8706}},type:"cond-expr",locations:[{start:{line:1,column:8700},end:{line:1,column:8701}},{start:{line:1,column:8702},end:{line:1,column:8706}}],line:1},93:{loc:{start:{line:1,column:8659},end:{line:1,column:8692}},type:"cond-expr",locations:[{start:{line:1,column:8681},end:{line:1,column:8687}},{start:{line:1,column:8688},end:{line:1,column:8692}}],line:1},94:{loc:{start:{line:1,column:8707},end:{line:1,column:8726}},type:"if",locations:[{start:{line:1,column:8707},end:{line:1,column:8726}},{start:{line:1,column:8707},end:{line:1,column:8726}}],line:1}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0,116:0,117:0,118:0,119:0,120:0,121:0,122:0,123:0,124:0,125:0,126:0,127:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:0,136:0,137:0,138:0,139:0,140:0,141:0,142:0,143:0,144:0,145:0,146:0,147:0,148:0,149:0,150:0,151:0,152:0,153:0,154:0,155:0,156:0,157:0,158:0,159:0,160:0,161:0,162:0,163:0,164:0,165:0,166:0,167:0,168:0,169:0,170:0,171:0,172:0,173:0,174:0,175:0,176:0,177:0,178:0,179:0,180:0,181:0,182:0,183:0,184:0,185:0,186:0,187:0,188:0,189:0,190:0,191:0,192:0,193:0,194:0,195:0,196:0,197:0,198:0,199:0,200:0,201:0,202:0,203:0,204:0,205:0,206:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0,0],9:[0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0],15:[0],16:[0],17:[0],18:[0],19:[0],20:[0],21:[0],22:[0],23:[0],24:[0],25:[0],26:[0,0],27:[0,0],28:[0,0],29:[0,0],30:[0,0],31:[0,0],32:[0,0,0,0],33:[0,0],34:[0,0],35:[0,0,0],36:[0,0,0,0,0],37:[0,0],38:[0,0],39:[0,0],40:[0,0],41:[0,0,0],42:[0,0],43:[0,0],44:[0,0],45:[0,0],46:[0,0],47:[0,0],48:[0,0],49:[0,0],50:[0,0],51:[0,0],52:[0,0],53:[0,0],54:[0],55:[0],56:[0],57:[0],58:[0],59:[0],60:[0],61:[0],62:[0],63:[0],64:[0],65:[0],66:[0],67:[0],68:[0],69:[0],70:[0],71:[0],72:[0,0],73:[0,0],74:[0,0],75:[0,0],76:[0,0],77:[0,0],78:[0,0],79:[0,0],80:[0,0],81:[0,0],82:[0,0],83:[0,0],84:[0],85:[0,0],86:[0,0],87:[0,0],88:[0,0],89:[0,0],90:[0,0],91:[0,0],92:[0,0],93:[0,0],94:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f0c2fe8244038a299e0ad050a2e8bf51c7fd1d8a"});var i=n[e];return s=function(){return i},i}s();var l=(s().s[0]++,Object.defineProperty),u=(s().s[1]++,Object.defineProperties),c=(s().s[2]++,Object.getOwnPropertyDescriptors),d=(s().s[3]++,Object.getOwnPropertySymbols),f=(s().s[4]++,Object.prototype.hasOwnProperty),p=(s().s[5]++,Object.prototype.propertyIsEnumerable);s().s[7]++,s().s[9]++,s().s[16]++;var h=(s().s[6]++,Math.pow),m=(e,t,r)=>(s().f[0]++,s().s[8]++,t in e?(s().b[0][0]++,l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r})):(s().b[0][1]++,e[t]=r)),g=(e,t)=>{for(var r in s().f[1]++,s().s[10]++,s().b[1][0]++,t||(s().b[1][1]++,t={}))s().s[11]++,s().b[2][0]++,f.call(t,r)&&(s().b[2][1]++,m(e,r,t[r]));if(s().s[12]++,d)for(var r of(s().b[3][0]++,s().s[13]++,d(t)))s().s[14]++,s().b[4][0]++,p.call(t,r)&&(s().b[4][1]++,m(e,r,t[r]));else s().b[3][1]++;return s().s[15]++,e},v=(e,t)=>(s().f[2]++,s().s[17]++,u(e,c(t)));s().s[18]++,s().s[22]++,s().s[33]++;var y=(e,t)=>{s().f[3]++;let r=(s().s[19]++,t.x-e.x),n=(s().s[20]++,t.y-e.y);return s().s[21]++,{length:Math.sqrt(h(r,2)+h(n,2)),angle:Math.atan2(n,r)}},x=e=>{s().f[4]++;let{current:t,next:r,previous:n,reverse:i}=(s().s[23]++,e),o=(s().s[24]++,s().b[5][0]++,n||(s().b[5][1]++,t)),a=(s().s[25]++,s().b[6][0]++,r||(s().b[6][1]++,t)),l=(s().s[26]++,.2),u=(s().s[27]++,y(o,a)),c=(s().s[28]++,u.angle+(i?(s().b[7][0]++,Math.PI):(s().b[7][1]++,0))),d=(s().s[29]++,u.length*l),f=(s().s[30]++,t.x+Math.cos(c)*d),p=(s().s[31]++,t.y+Math.sin(c)*d);return s().s[32]++,[f,p]},b=(e,t,r)=>{let n,i;switch(s().f[5]++,s().s[34]++,t){case 0:s().b[8][0]++,s().s[35]++,[n,i]=x({current:e}),s().s[36]++;break;case 1:s().b[8][1]++,s().s[37]++,[n,i]=x({current:r[t-1],next:e}),s().s[38]++;break;default:s().b[8][2]++,s().s[39]++,[n,i]=x({current:r[t-1],previous:r[t-2],next:e}),s().s[40]++}let[o,a]=(s().s[41]++,x({current:e,previous:r[t-1],next:r[t+1],reverse:!0}));return s().s[42]++,`C ${n},${i} ${o},${a} ${e.x}, ${e.y}`};function w({paths:e,id:t,strokeWidth:r,strokeColor:n,command:i=(s().b[9][0]++,b)}){if(s().f[6]++,s().s[43]++,1===e.length){s().b[10][0]++;let{x:i,y:o}=(s().s[44]++,e[0]),l=(s().s[45]++,r/2);return s().s[46]++,a.createElement("circle",{key:t,id:t,cx:i,cy:o,r:l,stroke:n,fill:n})}s().b[10][1]++;let o=(s().s[47]++,e.reduce((e,t,r,n)=>(s().f[7]++,s().s[48]++,0===r?(s().b[11][0]++,`M ${t.x},${t.y}`):(s().b[11][1]++,`${e} ${i(t,r,n)}`)),""));return s().s[49]++,a.createElement("path",{key:t,id:t,d:o,fill:"none",strokeLinecap:"round",stroke:n,strokeWidth:r})}var _=(s().s[52]++,function({id:e,paths:t}){return s().f[8]++,s().s[50]++,a.createElement(a.Fragment,null,t.map((t,r)=>(s().f[9]++,s().s[51]++,a.createElement(w,{key:`${e}__${r}`,paths:t.paths,id:`${e}__${r}`,strokeWidth:t.strokeWidth,strokeColor:t.strokeColor,command:b}))))});s().s[53]++;var j=e=>(s().f[10]++,s().s[54]++,new Promise((t,r)=>{s().f[11]++;let n=(s().s[55]++,new Image);s().s[56]++,n.addEventListener("load",()=>{s().f[12]++,s().s[57]++,s().b[12][0]++,n.width>0&&(s().b[12][1]++,t(n)),r(Error("Image not found"))}),n.addEventListener("error",e=>(s().f[13]++,s().s[58]++,r(e))),n.src=e,n.setAttribute("crossorigin","anonymous")}));function C(e){var t;s().f[14]++;let r=(s().s[59]++,null==(t=e.firstChild)?void s().b[13][0]++:(s().b[13][1]++,t.cloneNode(!0))),n=(s().s[60]++,e.offsetWidth),i=(s().s[61]++,e.offsetHeight);return s().s[62]++,r.setAttribute("viewBox",`0 0 ${n} ${i}`),r.setAttribute("width",n.toString()),r.setAttribute("height",i.toString()),{svgCanvas:r,width:n,height:i}}var k=(s().s[63]++,a.forwardRef((e,t)=>{s().f[15]++;let{paths:r,isDrawing:n,onPointerDown:i,onPointerMove:o,onPointerUp:l,id:u=(s().b[14][0]++,"react-sketch-canvas"),width:c=(s().b[15][0]++,"100%"),height:d=(s().b[16][0]++,"100%"),className:f=(s().b[17][0]++,"react-sketch-canvas"),canvasColor:p=(s().b[18][0]++,"red"),backgroundImage:h=(s().b[19][0]++,""),exportWithBackgroundImage:m=(s().b[20][0]++,!1),preserveBackgroundImageAspectRatio:v=(s().b[21][0]++,"none"),allowOnlyPointerType:y=(s().b[22][0]++,"all"),style:x=(s().b[23][0]++,{border:"0.0625rem solid #9c9c9c",borderRadius:"0.25rem"}),svgStyle:b=(s().b[24][0]++,{}),withViewBox:k=(s().b[25][0]++,!1)}=(s().s[64]++,e),E=(s().s[65]++,a.useRef(null)),S=(s().s[66]++,a.useRef(null)),N=(s().s[67]++,(0,a.useCallback)(e=>{var t,r,n;s().f[16]++;let i=(s().s[68]++,null==(t=E.current)?void s().b[26][0]++:(s().b[26][1]++,t.getBoundingClientRect()));s().s[69]++,S.current=i?(s().b[27][0]++,{width:i.width,height:i.height}):(s().b[27][1]++,null);let o=(s().s[70]++,null!=(r=window.scrollX)?(s().b[28][0]++,r):(s().b[28][1]++,0)),a=(s().s[71]++,null!=(n=window.scrollY)?(s().b[29][0]++,n):(s().b[29][1]++,0));return s().s[72]++,i?(s().b[30][0]++,{x:e.pageX-i.left-o,y:e.pageY-i.top-a}):(s().b[30][1]++,{x:0,y:0})},[])),P=(s().s[73]++,(0,a.useCallback)(e=>{if(s().f[17]++,s().s[74]++,s().b[32][0]++,"all"!==y&&(s().b[32][1]++,e.pointerType!==y)||(s().b[32][2]++,"mouse"===e.pointerType&&(s().b[32][3]++,0!==e.button))){s().b[31][0]++,s().s[75]++;return}s().b[31][1]++;let t=(s().s[76]++,s().b[33][0]++,"pen"===e.pointerType&&(s().b[33][1]++,(32&e.buttons)==32)),r=(s().s[77]++,N(e));s().s[78]++,i(r,t)},[y,N,i])),L=(s().s[79]++,(0,a.useCallback)(e=>{if(s().f[18]++,s().s[80]++,s().b[35][0]++,n&&(s().b[35][1]++,"all"===y||(s().b[35][2]++,e.pointerType===y)))s().b[34][1]++;else{s().b[34][0]++,s().s[81]++;return}let t=(s().s[82]++,N(e));s().s[83]++,o(t)},[y,N,n,o])),T=(s().s[84]++,(0,a.useCallback)(e=>{s().f[19]++,s().s[85]++,s().b[36][0]++,"mouse"===e.pointerType&&(s().b[36][1]++,0!==e.button)||(s().b[36][2]++,"all"!==y&&(s().b[36][3]++,e.pointerType!==y))||(s().b[36][4]++,l())},[y,l]));s().s[86]++,a.useImperativeHandle(t,()=>(s().f[20]++,s().s[87]++,{exportImage:e=>(s().f[21]++,s().s[88]++,new Promise((t,r)=>{s().f[22]++,s().s[89]++;try{let n=(s().s[90]++,E.current);if(s().s[91]++,n)s().b[37][1]++;else throw s().b[37][0]++,s().s[92]++,Error("Canvas not rendered yet");let{svgCanvas:i,width:o,height:a}=(s().s[93]++,C(n)),l=(s().s[94]++,`data:image/svg+xml;base64,${btoa(i.outerHTML)}`),u=(s().s[95]++,[j(l)]);if(s().s[96]++,s().b[39][0]++,m&&(s().b[39][1]++,h)){s().b[38][0]++,s().s[97]++;try{let e=(s().s[98]++,j(h));s().s[99]++,u.push(e)}catch(e){s().s[100]++,console.warn("exportWithBackgroundImage props is set without a valid background image URL. This option is ignored")}}else s().b[38][1]++;s().s[101]++,Promise.all(u).then(r=>{s().f[23]++;let n=(s().s[102]++,document.createElement("canvas"));s().s[103]++,n.setAttribute("width",o.toString()),n.setAttribute("height",a.toString());let i=(s().s[104]++,n.getContext("2d"));if(s().s[105]++,i)s().b[40][1]++;else throw s().b[40][0]++,s().s[106]++,Error("Canvas not rendered yet");s().s[107]++,s().b[41][0]++,"jpeg"!==e||(s().b[41][1]++,m)||(s().b[41][2]++,i.fillStyle=p,i.fillRect(0,0,o,a)),r.reverse().forEach(e=>{s().f[24]++,s().s[108]++,i.drawImage(e,0,0)}),t(n.toDataURL(`image/${e}`))}).catch(e=>{s().f[25]++,s().s[109]++,r(e)})}catch(e){s().s[110]++,r(e)}})),exportSvg:()=>(s().f[26]++,s().s[111]++,new Promise((e,t)=>{var r,n,i;s().f[27]++,s().s[112]++;try{let o=(s().s[113]++,null!=(r=E.current)?(s().b[42][0]++,r):(s().b[42][1]++,null));if(s().s[114]++,null!==o){s().b[43][0]++;let{svgCanvas:t}=(s().s[115]++,C(o));if(s().s[116]++,m){s().b[44][0]++,s().s[117]++,e(t.outerHTML),s().s[118]++;return}s().b[44][1]++,s().s[119]++,s().b[45][0]++,null==(n=t.querySelector(`#${u}__background`))||(s().b[45][1]++,n.remove()),s().b[46][0]++,null==(i=t.querySelector(`#${u}__canvas-background`))||(s().b[46][1]++,i.setAttribute("fill",p)),e(t.outerHTML)}else s().b[43][1]++;s().s[120]++,t(Error("Canvas not loaded"))}catch(e){s().s[121]++,t(e)}}))})),a.useEffect(()=>(s().f[28]++,s().s[122]++,document.addEventListener("pointerup",T),()=>{s().f[29]++,s().s[123]++,document.removeEventListener("pointerup",T)}),[T]);let O=(s().s[124]++,a.useMemo(()=>(s().f[30]++,s().s[125]++,r.filter(e=>(s().f[31]++,s().s[126]++,!e.drawMode))),[r])),R=(s().s[127]++,a.useMemo(()=>{s().f[32]++;let e=(s().s[128]++,0);return s().s[129]++,r.reduce((t,r)=>(s().f[33]++,s().s[130]++,r.drawMode?(s().b[47][0]++,s().b[48][0]++,void 0===t[e]&&(s().b[48][1]++,t[e]=[]),t[e].push(r)):(s().b[47][1]++,e+=1),t),[[]])},[r]));return s().s[131]++,a.createElement("div",{role:"presentation",ref:E,className:f,style:g({touchAction:"none",width:c,height:d},x),onPointerDown:P,onPointerMove:L,onPointerUp:T},a.createElement("svg",{version:"1.1",baseProfile:"full",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",style:g({width:"100%",height:"100%"},b),id:u,viewBox:k?(s().b[49][0]++,null===S.current?void s().b[50][0]++:(s().b[50][1]++,`0 0 ${S.current.width} ${S.current.height}`)):void s().b[49][1]++},a.createElement("g",{id:`${u}__eraser-stroke-group`,display:"none"},a.createElement("rect",{id:`${u}__mask-background`,x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),O.map((e,t)=>(s().f[34]++,s().s[132]++,a.createElement(w,{key:`${u}__eraser-${t}`,id:`${u}__eraser-${t}`,paths:e.paths,strokeColor:"#000000",strokeWidth:e.strokeWidth})))),a.createElement("defs",null,(s().b[51][0]++,h&&(s().b[51][1]++,a.createElement("pattern",{id:`${u}__background`,x:"0",y:"0",width:"100%",height:"100%",patternUnits:"userSpaceOnUse"},a.createElement("image",{x:"0",y:"0",width:"100%",height:"100%",xlinkHref:h,preserveAspectRatio:v})))),O.map((e,t)=>(s().f[35]++,s().s[133]++,a.createElement("mask",{id:`${u}__eraser-mask-${t}`,key:`${u}__eraser-mask-${t}`,maskUnits:"userSpaceOnUse"},a.createElement("use",{href:`#${u}__mask-background`}),Array.from({length:O.length-t},(e,r)=>(s().f[36]++,s().s[134]++,r+t)).map(e=>(s().f[37]++,s().s[135]++,a.createElement("use",{key:e.toString(),href:`#${u}__eraser-${e.toString()}`}))))))),a.createElement("g",{id:`${u}__canvas-background-group`},a.createElement("rect",{id:`${u}__canvas-background`,x:"0",y:"0",width:"100%",height:"100%",fill:h?(s().b[52][0]++,`url(#${u}__background)`):(s().b[52][1]++,p)})),R.map((e,t)=>(s().f[38]++,s().s[136]++,a.createElement("g",{id:`${u}__stroke-group-${t}`,key:`${u}__stroke-group-${t}`,mask:`${(s().b[53][0]++,O[t]&&(s().b[53][1]++,`url(#${u}__eraser-mask-${t})`))}`},a.createElement(_,{id:`${u}__stroke-group-${t}__paths`,paths:e}))))))})),E=(s().s[137]++,a.forwardRef((e,t)=>{s().f[39]++;let{id:r=(s().b[54][0]++,"react-sketch-canvas"),width:n=(s().b[55][0]++,"100%"),height:i=(s().b[56][0]++,"100%"),className:o=(s().b[57][0]++,""),canvasColor:l=(s().b[58][0]++,"white"),strokeColor:u=(s().b[59][0]++,"red"),backgroundImage:c=(s().b[60][0]++,""),exportWithBackgroundImage:d=(s().b[61][0]++,!1),preserveBackgroundImageAspectRatio:f=(s().b[62][0]++,"none"),strokeWidth:p=(s().b[63][0]++,4),eraserWidth:h=(s().b[64][0]++,8),allowOnlyPointerType:m=(s().b[65][0]++,"all"),style:y=(s().b[66][0]++,{border:"0.0625rem solid lightgray",borderRadius:"0.25rem"}),svgStyle:x=(s().b[67][0]++,{}),onChange:b=(s().b[68][0]++,e=>{s().f[40]++}),onStroke:w=(s().b[69][0]++,(e,t)=>{s().f[41]++}),withTimestamp:_=(s().b[70][0]++,!1),withViewBox:j=(s().b[71][0]++,!1)}=(s().s[138]++,e),C=(s().s[139]++,a.createRef()),[E,S]=(s().s[140]++,a.useState(!0)),[N,P]=(s().s[141]++,a.useState(!1)),[L,T]=(s().s[142]++,a.useState([])),[O,R]=(s().s[143]++,a.useState([])),[A,I]=(s().s[144]++,a.useState([])),M=(s().s[145]++,a.useCallback(()=>{var e,t;s().f[42]++;let r=(s().s[146]++,null!=(t=null==(e=A.slice(-1))?void s().b[73][0]++:(s().b[73][1]++,e[0]))?(s().b[72][0]++,t):(s().b[72][1]++,null));s().s[147]++,s().b[74][0]++,null!==r&&(s().b[74][1]++,w(r,!r.drawMode))},[N]));return s().s[148]++,a.useEffect(()=>{s().f[43]++,s().s[149]++,M()},[N]),a.useEffect(()=>{s().f[44]++,s().s[150]++,b(A)},[A]),a.useImperativeHandle(t,()=>(s().f[45]++,s().s[151]++,{eraseMode:e=>{s().f[46]++,s().s[152]++,S(!e)},clearCanvas:()=>{s().f[47]++,s().s[153]++,T([...A]),I([])},undo:()=>{if(s().f[48]++,s().s[154]++,0!==L.length){s().b[75][0]++,s().s[155]++,I([...L]),T([]),s().s[156]++;return}s().b[75][1]++,s().s[157]++,R(e=>(s().f[49]++,s().s[158]++,[...e,...A.slice(-1)])),I(e=>(s().f[50]++,s().s[159]++,e.slice(0,-1)))},redo:()=>{s().f[51]++,s().s[160]++,s().b[76][0]++,0!==O.length&&(s().b[76][1]++,I(e=>(s().f[52]++,s().s[161]++,[...e,...O.slice(-1)])),R(e=>(s().f[53]++,s().s[162]++,e.slice(0,-1))))},exportImage:e=>{var t;s().f[54]++;let r=(s().s[163]++,null==(t=C.current)?void s().b[77][0]++:(s().b[77][1]++,t.exportImage));if(s().s[164]++,r)return s().b[78][0]++,s().s[165]++,r(e);throw s().b[78][1]++,s().s[166]++,Error("Export function called before canvas loaded")},exportSvg:()=>(s().f[55]++,s().s[167]++,new Promise((e,t)=>{var r;s().f[56]++;let n=(s().s[168]++,null==(r=C.current)?void s().b[79][0]++:(s().b[79][1]++,r.exportSvg));s().s[169]++,n?(s().b[80][0]++,n().then(t=>{s().f[57]++,s().s[170]++,e(t)}).catch(e=>{s().f[58]++,s().s[171]++,t(e)})):(s().b[80][1]++,t(Error("Export function called before canvas loaded")))})),exportPaths:()=>(s().f[59]++,s().s[172]++,new Promise((e,t)=>{s().f[60]++,s().s[173]++;try{s().s[174]++,e(A)}catch(e){s().s[175]++,t(e)}})),loadPaths:e=>{s().f[61]++,s().s[176]++,I(t=>(s().f[62]++,s().s[177]++,[...t,...e]))},getSketchingTime:()=>(s().f[63]++,s().s[178]++,new Promise((e,t)=>{s().f[64]++,s().s[179]++,s().b[81][0]++,_||(s().b[81][1]++,t(Error("Set 'withTimestamp' prop to get sketching time"))),s().s[180]++;try{let t=(s().s[181]++,A.reduce((e,t)=>{var r,n;s().f[65]++;let i=(s().s[182]++,null!=(r=t.startTimestamp)?(s().b[82][0]++,r):(s().b[82][1]++,0)),o=(s().s[183]++,null!=(n=t.endTimestamp)?(s().b[83][0]++,n):(s().b[83][1]++,0));return s().s[184]++,e+(o-i)},0));s().s[185]++,e(t)}catch(e){s().s[186]++,t(e)}})),resetCanvas:()=>{s().f[66]++,s().s[187]++,T([]),R([]),I([])}})),a.createElement(k,{ref:C,id:r,width:n,height:i,className:o,canvasColor:l,backgroundImage:c,exportWithBackgroundImage:d,preserveBackgroundImageAspectRatio:f,allowOnlyPointerType:m,style:y,svgStyle:x,paths:A,isDrawing:N,onPointerDown:(e,t=(s().b[84][0]++,!1))=>{s().f[67]++,s().s[188]++,P(!0),R([]);let r=(s().s[189]++,s().b[85][0]++,!t&&(s().b[85][1]++,E)),n=(s().s[190]++,{drawMode:r,strokeColor:r?(s().b[86][0]++,u):(s().b[86][1]++,"#000000"),strokeWidth:r?(s().b[87][0]++,p):(s().b[87][1]++,h),paths:[e]});s().s[191]++,s().b[88][0]++,_&&(s().b[88][1]++,n=v(g({},n),{startTimestamp:Date.now(),endTimestamp:0})),I(e=>(s().f[68]++,s().s[192]++,[...e,n]))},onPointerMove:e=>{if(s().f[69]++,s().s[193]++,N)s().b[89][1]++;else{s().b[89][0]++,s().s[194]++;return}let t=(s().s[195]++,A.slice(-1)[0]),r=(s().s[196]++,v(g({},t),{paths:[...t.paths,e]}));s().s[197]++,I(e=>(s().f[70]++,s().s[198]++,[...e.slice(0,-1),r]))},onPointerUp:()=>{var e,t;if(s().f[71]++,s().s[199]++,s().b[91][0]++,N&&(s().b[91][1]++,P(!1),_))s().b[90][1]++;else{s().b[90][0]++,s().s[200]++;return}let r=(s().s[201]++,null!=(t=null==(e=A.slice(-1))?void s().b[93][0]++:(s().b[93][1]++,e[0]))?(s().b[92][0]++,t):(s().b[92][1]++,null));if(s().s[202]++,null===r){s().b[94][0]++,s().s[203]++;return}s().b[94][1]++;let n=(s().s[204]++,v(g({},r),{endTimestamp:Date.now()}));s().s[205]++,I(e=>(s().f[72]++,s().s[206]++,[...e.slice(0,-1),n]))},withViewBox:j})})),S=r(17394),N=r(67988),P=r(2267),L=r(16135),T=r(53574),O=r(51879),R=r(47922),A=r(13346),I=r(69501),M=r(33554),D=r(69306),F=r(95995),z=r(19387);function B(e){let{imageOptions:t,setOverlayImage:r,strokePaths:n,handleClickClearInpaintingMask:i,close:s}=e,[l,u]=(0,a.useState)(24),[c,d]=(0,a.useState)(!1),[f,p]=(0,a.useState)(0),h=(0,a.useRef)(null),m=(0,a.useRef)(null),[g,v]=(0,a.useState)("#FFFFFF"),y=function(e){let{image:t}=e,r=(0,F.l)(t),n=function(){let[e,t]=(0,a.useState)({width:window.innerWidth,height:window.innerHeight});return(0,a.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}(),i=(0,D.OV)("xs"),o=(0,D.OV)("sm"),s=(0,D.OV)("md"),[l,u]=(0,a.useState)(512),[c,d]=(0,a.useState)(512);return(0,a.useEffect)(()=>{(()=>{if(!r.data)return;let e=.8*n.width,t=.6*n.height-96,i=r.data.width,o=r.data.height,a=i/o,s=i,l=o;s>e&&(l=(s=e)/a),l>t&&(s=(l=t)*a),u(s),d(l)})()},[r,n.width,n.height,i,o,s]),console.log({width:l,height:c}),{width:l,height:c}}({image:t.init_image}),[x,b]=(0,a.useState)(512),[w,_]=(0,a.useState)(512);(0,a.useEffect)(()=>{b(m?.current?.offsetWidth),_(m?.current?.offsetHeight);let e=()=>{b(m?.current?.offsetWidth),_(m?.current?.offsetHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[b,_,m]),(0,a.useEffect)(()=>{h?.current?.loadPaths(n)},[n]),(0,a.useEffect)(()=>{h?.current?.eraseMode(1===f)},[f]),U("[",()=>{u(e=>e>O.YT?e-O.R$:e)}),U("]",()=>{u(e=>e<O.mm?e+O.R$:e)});let j=(0,a.useCallback)(async e=>{let t=await h?.current?.exportImage("png");r(e.length?t:void 0,e),d(!!e.length)},[h,r,d]),C=(0,a.useCallback)(()=>{h?.current?.clearCanvas(),i(),d(!1)},[i,h,d]),k=(0,a.useCallback)(()=>{p(0)},[p]),B=(0,a.useCallback)(()=>{p(e=>1===e?0:1)},[p]),V=(0,a.useCallback)(()=>{h?.current?.undo()},[h]),$=(0,a.useCallback)(()=>{s()},[s]);return((0,a.useEffect)(()=>{let e=e=>{"KeyZ"==e.code&&e.metaKey&&V(),"Escape"==e.code&&s()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),(0,R.y)("new-inpainting-modal"))?(0,o.jsxs)("div",{className:"inpainting-modal bg-pg-900 divide-y divide-pg-600",children:[(0,o.jsxs)("div",{className:"px-4 pt-4 pb-2",children:[(0,o.jsx)("h1",{className:"text-pg-50 font-pg-semibold",children:"Add Inpainting Mask"}),(0,o.jsx)("p",{className:"pb-2 text-base text-pg-300",children:"Paint a mask that the model will fill using the prompt text"})]}),(0,o.jsxs)("div",{className:"w-full h-full md:p-8 justify-center flex items-center relative aspect-square md:min-w-[60vh]",children:[(0,o.jsx)(z.A,{}),(0,o.jsxs)("div",{className:"relative",style:{height:y.height,width:y.width},children:[(0,o.jsx)("img",{src:t.init_image,alt:"Image to image",className:"absolute inset-0",style:{height:y.height,width:y.width}}),(0,o.jsx)(E,{className:"absolute inset-0 cursor-crosshair",ref:h,style:{border:"none"},onChange:j,width:`${y.width}px`,height:`${y.height}px`,strokeWidth:l,strokeColor:g,canvasColor:"none",eraserWidth:l})]},`${x}-${w}`)]}),(0,o.jsxs)("div",{className:"px-4 py-2 flex items-center justify-between gap-2 w-full",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 w-full md:w-1/2",children:[(0,o.jsx)(A.z,{size:"icon",title:"Brush",className:`${0===f?"text-white":""} hover:text-white active:text-gray-300 shrink-0`,onClick:k,children:(0,o.jsx)(N.Z,{})}),(0,o.jsx)(I.i,{className:"",min:O.YT,max:O.mm,step:O.R$,onValueChange:e=>{let[t]=e;return u(t)},value:[l],valueLabel:`${l}px`}),(0,o.jsx)(A.z,{size:"icon",title:"Erase",className:`${1===f?"text-white":""} hover:text-white active:text-gray-300 shrink-0`,onClick:B,children:(0,o.jsx)(L.Z,{})}),c&&(0,o.jsx)(A.z,{size:"icon",title:"Undo",className:" hover:text-white active:text-pg-300 shrink-0",onClick:V,children:(0,o.jsx)(T.Z,{})})]}),c&&(0,o.jsx)(A.z,{size:"icon",title:"Clear Mask",className:" hover:text-destructive shrink-0 active:text-pg-300",onClick:C,children:(0,o.jsx)(M.X,{})})]}),(0,o.jsx)("div",{className:"px-4 py-4 space-x-2 child:text-[0.9rem] text-white text-right",children:(0,o.jsx)(A.z,{size:"lg",variant:"create",onClick:$,children:"Done"})})]}):(0,o.jsxs)("div",{className:"inpainting-modal bg-[#05020E] divide-y divide-white/10",children:[(0,o.jsxs)("div",{className:"px-4 pt-4 pb-2",children:[(0,o.jsx)("h1",{className:"text-white font-semibold",children:"Add Inpainting Mask"}),(0,o.jsx)("p",{className:"pb-2 text-[0.9rem] text-gray-400",children:"Paint a mask that the model will fill using the prompt text"})]}),(0,o.jsx)("div",{className:"relative flex p-8",children:(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)("img",{ref:m,src:t.init_image,alt:"Image to image"}),(0,o.jsx)(E,{className:"absolute top-0 left-0 cursor-crosshair",ref:h,onChange:j,width:`${x}px`,height:`${w}px`,strokeWidth:l,strokeColor:g,canvasColor:"none",eraserWidth:l})]})}),(0,o.jsx)("fieldset",{className:"create-fieldset px-4 py-2",children:(0,o.jsxs)("div",{className:"flex relative",children:[(0,o.jsx)("button",{title:"Brush",className:`${0===f?"text-white":"text-gray-500"} hover:text-white active:text-gray-300 ml-3`,onClick:k,children:(0,o.jsx)(N.Z,{})}),(0,o.jsx)("div",{className:"ml-3 w-1/2",children:(0,o.jsx)(S.Z,{min:O.YT,max:O.mm,step:O.R$,onChange:u,value:l})}),(0,o.jsx)("button",{title:"Erase",className:`${1===f?"text-white":"text-gray-500"} hover:text-white active:text-gray-300 ml-3`,onClick:B,children:(0,o.jsx)(L.Z,{})}),c&&(0,o.jsx)("button",{title:"Undo",className:"text-gray-500 hover:text-white active:text-gray-300 ml-3 w-[20px]",onClick:V,children:(0,o.jsx)(T.Z,{})}),c&&(0,o.jsx)("button",{title:"Clear Mask",className:"text-gray-500 hover:text-white active:text-gray-300 absolute top-1 right-0 w-[20px]",onClick:C,children:(0,o.jsx)(P.Z,{})})]})}),(0,o.jsx)("div",{className:"px-4 py-4 space-x-2 child:text-[0.9rem] text-white text-right",children:(0,o.jsx)("button",{className:"button holographic-button",onClick:$,children:"Done"})})]})}function U(e,t){(0,a.useEffect)(()=>{function r(r){r.key===e&&t()}return window.addEventListener("keyup",r),()=>window.removeEventListener("keyup",r)},[e,t])}(n=i||(i={}))[n.Brush=0]="Brush",n[n.Eraser=1]="Eraser"},35171:function(e,t,r){"use strict";r.d(t,{Ig:function(){return u},Pk:function(){return c},Rv:function(){return d},Sg:function(){return h},Wc:function(){return p},be:function(){return f},qX:function(){return l}});var n=r(85893),i=r(41664),o=r.n(i),a=r(24011),s=r(44746);let l=(0,a.L)("div","mt-4 mb-2 rounded-md bg-gray-90 text-gray-25 py-1.5 text-sm font-pg-medium block px-2.5");function u(e){let{currentLimit:t}=e;return(0,s.sA)()||150===t?null:(0,n.jsxs)(l,{children:["Buy a Pro Plan to go above ",t?`${t} steps`:"your step limit",".",(0,n.jsx)(o(),{href:"/pricing",target:"_blank",className:"text-button mt-1",children:"Upgrade to Pro →"})]})}let c=(0,n.jsx)(l,{children:"Image strength of 100 will generate the same image."}),d=(0,n.jsx)(l,{children:"Low values will completely redraw the masked regions."}),f=(0,n.jsx)(l,{children:"High values will only slightly edit the masked regions."});function p(e){let{min:t=7,max:r=10}=e;return(0,n.jsxs)(l,{children:["High values can cause images to conform to a prompt at the expense of it looking good. We recommend ",t," to ",r," instead."]})}let h=(0,n.jsx)(l,{children:"High values can take a while. We recommend using 50 instead."})},42796:function(e,t,r){"use strict";r.d(t,{_:function(){return f}});var n=r(85893),i=r(41664),o=r.n(i),a=r(12993),s=r(56496),l=r.n(s),u=r(93123),c=r(8891),d=r.n(c);function f(e){let{children:t,label:r,sideOffset:i=5,alignOffset:s=0,delayDuration:c=50,mixpanelKey:f,open:p,upgradeTo:h="Pro",side:m="left",arrow:g=!0,alignCta:v="start",showUpgradeButton:y=!0,maxWidth:x=300}=e,b=(0,n.jsxs)("div",{className:"flex flex-col gap-1 p-1 text-sm",style:{maxWidth:x},children:[r&&(0,n.jsx)("p",{className:"text-gray-25 font-pg-medium leading-6",children:r}),y&&(0,n.jsxs)(o(),{href:"/pricing",className:"mt-2 text-purple-primary font-pg-medium",target:"_blank",onPointerDownCapture:e=>{e.stopPropagation(),d().track(`Upgrade to ${h} Tooltip Clicked`,{from:f}),window.open("/pricing","_blank")},children:[`Upgrade to ${h} `,"→"]})]});return(0,n.jsx)(a.zt,{delayDuration:c,children:(0,n.jsxs)(a.fC,{open:p,children:[(0,n.jsx)(a.xz,{asChild:!0,children:t}),(0,n.jsx)(a.h_,{children:(0,n.jsxs)(a.VY,{side:m,align:"end",className:l().TooltipContent,sideOffset:i,alignOffset:s,style:{zIndex:u.KN.TOASTS},children:[b,g&&(0,n.jsx)("span",{style:{position:"absolute",transformOrigin:"100% 0px",...{left:{right:"0px",top:"calc(50% - 6px)",transform:"translateY(50%) rotate(-90deg) translateX(50%)"},right:{left:"0px",top:"calc(50% - 6px)",transform:"translateY(50%) rotate(90deg) translateX(-50%)"},top:{bottom:"0px",left:"calc(50% - 6px)",transform:"translateX(-50%) translateY(50%)"},bottom:{top:"0px",left:"calc(50% - 6px)",transform:"translateX(-50%) translateY(-50%)"}}[m]},children:(0,n.jsxs)("svg",{className:l().TooltipArrow,width:"12",height:"6",viewBox:"0 0 30 10",preserveAspectRatio:"none",style:{display:"block"},children:[(0,n.jsx)("polygon",{className:"fill-gray-90",points:"0,0 30,0 15,10"}),(0,n.jsx)("line",{x1:"15",y1:"10",x2:"0",y2:"0",stroke:"white",className:"stroke-gray-85 stroke-2"}),(0,n.jsx)("line",{x1:"15",y1:"10",x2:"30",y2:"0",className:"stroke-gray-85 stroke-2"})]})})]})})]})})}},17394:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var n=r(85893),i=r(67294),o=r(35763),a=r(16914),s=r(16554),l=(0,a.m)("div");l.displayName="Box";var u=(0,s.G)(function(e,t){let{size:r,centerContent:i=!0,...o}=e;return(0,n.jsx)(l,{ref:t,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});u.displayName="Square",(0,s.G)(function(e,t){let{size:r,...i}=e;return(0,n.jsx)(u,{size:r,ref:t,borderRadius:"9999px",...i})}).displayName="Circle";var c=r(86010),d=r(19454),f=r.n(d);function p(e){let{max:t,min:r,label:a,onChange:s,value:u,disabled:d=!1,id:p,step:h=1,hideTextInput:m=!1,children:g,className:v,onMouseEnter:y,onMouseLeave:x,onChangeEnd:b,labelClassName:w,textInputClassName:_,sliderThumbBoxSize:j=4,focusThumbOnChange:C,tickMarks:k=[]}=e,[E,S]=(0,i.useState)(u);(0,i.useEffect)(()=>{S(u)},[u]),(0,i.useEffect)(()=>{u<r&&s(r),u>t&&s(t)},[u,r,t]);let N=k.map(e=>(0,n.jsx)(o.jz,{value:e,className:f().SliderMark},e));return(0,n.jsxs)("div",{id:`slider-${a}`,className:(0,c.Z)("slider-container",v,f().Container),children:[a&&(0,n.jsx)("label",{htmlFor:`range-slider-${a}`,className:w??"text-gray-300 font-mono",children:a}),(0,n.jsxs)(o.iR,{isDisabled:d,value:u,min:r,max:t,step:h,onChange:e=>{s(e)},id:p,onMouseEnter:y||(()=>{}),onMouseLeave:x||(()=>{}),onChangeEnd:b||(()=>{}),focusThumbOnChange:C,children:[(0,n.jsxs)(o.Uj,{backgroundColor:"var(--toned-out-gray)",children:[(0,n.jsx)(l,{position:"relative",right:10}),(0,n.jsx)(o.Ms,{backgroundColor:"var(--accent-blue)","aria-valuenow":u},`${u} ${E} ${Math.random()}`),N]}),(0,n.jsx)(o.gs,{boxSize:j}),N,(0,n.jsx)(n.Fragment,{children:g})]}),!m&&(0,n.jsx)("input",{type:"text","data-cy":`slider-${a}-input`,className:`w-12 rounded-full bg-gray-90 text-xs text-center py-1 text-gray-200 ${_??""}`,value:E,disabled:d,onBlur:e=>{let n=Number(e.currentTarget.value)||r;n=Math.round((n-r)/h)*h+r;let i=h.toString().split(".")[1]?.length??0;(n=Number(n.toFixed(i)))>t&&(n=t),n<r&&(n=r),S(n),s(n),b&&b()},onFocus:e=>{e.currentTarget.select()},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()},onChange:e=>{S(e.currentTarget.value||"")}})]})}},54167:function(e,t,r){"use strict";r.d(t,{Z:function(){return f},g:function(){return p}});var n=r(85893),i=r(96897),o=r(9669),a=r.n(o),s=r(11163),l=r.n(s),u=r(67294),c=r(81810);let d=(0,u.createContext)({imageOpen:!1,imageData:void 0,setImageData:()=>{},imageModalState:"idle",setImageModalState:()=>{},openImageWithId:()=>{},similarImages:[],similarImagesState:"idle"});function f(e){let{children:t,initialImage:r}=e,[o,f]=(0,u.useState)(r),[p,h]=(0,u.useState)(r?"complete":"idle"),[m,g]=(0,u.useState)("idle"),[v,y]=(0,u.useState)([]),x=(0,s.useRouter)(),b=(0,c.OR)(x.query.postId),[w,_]=(0,u.useState)(void 0),j=(0,u.useCallback)(async e=>{g("loading");let t=await (0,i.wX)(()=>fetch(`/api/images/explore?id=${e}`));if((0,i.dZ)(t)){g("error");return}let{data:r}=await t.json();(0,c.OR)(l().query.postId)===e&&(y(r),g("complete"))},[]),C=(0,u.useCallback)(async e=>{let t=await (0,i.wX)(()=>fetch(`/api/images/access-image-canvas?imageId=${e}`));if(!(0,i.dZ)(t)){let{data:e}=await t.json();_(e.canvasId)}},[]);(0,u.useEffect)(()=>{r&&j(r.id)},[j,r]),(0,u.useEffect)(()=>{r&&C(r.id)},[C,r]);let k=(0,u.useCallback)(async e=>{if(!e)return;let{data:t}=await a().get("/api/images/image",{params:{id:e}});return t.data},[]),E=(0,u.useCallback)(async e=>{h("loading"),x.push(`/post/${e}`),f(await k(e)),h("complete"),j(e),C(e)},[C,j,k,x]);return(0,u.useEffect)(()=>{b&&b!==o?.id&&E(b)},[b]),(0,n.jsx)(d.Provider,{value:{imageOpen:!1,imageData:o,openImageWithId:E,setImageData:(0,u.useCallback)(e=>{f(e),y([]),j(e.id),C(e.id),k(e.id).then(t=>{if(t&&l().query.postId&&t.id===l().query?.postId){let r=t.remixedFrom?.id===e.remixedFrom?.id,n=t.user?.isFollowing===e.user?.isFollowing;r&&n||console.warn("The image that was set is missing some data. Please check the data that is being passed to `setImageData` to ensure it has all necessary information about the image."),f({...e,...t})}}),h("complete")},[C,j,k]),imageModalState:p,setImageModalState:h,similarImages:v,similarImagesState:m,canvasLink:w},children:t})}function p(){let e=(0,u.useContext)(d);if(void 0===e)throw Error("useImageModal must be used within a ImageModalProvider");return e}},27632:function(e,t,r){"use strict";r.d(t,{R:function(){return x}});var n=r(85893),i=r(64529),o=r(782),a=r(1604),s=r(47435);let l={input:a.z.object({image:a.z.string()}),output:a.z.object({has_face:a.z.boolean()})},u=(0,i.Ue)()((0,o.tJ)(e=>({ignoreWarning:!1}),{name:"pai-img2img-face-warning",partialize:e=>({ignoreWarning:e.ignoreWarning})}));async function c(e){if(u.getState().ignoreWarning||!e)return!1;let t=await (0,s.YO)(e,300,300),r=await fetch("/api/models/face_detection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({image:t})}),n=await r.json();return l.output.parse(n).has_face}var d=r(84521),f=r.n(d),p=r(32478),h=r(86010),m=r(49870),g=r(18794),v=r(21506),y=r(13346);function x(e){let t=(0,g.Bg)(),{ignoreWarning:r}=u(),{data:i}=(0,m.Z)(r?null:e.init_image??null,c);return!r&&e.init_image&&i?t?(0,n.jsxs)(v.q,{variant:"info",children:[(0,n.jsxs)("div",{className:"flex justify-between pr-1 items-center pb-2",children:[(0,n.jsx)("h3",{className:"font-pg-semibold",children:"Limitations with faces"}),(0,n.jsx)(y.z,{size:"iconSm",className:"self-start text-pg-50 bg-transparent hover:bg-transparent shadow-none",onClick:()=>{u.setState({ignoreWarning:!0})},children:(0,n.jsx)(p.Z,{width:20})})]}),(0,n.jsx)("p",{children:"Our AI models can't perfectly replicate an image, especially faces. If you uploaded a face, it won't look like the original face. It's like trying to draw a new picture using a blurry image as a reference. Instead, AI takes inspiration from the image and creates something new."})]}):(0,n.jsxs)("div",{...e,className:(0,h.Z)(f().Warning,e.className),children:[(0,n.jsxs)("div",{className:"flex justify-between pr-1 items-center pb-2",children:[(0,n.jsx)("h3",{className:"text-white",children:"Limitations with faces"}),(0,n.jsx)("button",{className:"self-start",onClick:()=>{u.setState({ignoreWarning:!0})},type:"button",children:(0,n.jsx)(p.Z,{width:20})})]}),(0,n.jsx)("p",{children:"Our AI models can't perfectly replicate an image, especially faces. If you uploaded a face, it won't look like the original face. It's like trying to draw a new picture using a blurry image as a reference. Instead, AI takes inspiration from the image and creates something new."})]}):null}},80980:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(85893);function i(){return(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_3085_92752)",children:[(0,n.jsx)("path",{d:"M7 15H9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12 7.99869C12.0027 7.24995 11.7951 6.51549 11.401 5.87887C11.0069 5.24225 10.442 4.72904 9.77061 4.3976C9.09922 4.06617 8.34828 3.92983 7.60323 4.0041C6.85818 4.07837 6.14894 4.36027 5.55618 4.81771C4.96343 5.27516 4.51097 5.8898 4.25028 6.59169C3.98959 7.29358 3.93113 8.05455 4.08156 8.78803C4.232 9.5215 4.58527 10.198 5.10121 10.7406C5.61714 11.2833 6.27501 11.6702 6.99998 11.8574V12.9987H8.99998V11.8574C9.85702 11.6377 10.6168 11.1395 11.1598 10.441C11.7029 9.74256 11.9984 8.88343 12 7.99869V7.99869Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8 2V1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14 7H15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M1 8H2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.2427 11.7422L12.95 12.4495",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M3.05005 2.55078L3.75738 3.25811",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.2427 3.25811L12.95 2.55078",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M3.05005 12.4495L3.75738 11.7422",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_3085_92752",children:(0,n.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]})}r(67294);var o=r(91187);function a(e){let{tip:t,className:r=""}=e,a="string"==typeof t?t:t.text;return(0,n.jsxs)("div",{className:"space-y-2 rounded-xl border border-purple-tip-border bg-purple-primary1/10 p-4 text-sm "+r,children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-purple-primary1",children:[(0,n.jsx)(i,{}),(0,n.jsx)("h3",{className:"font-semibold text-white",children:"Pro Tip"})]}),(0,n.jsx)("p",{className:"!text-[13px] text-gray-25",children:a}),"string"!=typeof t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"pt-1.5 pb-1",children:(0,n.jsx)("hr",{className:"border-gray-85"})}),(0,n.jsxs)("a",{href:t.link,target:"_blank",className:"flex justify-between items-center gap-1",rel:"noreferrer",children:[(0,n.jsx)("span",{className:"font-pg-medium text-gray-25",children:t.linkText}),(0,n.jsx)(o.Z,{})]})]})]})}},85821:function(e,t,r){"use strict";r.d(t,{A:function(){return o},b:function(){return a}});var n=r(64529),i=r(782);let o=(0,n.Ue)()(e=>({rightSidebarOpen:!0,toggle:()=>e(e=>({...e,rightSidebarOpen:!e.rightSidebarOpen})),setRightSidebarOpen:t=>e(e=>({...e,rightSidebarOpen:t})),shrinkPromptBox:!1,setShrinkPromptBox:t=>e(e=>({...e,shrinkPromptBox:t}))})),a=(0,n.Ue)()((0,i.tJ)(e=>({columns:0,setColumns:t=>e(e=>({...e,columns:t})),advancedSettingsOpen:!0,setAdvancedSettingsOpen:t=>e(e=>({...e,advancedSettingsOpen:t}))}),{name:"pai:view-settings"}))},50886:function(e,t,r){"use strict";r.d(t,{qE:function(){return x},Q5:function(){return w},F$:function(){return b}});var n=r(85893),i=r(67294),o=globalThis?.document?i.useLayoutEffect:()=>{};r(73935);var a=r(4222),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=i.forwardRef((e,r)=>{let{asChild:i,...o}=e,s=i?a.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,n.jsx)(s,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),l="Avatar",[u,c]=function(e,t=[]){let r=[],o=()=>{let t=r.map(e=>i.createContext(e));return function(r){let n=r?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return o.scopeName=e,[function(t,o){let a=i.createContext(o),s=r.length;function l(t){let{scope:r,children:o,...l}=t,u=r?.[e][s]||a,c=i.useMemo(()=>l,Object.values(l));return(0,n.jsx)(u.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,n){let l=n?.[e][s]||a,u=i.useContext(l);if(u)return u;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(o,...t)]}(l),[d,f]=u(l),p=i.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[a,l]=i.useState("idle");return(0,n.jsx)(d,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:l,children:(0,n.jsx)(s.span,{...o,ref:t})})});p.displayName=l;var h="AvatarImage",m=i.forwardRef((e,t)=>{let{__scopeAvatar:r,src:a,onLoadingStatusChange:l=()=>{},...u}=e,c=f(h,r),d=function(e){let[t,r]=i.useState("idle");return o(()=>{if(!e){r("error");return}let t=!0,n=new window.Image,i=e=>()=>{t&&r(e)};return r("loading"),n.onload=i("loaded"),n.onerror=i("error"),n.src=e,()=>{t=!1}},[e]),t}(a),p=function(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}(e=>{l(e),c.onImageLoadingStatusChange(e)});return o(()=>{"idle"!==d&&p(d)},[d,p]),"loaded"===d?(0,n.jsx)(s.img,{...u,ref:t,src:a}):null});m.displayName=h;var g="AvatarFallback",v=i.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...a}=e,l=f(g,r),[u,c]=i.useState(void 0===o);return i.useEffect(()=>{if(void 0!==o){let e=window.setTimeout(()=>c(!0),o);return()=>window.clearTimeout(e)}},[o]),u&&"loaded"!==l.imageLoadingStatus?(0,n.jsx)(s.span,{...a,ref:t}):null});v.displayName=g;var y=r(1233);let x=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(p,{ref:t,className:(0,y.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r),...i})});x.displayName=p.displayName;let b=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(m,{ref:t,className:(0,y.cn)("aspect-square h-full w-full",r),...i})});b.displayName=m.displayName;let w=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(v,{ref:t,className:(0,y.cn)("flex h-full w-full items-center justify-center rounded-full bg-bg-secondary text-fg-tertiary",r),...i})});w.displayName=v.displayName},48105:function(e,t,r){"use strict";r.d(t,{z:function(){return u}});var n=r(85893),i=r(67294),o=r(4222),a=r(45139),s=r(1233);let l=(0,a.j)("inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:brightness-150 active:focus:scale-[98%] transition-all duration-75",{variants:{variant:{ghost:"hover:bg-bg-secondary hover:text-fg-primary text-fg-secondary bg-transparent focus-visible:outline-none focus-visible:ring-2 ring-offset-2 ring-ring",secondary:"bg-bg-secondary text-fg-primary hover:bg-bg-tertiary","action-primary":"bg-action-primary text-fg-inverse-primary hover:bg-action-primary/80 disabled:bg-bg-tertiary disabled:text-fg-quaternary","action-secondary":"bg-bg-inverse-primary hover:bg-bg-inverse-primary/80 text-fg-inverse-primary hover:text-fg-inverse-primary",inverse:"text-bg-secondary hover:text-bg-secondary hover:bg-bg-inverse-secondary",link:"text-pg-200 underline-offset-4 hover:underline text-base"},size:{default:"h-10 px-4 py-2 rounded-design-md",sm:"h-8 rounded-design-base px-3 text-xs rounded-design-sm",lg:"h-12 rounded-design-lg font-semibold px-4",xl:"h-14 rounded-design-lg font-semibold px-5",icon:"h-10 w-10 rounded-design-lg"}},defaultVariants:{variant:"ghost",size:"default"}}),u=i.forwardRef((e,t)=>{let{className:r,variant:i,size:a,asChild:u=!1,...c}=e,d=u?o.g7:"button";return(0,n.jsx)(d,{className:(0,s.cn)(l({variant:i,size:a,className:r})),ref:t,...c})});u.displayName="Button"},65105:function(e,t,r){"use strict";r.d(t,{Zb:function(){return a}});var n=r(85893),i=r(67294),o=r(1233);let a=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("rounded-design-lg p-5 bg-border bg-pg-ds-000 text-fg-primary","active:scale-[99%] transition-all duration-75",r),...i})});a.displayName="Card",i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("flex flex-col space-y-1.5 p-6",r),...i})}).displayName="CardHeader",i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)("h3",{ref:t,className:(0,o.cn)("font-semibold leading-none tracking-tight",r),...i})}).displayName="CardTitle",i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)("p",{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",r),...i})}).displayName="CardDescription",i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("p-6 pt-0",r),...i})}).displayName="CardContent",i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("flex items-center p-6 pt-0",r),...i})}).displayName="CardFooter"},66751:function(e,t,r){"use strict";r.d(t,{$N:function(){return m},Be:function(){return g},GG:function(){return d},Vq:function(){return l},cZ:function(){return p},fK:function(){return h},hg:function(){return u}});var n=r(85893),i=r(67294),o=r(51865),a=r(62469),s=r(1233);let l=o.fC,u=o.xz,c=o.h_,d=o.x8,f=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(o.aV,{ref:t,className:(0,s.cn)("fixed inset-0 z-50 bg-black/50 backdrop-blur-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),...i})});f.displayName=o.aV.displayName;let p=i.forwardRef((e,t)=>{let{className:r,children:i,CloseButtonProps:l,...u}=e;return(0,n.jsxs)(c,{children:[(0,n.jsx)(f,{}),(0,n.jsxs)(o.VY,{ref:t,className:(0,s.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-3xl translate-x-[-50%] translate-y-[-50%] gap-4 border border-border 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%]","rounded-design-lg overflow-hidden","bg-bg-primary border-none",r),...u,children:[i,!u.hideCloseButton&&(0,n.jsxs)(o.x8,{className:(0,s.cn)("flex absolute left-4 top-4 rounded-full h-10 w-10 items-center justify-center focus:outline-none focus:ring-none focus:ring-offset-2 disabled:pointer-events-none","simple"===u.closeVariant?"bg-none":"bg-bg-inverse-primary/70 ring-offset-background hover:opacity-100",l?.className),children:[(0,n.jsx)(a.Pxu,{className:`h-5 w-5 ${"simple"===u.closeVariant?"text-fg-primary":"text-white"}`}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});p.displayName=o.VY.displayName;let h=e=>{let{className:t,...r}=e;return(0,n.jsx)("div",{className:(0,s.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...r})};h.displayName="DialogHeader";let m=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(o.Dx,{ref:t,className:(0,s.cn)("text-lg font-semibold leading-none tracking-tight",r),...i})});m.displayName=o.Dx.displayName;let g=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(o.dk,{ref:t,className:(0,s.cn)("text-sm text-fg-secondary",r),...i})});g.displayName=o.dk.displayName},75508:function(e,t,r){"use strict";let n;r.d(t,{dy:function(){return U},cC:function(){return Y},sc:function(){return Z},u6:function(){return G},OX:function(){return W},iI:function(){return q}});var i=r(85893),o=r(1233),a=r(67294),s=r(51865);let l=a.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),u=()=>{let e=a.useContext(l);if(!e)throw Error("useDrawerContext must be used within a Drawer.Root");return e};!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");let c="undefined"!=typeof window?a.useLayoutEffect:a.useEffect;function d(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}function f(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function p(){return h(/^iPhone/)||h(/^iPad/)||h(/^Mac/)&&navigator.maxTouchPoints>1}function h(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}let m="undefined"!=typeof document&&window.visualViewport;function g(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function v(e){for(g(e)&&(e=e.parentElement);e&&!g(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}let y=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),x=0;function b(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function w(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=v(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let r=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=n-r)}e=t.parentElement}}function _(e){return e instanceof HTMLInputElement&&!y.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function j(...e){return a.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}let C=new WeakMap;function k(e,t,r=!1){if(!e||!(e instanceof HTMLElement))return;let n={};Object.entries(t).forEach(([t,r])=>{if(t.startsWith("--")){e.style.setProperty(t,r);return}n[t]=e.style[t],e.style[t]=r}),r||C.set(e,n)}let E=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function S(e,t){if(!e)return null;let r=window.getComputedStyle(e),n=r.transform||r.webkitTransform||r.mozTransform,i=n.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[E(t)?13:12]):(i=n.match(/^matrix\((.+)\)$/))?parseFloat(i[1].split(", ")[E(t)?5:4]):null}function N(e,t){if(!e)return()=>{};let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}let P={DURATION:.5,EASE:[.32,.72,0,1]},L="vaul-dragging";function T(e){let t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...e)=>null==t.current?void 0:t.current.call(t,...e),[])}function O({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,i]=function({defaultProp:e,onChange:t}){let r=a.useState(e),[n]=r,i=a.useRef(n),o=T(t);return a.useEffect(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}({defaultProp:t,onChange:r}),o=void 0!==e,s=o?e:n,l=T(r);return[s,a.useCallback(t=>{if(o){let r="function"==typeof t?t(e):t;r!==e&&l(r)}else i(t)},[o,e,i,l])]}let R=()=>()=>{},A=null;function I({open:e,onOpenChange:t,children:r,onDrag:i,onRelease:o,snapPoints:u,shouldScaleBackground:h=!1,setBackgroundColorOnScale:g=!0,closeThreshold:y=.25,scrollLockTimeout:j=100,dismissible:N=!0,handleOnly:T=!1,fadeFromIndex:R=u&&u.length-1,activeSnapPoint:I,setActiveSnapPoint:M,fixed:D,modal:F=!0,onClose:z,nested:B,noBodyStyles:U,direction:V="bottom",defaultOpen:$=!1,disablePreventScroll:H=!0,snapToSequentialPoint:Z=!1,preventScrollRestoration:W=!1,repositionInputs:q=!0,onAnimationEnd:G,container:Y,autoFocus:K=!1}){var X,J;let[Q=!1,ee]=O({defaultProp:$,prop:e,onChange:e=>{null==t||t(e),e||B||eL(),setTimeout(()=>{null==G||G(e)},1e3*P.DURATION),e&&!F&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[et,er]=a.useState(!1),[en,ei]=a.useState(!1),[eo,ea]=a.useState(!1),es=a.useRef(null),el=a.useRef(null),eu=a.useRef(null),ec=a.useRef(null),ed=a.useRef(null),ef=a.useRef(!1),ep=a.useRef(null),eh=a.useRef(0),em=a.useRef(!1),eg=a.useRef(0),ev=a.useRef(null),ey=a.useRef((null==(X=ev.current)?void 0:X.getBoundingClientRect().height)||0),ex=a.useRef((null==(J=ev.current)?void 0:J.getBoundingClientRect().width)||0),eb=a.useRef(0),ew=a.useCallback(e=>{u&&e===eE.length-1&&(el.current=new Date)},[]),{activeSnapPoint:e_,activeSnapPointIndex:ej,setActiveSnapPoint:eC,onRelease:ek,snapPointsOffset:eE,onDrag:eS,shouldFade:eN,getPercentageDragged:eP}=function({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:r,drawerRef:n,overlayRef:i,fadeFromIndex:o,onSnapPointChange:s,direction:l="bottom",container:u,snapToSequentialPoint:c}){let[d,f]=O({prop:e,defaultProp:null==r?void 0:r[0],onChange:t}),[p,h]=a.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);a.useEffect(()=>{function e(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let m=a.useMemo(()=>d===(null==r?void 0:r[r.length-1])||null,[r,d]),g=a.useMemo(()=>null==r?void 0:r.findIndex(e=>e===d),[r,d]),v=r&&r.length>0&&(o||0===o)&&!Number.isNaN(o)&&r[o]===d||!r,y=a.useMemo(()=>{var e;let t=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return null!=(e=null==r?void 0:r.map(e=>{let r="string"==typeof e,n=0;if(r&&(n=parseInt(e,10)),E(l)){let i=r?n:p?e*t.height:0;return p?"bottom"===l?t.height-i:-t.height+i:i}let i=r?n:p?e*t.width:0;return p?"right"===l?t.width-i:-t.width+i:i}))?e:[]},[r,p,u]),x=a.useMemo(()=>null!==g?null==y?void 0:y[g]:null,[y,g]),b=a.useCallback(e=>{var t;let a=null!=(t=null==y?void 0:y.findIndex(t=>t===e))?t:null;s(a),k(n.current,{transition:`transform ${P.DURATION}s cubic-bezier(${P.EASE.join(",")})`,transform:E(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),y&&a!==y.length-1&&a!==o&&a<o?k(i.current,{transition:`opacity ${P.DURATION}s cubic-bezier(${P.EASE.join(",")})`,opacity:"0"}):k(i.current,{transition:`opacity ${P.DURATION}s cubic-bezier(${P.EASE.join(",")})`,opacity:"1"}),f(null==r?void 0:r[Math.max(a,0)])},[n.current,r,y,o,i,f]);return a.useEffect(()=>{if(d||e){var t;let n=null!=(t=null==r?void 0:r.findIndex(t=>t===e||t===d))?t:-1;y&&-1!==n&&"number"==typeof y[n]&&b(y[n])}},[d,e,r,y,b]),{isLastSnapPoint:m,activeSnapPoint:d,shouldFade:v,getPercentageDragged:function(e,t){if(!r||"number"!=typeof g||!y||void 0===o)return null;let n=g===o-1;if(g>=o&&t)return 0;if(n&&!t)return 1;if(!v&&!n)return null;let i=n?g+1:g-1,a=e/Math.abs(n?y[i]-y[i-1]:y[i+1]-y[i]);return n?1-a:a},setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:n,dismissible:a}){if(void 0===o)return;let s="bottom"===l||"right"===l?(null!=x?x:0)-e:(null!=x?x:0)+e,u=g===o-1,d=0===g,f=e>0;if(u&&k(i.current,{transition:`opacity ${P.DURATION}s cubic-bezier(${P.EASE.join(",")})`}),!c&&n>2&&!f){a?t():b(y[0]);return}if(!c&&n>2&&f&&y&&r){b(y[r.length-1]);return}let p=null==y?void 0:y.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e),h=E(l)?window.innerHeight:window.innerWidth;if(n>.4&&Math.abs(e)<.4*h){let e=f?1:-1;if(e>0&&m){b(y[r.length-1]);return}if(d&&e<0&&a&&t(),null===g)return;b(y[g+e]);return}b(p)},onDrag:function({draggedDistance:e}){if(null===x)return;let t="bottom"===l||"right"===l?x-e:x+e;("bottom"===l||"right"===l)&&t<y[y.length-1]||("top"===l||"left"===l)&&t>y[y.length-1]||k(n.current,{transform:E(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:y}}({snapPoints:u,activeSnapPointProp:I,setActiveSnapPointProp:M,drawerRef:ev,fadeFromIndex:R,overlayRef:es,onSnapPointChange:ew,direction:V,container:Y,snapToSequentialPoint:Z});!function(e={}){let{isDisabled:t}=e;c(()=>{if(!t){var e,r,i;let t,o,a,s,l,u,c;return 1==++x&&p()&&(a=0,s=window.pageXOffset,l=window.pageYOffset,u=d((e=document.documentElement,r="paddingRight",i=`${window.innerWidth-document.documentElement.clientWidth}px`,o=e.style[r],e.style[r]=i,()=>{e.style[r]=o})),window.scrollTo(0,0),c=d(b(document,"touchstart",e=>{((t=v(e.target))!==document.documentElement||t!==document.body)&&(a=e.changedTouches[0].pageY)},{passive:!1,capture:!0}),b(document,"touchmove",e=>{if(!t||t===document.documentElement||t===document.body){e.preventDefault();return}let r=e.changedTouches[0].pageY,n=t.scrollTop,i=t.scrollHeight-t.clientHeight;0!==i&&((n<=0&&r>a||n>=i&&r<a)&&e.preventDefault(),a=r)},{passive:!1,capture:!0}),b(document,"touchend",e=>{let t=e.target;_(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},{passive:!1,capture:!0}),b(document,"focus",e=>{let t=e.target;_(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",m&&(m.height<window.innerHeight?requestAnimationFrame(()=>{w(t)}):m.addEventListener("resize",()=>w(t),{once:!0}))}))},!0),b(window,"scroll",()=>{window.scrollTo(0,0)})),n=()=>{u(),c(),window.scrollTo(s,l)}),()=>{0==--x&&(null==n||n())}}},[t])}({isDisabled:!Q||en||!F||eo||!et||!q||!H});let{restorePositionSetting:eL}=function({isOpen:e,modal:t,nested:r,hasBeenOpened:n,preventScrollRestoration:i,noBodyStyles:o}){let[s,l]=a.useState(()=>"undefined"!=typeof window?window.location.href:""),u=a.useRef(0),c=a.useCallback(()=>{if(f()&&null===A&&e&&!o){A={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-u.current}px`,left:`${-e}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=`${-(u.current+e)}px`)}),300)}},[e]),d=a.useCallback(()=>{if(f()&&null!==A&&!o){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,A),window.requestAnimationFrame(()=>{if(i&&s!==window.location.href){l(window.location.href);return}window.scrollTo(t,e)}),A=null}},[s]);return a.useEffect(()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),a.useEffect(()=>{r||!n||(e?(window.matchMedia("(display-mode: standalone)").matches||c(),t||window.setTimeout(()=>{d()},500)):d())},[e,n,s,t,r,c,d]),{restorePositionSetting:d}}({isOpen:Q,modal:F,nested:B,hasBeenOpened:et,preventScrollRestoration:W,noBodyStyles:U});function eT(){return(window.innerWidth-26)/window.innerWidth}function eO(e,t){var r,n;let i=e,o=null==(r=window.getSelection())?void 0:r.toString(),a=ev.current?S(ev.current,V):null,s=new Date;if(i.hasAttribute("data-vaul-no-drag")||i.closest("[data-vaul-no-drag]"))return!1;if("right"===V||"left"===V)return!0;if(el.current&&s.getTime()-el.current.getTime()<500)return!1;if(null!==a&&("bottom"===V?a>0:a<0))return!0;if(o&&o.length>0)return!1;if(s.getTime()-(null==(n=ed.current)?void 0:n.getTime())<j&&0===a||t)return ed.current=s,!1;for(;i;){if(i.scrollHeight>i.clientHeight){if(0!==i.scrollTop)return ed.current=new Date,!1;if("dialog"===i.getAttribute("role"))break}i=i.parentNode}return!0}function eR(e){en&&ev.current&&(ev.current.classList.remove(L),ef.current=!1,ei(!1),ec.current=new Date),null==z||z(),e||ee(!1),setTimeout(()=>{u&&eC(u[0])},1e3*P.DURATION)}function eA(){if(!ev.current)return;let e=document.querySelector("[data-vaul-drawer-wrapper]"),t=S(ev.current,V);k(ev.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${P.DURATION}s cubic-bezier(${P.EASE.join(",")})`}),k(es.current,{transition:`opacity ${P.DURATION}s cubic-bezier(${P.EASE.join(",")})`,opacity:"1"}),h&&t&&t>0&&Q&&k(e,{borderRadius:"8px",overflow:"hidden",...E(V)?{transform:`scale(${eT()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${eT()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${P.DURATION}s`,transitionTimingFunction:`cubic-bezier(${P.EASE.join(",")})`},!0)}return a.useEffect(()=>{var e;function t(){if(ev.current&&q&&(_(document.activeElement)||em.current)){var e;let t=(null==(e=window.visualViewport)?void 0:e.height)||0,r=window.innerHeight,n=r-t,i=ev.current.getBoundingClientRect().height||0;eb.current||(eb.current=i);let o=ev.current.getBoundingClientRect().top;if(Math.abs(eg.current-n)>60&&(em.current=!em.current),u&&u.length>0&&eE&&ej&&(n+=eE[ej]||0),eg.current=n,i>t||em.current){let e=ev.current.getBoundingClientRect().height,a=e;e>t&&(a=t-(i>.8*r?o:26)),D?ev.current.style.height=`${e-Math.max(n,0)}px`:ev.current.style.height=`${Math.max(a,t-o)}px`}else ev.current.style.height=`${eb.current}px`;u&&u.length>0&&!em.current?ev.current.style.bottom="0px":ev.current.style.bottom=`${Math.max(n,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[ej,u,eE]),a.useEffect(()=>(Q&&(k(document.documentElement,{scrollBehavior:"auto"}),el.current=new Date),()=>{!function(e,t){if(!e||!(e instanceof HTMLElement))return;let r=C.get(e);r&&(e.style[t]=r[t])}(document.documentElement,"scrollBehavior")}),[Q]),a.createElement(s.fC,{defaultOpen:$,onOpenChange:e=>{(N||e)&&(e?er(!0):eR(!0),ee(e))},open:Q},a.createElement(l.Provider,{value:{activeSnapPoint:e_,snapPoints:u,setActiveSnapPoint:eC,drawerRef:ev,overlayRef:es,onOpenChange:t,onPress:function(e){var t,r;(N||u)&&(!ev.current||ev.current.contains(e.target))&&(ey.current=(null==(t=ev.current)?void 0:t.getBoundingClientRect().height)||0,ex.current=(null==(r=ev.current)?void 0:r.getBoundingClientRect().width)||0,ei(!0),eu.current=new Date,p()&&window.addEventListener("touchend",()=>ef.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),eh.current=E(V)?e.pageY:e.pageX)},onRelease:function(e){var t,r;if(!en||!ev.current)return;ev.current.classList.remove(L),ef.current=!1,ei(!1),ec.current=new Date;let n=S(ev.current,V);if(!eO(e.target,!1)||!n||Number.isNaN(n)||null===eu.current)return;let i=ec.current.getTime()-eu.current.getTime(),a=eh.current-(E(V)?e.pageY:e.pageX),s=Math.abs(a)/i;if(s>.05&&(ea(!0),setTimeout(()=>{ea(!1)},200)),u){ek({draggedDistance:a*("bottom"===V||"right"===V?1:-1),closeDrawer:eR,velocity:s,dismissible:N}),null==o||o(e,!0);return}if("bottom"===V||"right"===V?a>0:a<0){eA(),null==o||o(e,!0);return}if(s>.4){eR(),null==o||o(e,!1);return}let l=Math.min(null!=(t=ev.current.getBoundingClientRect().height)?t:0,window.innerHeight),c=Math.min(null!=(r=ev.current.getBoundingClientRect().width)?r:0,window.innerWidth);if(Math.abs(n)>=("left"===V||"right"===V?c:l)*y){eR(),null==o||o(e,!1);return}null==o||o(e,!0),eA()},onDrag:function(e){if(ev.current&&en){let t="bottom"===V||"right"===V?1:-1,r=(eh.current-(E(V)?e.pageY:e.pageX))*t,n=r>0,o=u&&!N&&!n;if(o&&0===ej)return;let a=Math.abs(r),s=document.querySelector("[data-vaul-drawer-wrapper]"),l=a/("bottom"===V||"top"===V?ey.current:ex.current),c=eP(a,n);if(null!==c&&(l=c),o&&l>=1||!ef.current&&!eO(e.target,n))return;if(ev.current.classList.add(L),ef.current=!0,k(ev.current,{transition:"none"}),k(es.current,{transition:"none"}),u&&eS({draggedDistance:r}),n&&!u){let e=Math.min(-(8*(Math.log(r+1)-2)*1),0)*t;k(ev.current,{transform:E(V)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`});return}let d=1-l;if((eN||R&&ej===R-1)&&(null==i||i(e,l),k(es.current,{opacity:`${d}`,transition:"none"},!0)),s&&es.current&&h){let e=Math.min(eT()+l*(1-eT()),1),t=8-8*l,r=Math.max(0,14-14*l);k(s,{borderRadius:`${t}px`,transform:E(V)?`scale(${e}) translate3d(0, ${r}px, 0)`:`scale(${e}) translate3d(${r}px, 0, 0)`,transition:"none"},!0)}if(!u){let e=a*t;k(ev.current,{transform:E(V)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:N,handleOnly:T,isOpen:Q,isDragging:en,shouldFade:eN,closeDrawer:eR,onNestedDrag:function(e,t){if(t<0)return;let r=(window.innerWidth-16)/window.innerWidth,n=r+t*(1-r),i=-16+16*t;k(ev.current,{transform:E(V)?`scale(${n}) translate3d(0, ${i}px, 0)`:`scale(${n}) translate3d(${i}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){let t=e?(window.innerWidth-16)/window.innerWidth:1;ep.current&&window.clearTimeout(ep.current),k(ev.current,{transition:`transform ${P.DURATION}s cubic-bezier(${P.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${e?-16:0}px, 0)`}),!e&&ev.current&&(ep.current=setTimeout(()=>{let e=S(ev.current,V);k(ev.current,{transition:"none",transform:E(V)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){let r=E(V)?window.innerHeight:window.innerWidth,n=t?(r-16)/r:1,i=t?-16:0;t&&k(ev.current,{transition:`transform ${P.DURATION}s cubic-bezier(${P.EASE.join(",")})`,transform:E(V)?`scale(${n}) translate3d(0, ${i}px, 0)`:`scale(${n}) translate3d(${i}px, 0, 0)`})},keyboardIsOpen:em,modal:F,snapPointsOffset:eE,direction:V,shouldScaleBackground:h,setBackgroundColorOnScale:g,noBodyStyles:U,container:Y,autoFocus:K}},r))}let M=a.forwardRef(function({...e},t){let{overlayRef:r,snapPoints:n,onRelease:i,shouldFade:o,isOpen:l,modal:c}=u(),d=j(t,r),f=n&&n.length>0;return c?a.createElement(s.aV,{onMouseUp:i,ref:d,"data-vaul-overlay":"","data-vaul-snap-points":l&&f?"true":"false","data-vaul-snap-points-overlay":l&&o?"true":"false",...e}):("undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),null)});M.displayName="Drawer.Overlay";let D=a.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:r,...n},i){let{drawerRef:o,onPress:l,onRelease:c,onDrag:d,keyboardIsOpen:f,snapPointsOffset:p,modal:h,isOpen:m,direction:g,snapPoints:v,container:y,handleOnly:x,autoFocus:b}=u(),[w,_]=a.useState(!1),C=j(i,o),k=a.useRef(null),S=a.useRef(null),L=a.useRef(!1),T=v&&v.length>0;!function(){let{direction:e,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:n,noBodyStyles:i}=u(),o=a.useRef(null),s=(0,a.useMemo)(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-26)/window.innerWidth}a.useEffect(()=>{if(t&&r){o.current&&clearTimeout(o.current);let t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;!function(...e){}(n&&!i?N(document.body,{background:"black"}):R,N(t,{transformOrigin:E(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${P.DURATION}s`,transitionTimingFunction:`cubic-bezier(${P.EASE.join(",")})`}));let r=N(t,{borderRadius:"8px",overflow:"hidden",...E(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{r(),o.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},1e3*P.DURATION)}}},[t,r,s])}();let O=(e,t,r=0)=>{if(L.current)return!0;let n=Math.abs(e.y),i=Math.abs(e.x),o=i>n,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&i>=0&&i<=r)return o}else if(!(e.y*a<0)&&n>=0&&n<=r)return!o;return L.current=!0,!0};function A(e){k.current=null,L.current=!1,c(e)}return a.useEffect(()=>{T&&window.requestAnimationFrame(()=>{_(!0)})},[]),a.createElement(s.VY,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":w?"true":"false","data-vaul-snap-points":m&&T?"true":"false","data-vaul-custom-container":y?"true":"false",...n,ref:C,style:p&&p.length>0?{"--snap-point-height":`${p[0]}px`,...t}:t,onPointerDown:e=>{x||(null==n.onPointerDown||n.onPointerDown.call(n,e),k.current={x:e.pageX,y:e.pageY},l(e))},onOpenAutoFocus:e=>{null==r||r(e),b||e.preventDefault()},onPointerDownOutside:t=>{if(null==e||e(t),!h||t.defaultPrevented){t.preventDefault();return}f.current&&(f.current=!1)},onFocusOutside:e=>{if(!h){e.preventDefault();return}},onPointerMove:e=>{if(S.current=e,x||(null==n.onPointerMove||n.onPointerMove.call(n,e),!k.current))return;let t=e.pageY-k.current.y,r=e.pageX-k.current.x,i="touch"===e.pointerType?10:2;O({x:r,y:t},g,i)?d(e):(Math.abs(r)>i||Math.abs(t)>i)&&(k.current=null)},onPointerUp:e=>{null==n.onPointerUp||n.onPointerUp.call(n,e),k.current=null,L.current=!1,c(e)},onPointerOut:e=>{null==n.onPointerOut||n.onPointerOut.call(n,e),A(S.current)},onContextMenu:e=>{null==n.onContextMenu||n.onContextMenu.call(n,e),A(S.current)}})});D.displayName="Drawer.Content";let F=a.forwardRef(function({preventCycle:e=!1,children:t,...r},n){let{closeDrawer:i,isDragging:o,snapPoints:s,activeSnapPoint:l,setActiveSnapPoint:c,dismissible:d,handleOnly:f,isOpen:p,onPress:h,onDrag:m}=u(),g=a.useRef(null),v=a.useRef(!1);function y(){window.clearTimeout(g.current),v.current=!1}return a.createElement("div",{onClick:function(){if(v.current){y();return}window.setTimeout(()=>{!function(){if(o||e||v.current){y();return}if(y(),(!s||0===s.length)&&d||l===s[s.length-1]&&d){i();return}let t=s.findIndex(e=>e===l);-1!==t&&c(s[t+1])}()},120)},onPointerCancel:y,onPointerDown:e=>{f&&h(e),g.current=window.setTimeout(()=>{v.current=!0},250)},onPointerMove:e=>{f&&m(e)},ref:n,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},a.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});F.displayName="Drawer.Handle";let z={Root:I,NestedRoot:function({onDrag:e,onOpenChange:t,...r}){let{onNestedDrag:n,onNestedOpenChange:i,onNestedRelease:o}=u();if(!n)throw Error("Drawer.NestedRoot must be placed in another drawer");return a.createElement(I,{nested:!0,onClose:()=>{i(!1)},onDrag:(t,r)=>{n(t,r),null==e||e(t,r)},onOpenChange:e=>{e&&i(e)},onRelease:o,...r})},Content:D,Overlay:M,Trigger:s.xz,Portal:function(e){let t=u(),{container:r=t.container,...n}=e;return a.createElement(s.h_,{container:r,...n})},Handle:F,Close:s.x8,Title:s.Dx,Description:s.dk};var B=r(48105);let U=e=>{let{shouldScaleBackground:t=!0,...r}=e;return(0,i.jsx)(z.Root,{shouldScaleBackground:t,...r})};U.displayName="Drawer",z.Trigger;let V=z.Portal,$=z.Close,H=a.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,i.jsx)(z.Overlay,{ref:t,className:(0,o.cn)("fixed inset-0 z-50 bg-black/80",r),...n})});H.displayName=z.Overlay.displayName;let Z=a.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,i.jsxs)(V,{children:[(0,i.jsx)(H,{}),(0,i.jsxs)(z.Content,{ref:t,className:(0,o.cn)("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-bg-primary",r),...a,children:[(0,i.jsx)("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),n]})]})});Z.displayName="DrawerContent";let W=e=>{let{className:t,...r}=e;return(0,i.jsx)("div",{className:(0,o.cn)("grid gap-1.5 p-4 flex items-center justify-between text-center sm:text-left",t),...r})};W.displayName="DrawerHeader";let q=a.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,i.jsx)(z.Title,{ref:t,className:(0,o.cn)("text-lg font-semibold leading-none tracking-tight",r),...n})});q.displayName=z.Title.displayName;let G=a.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,i.jsx)(z.Description,{ref:t,className:(0,o.cn)("text-sm text-fg-secondary",r),...n})});G.displayName=z.Description.displayName;let Y=a.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,i.jsx)($,{asChild:!0,children:(0,i.jsx)(B.z,{ref:t,className:(0,o.cn)(r),...n,variant:"ghost"})})});Y.displayName=z.Description.displayName},28447:function(e,t,r){"use strict";r.d(t,{K7:function(){return o},Yz:function(){return i},ds:function(){return a}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"95",height:"18",viewBox:"0 0 95 18",fill:"none",...e,children:(0,n.jsx)("path",{d:"M0.137784 14V0.909091H5.30256C6.29545 0.909091 7.14134 1.09872 7.8402 1.47798C8.53906 1.85298 9.07173 2.375 9.43821 3.04403C9.80895 3.70881 9.99432 4.47585 9.99432 5.34517C9.99432 6.21449 9.80682 6.98153 9.43182 7.64631C9.05682 8.31108 8.51349 8.82883 7.80185 9.19957C7.09446 9.57031 6.23793 9.75568 5.23224 9.75568H1.94034V7.53764H4.7848C5.31747 7.53764 5.75639 7.44602 6.10156 7.26278C6.45099 7.07528 6.71094 6.81747 6.88139 6.48935C7.05611 6.15696 7.14347 5.77557 7.14347 5.34517C7.14347 4.91051 7.05611 4.53125 6.88139 4.20739C6.71094 3.87926 6.45099 3.62571 6.10156 3.44673C5.75213 3.26349 5.30895 3.17188 4.77202 3.17188H2.90554V14H0.137784ZM14.104 0.909091V14H11.3809V0.909091H14.104ZM18.725 14.1854C18.0985 14.1854 17.5403 14.0767 17.0502 13.8594C16.5602 13.6378 16.1724 13.3118 15.8869 12.8814C15.6056 12.4467 15.465 11.9055 15.465 11.2578C15.465 10.7124 15.5652 10.2543 15.7654 9.88352C15.9657 9.51278 16.2385 9.21449 16.5836 8.98864C16.9288 8.76278 17.3208 8.59233 17.7598 8.47727C18.2029 8.36222 18.6674 8.28125 19.1532 8.23438C19.7242 8.17472 20.1845 8.11932 20.5339 8.06818C20.8833 8.01278 21.1369 7.93182 21.2946 7.82528C21.4522 7.71875 21.5311 7.56108 21.5311 7.35227V7.31392C21.5311 6.90909 21.4032 6.59588 21.1475 6.37429C20.8961 6.1527 20.5382 6.0419 20.0737 6.0419C19.5836 6.0419 19.1937 6.15057 18.9039 6.3679C18.6142 6.58097 18.4224 6.84943 18.3287 7.1733L15.8102 6.96875C15.938 6.37216 16.1894 5.85653 16.5644 5.42188C16.9394 4.98295 17.4231 4.64631 18.0154 4.41193C18.612 4.1733 19.3024 4.05398 20.0865 4.05398C20.6319 4.05398 21.1539 4.1179 21.6525 4.24574C22.1554 4.37358 22.6007 4.57173 22.9885 4.8402C23.3805 5.10866 23.6894 5.45384 23.9153 5.87571C24.1412 6.29332 24.2541 6.79403 24.2541 7.37784V14H21.6717V12.6385H21.595C21.4373 12.9453 21.2264 13.2159 20.9622 13.4503C20.698 13.6804 20.3805 13.8615 20.0098 13.9936C19.639 14.1214 19.2108 14.1854 18.725 14.1854ZM19.5048 12.3061C19.9054 12.3061 20.259 12.2273 20.5659 12.0696C20.8727 11.9077 21.1135 11.6903 21.2882 11.4176C21.4629 11.1449 21.5502 10.8359 21.5502 10.4908V9.44886C21.465 9.50426 21.3478 9.5554 21.1987 9.60227C21.0538 9.64489 20.8897 9.68537 20.7065 9.72372C20.5233 9.75781 20.34 9.78977 20.1568 9.8196C19.9735 9.84517 19.8073 9.86861 19.6582 9.88991C19.3386 9.93679 19.0595 10.0114 18.8208 10.1136C18.5822 10.2159 18.3968 10.3544 18.2647 10.5291C18.1326 10.6996 18.0666 10.9126 18.0666 11.1683C18.0666 11.5391 18.2008 11.8224 18.4693 12.0185C18.742 12.2102 19.0872 12.3061 19.5048 12.3061ZM27.3362 17.6818C26.991 17.6818 26.6672 17.6541 26.3646 17.5987C26.0663 17.5476 25.8191 17.4815 25.6231 17.4006L26.2368 15.3679C26.5564 15.4659 26.844 15.5192 27.0997 15.5277C27.3596 15.5362 27.5834 15.4766 27.7709 15.3487C27.9626 15.2209 28.1182 15.0036 28.2375 14.6967L28.3973 14.2812L24.8753 4.18182H27.7389L29.7716 11.392H29.8738L31.9257 4.18182H34.8085L30.9924 15.0611C30.8092 15.5895 30.5599 16.0497 30.2446 16.4418C29.9335 16.8381 29.5393 17.1428 29.062 17.3558C28.5848 17.5732 28.0095 17.6818 27.3362 17.6818ZM39.9489 17.8864C39.0667 17.8864 38.3104 17.7649 37.6797 17.522C37.0533 17.2834 36.5547 16.9574 36.1839 16.544C35.8132 16.1307 35.5724 15.6662 35.4616 15.1506L37.9801 14.8118C38.0568 15.0078 38.1783 15.1911 38.3444 15.3615C38.5106 15.532 38.7301 15.6683 39.0028 15.7706C39.2798 15.8771 39.6165 15.9304 40.0128 15.9304C40.6051 15.9304 41.093 15.7855 41.4765 15.4957C41.8643 15.2102 42.0582 14.7308 42.0582 14.0575V12.2614H41.9432C41.8239 12.5341 41.6449 12.7919 41.4062 13.0348C41.1676 13.2777 40.8608 13.4759 40.4858 13.6293C40.1108 13.7827 39.6633 13.8594 39.1435 13.8594C38.4062 13.8594 37.7351 13.6889 37.13 13.348C36.5291 13.0028 36.0497 12.4766 35.6917 11.7692C35.3381 11.0575 35.1612 10.1584 35.1612 9.07173C35.1612 7.95952 35.3423 7.03054 35.7045 6.2848C36.0667 5.53906 36.5483 4.98082 37.1491 4.61009C37.7542 4.23935 38.4169 4.05398 39.1371 4.05398C39.6868 4.05398 40.147 4.14773 40.5177 4.33523C40.8885 4.51847 41.1868 4.74858 41.4126 5.02557C41.6427 5.2983 41.8196 5.56676 41.9432 5.83097H42.0454V4.18182H44.7493V14.0959C44.7493 14.9311 44.5447 15.63 44.1356 16.1925C43.7265 16.755 43.1598 17.1768 42.4354 17.4581C41.7152 17.7436 40.8864 17.8864 39.9489 17.8864ZM40.0064 11.8139C40.4453 11.8139 40.816 11.7053 41.1186 11.4879C41.4254 11.2663 41.6598 10.951 41.8217 10.5419C41.9879 10.1286 42.071 9.63423 42.071 9.05895C42.071 8.48366 41.99 7.98509 41.8281 7.56321C41.6662 7.13707 41.4318 6.80682 41.125 6.57244C40.8182 6.33807 40.4453 6.22088 40.0064 6.22088C39.5589 6.22088 39.1818 6.34233 38.875 6.58523C38.5682 6.82386 38.3359 7.15625 38.1783 7.58239C38.0206 8.00852 37.9417 8.50071 37.9417 9.05895C37.9417 9.62571 38.0206 10.1158 38.1783 10.5291C38.3402 10.9382 38.5724 11.2557 38.875 11.4815C39.1818 11.7031 39.5589 11.8139 40.0064 11.8139ZM46.5562 14V4.18182H49.1961V5.89489H49.2984C49.4773 5.28551 49.7778 4.82528 50.1996 4.5142C50.6215 4.19886 51.1073 4.04119 51.657 4.04119C51.7934 4.04119 51.9404 4.04972 52.0981 4.06676C52.2558 4.08381 52.3942 4.10724 52.5136 4.13707V6.55327C52.3857 6.51491 52.2089 6.48082 51.983 6.45099C51.7572 6.42116 51.5505 6.40625 51.363 6.40625C50.9624 6.40625 50.6045 6.49361 50.2891 6.66832C49.9781 6.83878 49.7309 7.07741 49.5477 7.38423C49.3687 7.69105 49.2792 8.04474 49.2792 8.44531V14H46.5562ZM57.5405 14.1918C56.5476 14.1918 55.6889 13.9808 54.9645 13.5589C54.2443 13.1328 53.6882 12.5405 53.2961 11.782C52.9041 11.0192 52.7081 10.1349 52.7081 9.12926C52.7081 8.11506 52.9041 7.22869 53.2961 6.47017C53.6882 5.70739 54.2443 5.11506 54.9645 4.69318C55.6889 4.26705 56.5476 4.05398 57.5405 4.05398C58.5334 4.05398 59.3899 4.26705 60.1101 4.69318C60.8345 5.11506 61.3927 5.70739 61.7848 6.47017C62.1768 7.22869 62.3728 8.11506 62.3728 9.12926C62.3728 10.1349 62.1768 11.0192 61.7848 11.782C61.3927 12.5405 60.8345 13.1328 60.1101 13.5589C59.3899 13.9808 58.5334 14.1918 57.5405 14.1918ZM57.5532 12.0824C58.005 12.0824 58.3821 11.9545 58.6846 11.6989C58.9872 11.4389 59.2152 11.0852 59.3686 10.6378C59.5263 10.1903 59.6051 9.68111 59.6051 9.11009C59.6051 8.53906 59.5263 8.02983 59.3686 7.58239C59.2152 7.13494 58.9872 6.78125 58.6846 6.52131C58.3821 6.26136 58.005 6.13139 57.5532 6.13139C57.0973 6.13139 56.7138 6.26136 56.4027 6.52131C56.0959 6.78125 55.8636 7.13494 55.7059 7.58239C55.5525 8.02983 55.4758 8.53906 55.4758 9.11009C55.4758 9.68111 55.5525 10.1903 55.7059 10.6378C55.8636 11.0852 56.0959 11.4389 56.4027 11.6989C56.7138 11.9545 57.0973 12.0824 57.5532 12.0824ZM70.0796 9.8196V4.18182H72.8026V14H70.1883V12.2166H70.086C69.8644 12.7919 69.4958 13.2543 68.9802 13.6037C68.4688 13.9531 67.8445 14.1278 67.1073 14.1278C66.4511 14.1278 65.8736 13.9787 65.3751 13.6804C64.8765 13.3821 64.4866 12.9581 64.2053 12.4084C63.9283 11.8587 63.7877 11.2003 63.7834 10.4332V4.18182H66.5065V9.94744C66.5107 10.527 66.6663 10.9851 66.9731 11.3217C67.2799 11.6584 67.6911 11.8267 68.2067 11.8267C68.5349 11.8267 68.8417 11.7521 69.1272 11.603C69.4127 11.4496 69.6428 11.2237 69.8175 10.9254C69.9965 10.6271 70.0839 10.2585 70.0796 9.8196ZM77.3437 8.32386V14H74.6207V4.18182H77.2159V5.91406H77.3309C77.5483 5.34304 77.9126 4.89133 78.424 4.55895C78.9353 4.2223 79.5554 4.05398 80.2841 4.05398C80.9659 4.05398 81.5603 4.20312 82.0674 4.50142C82.5745 4.79972 82.9687 5.22585 83.25 5.77983C83.5312 6.32955 83.6718 6.9858 83.6718 7.74858V14H80.9488V8.23438C80.9531 7.63352 80.7997 7.16477 80.4886 6.82812C80.1775 6.48722 79.7493 6.31676 79.2038 6.31676C78.8373 6.31676 78.5135 6.3956 78.2322 6.55327C77.9552 6.71094 77.7379 6.94105 77.5802 7.24361C77.4268 7.5419 77.348 7.90199 77.3437 8.32386ZM89.0759 14.1598C88.3301 14.1598 87.6547 13.968 87.0496 13.5845C86.4487 13.1967 85.9715 12.6278 85.6178 11.8778C85.2683 11.1236 85.0936 10.1989 85.0936 9.10369C85.0936 7.97869 85.2747 7.04332 85.637 6.29759C85.9992 5.54759 86.4807 4.98722 87.0816 4.61648C87.6867 4.24148 88.3493 4.05398 89.0695 4.05398C89.6192 4.05398 90.0773 4.14773 90.4438 4.33523C90.8145 4.51847 91.1128 4.74858 91.3387 5.02557C91.5688 5.2983 91.7435 5.56676 91.8628 5.83097H91.9459V0.909091H94.6625V14H91.9779V12.4276H91.8628C91.735 12.7003 91.5539 12.9709 91.3195 13.2393C91.0894 13.5036 90.7889 13.723 90.4182 13.8977C90.0517 14.0724 89.6043 14.1598 89.0759 14.1598ZM89.9388 11.9929C90.3777 11.9929 90.7485 11.8736 91.051 11.6349C91.3578 11.392 91.5922 11.0533 91.7541 10.6186C91.9203 10.1839 92.0034 9.67472 92.0034 9.09091C92.0034 8.5071 91.9225 8 91.7605 7.5696C91.5986 7.1392 91.3642 6.80682 91.0574 6.57244C90.7506 6.33807 90.3777 6.22088 89.9388 6.22088C89.4914 6.22088 89.1142 6.34233 88.8074 6.58523C88.5006 6.82812 88.2683 7.16477 88.1107 7.59517C87.953 8.02557 87.8742 8.52415 87.8742 9.09091C87.8742 9.66193 87.953 10.1669 88.1107 10.6058C88.2726 11.0405 88.5049 11.3814 88.8074 11.6286C89.1142 11.8714 89.4914 11.9929 89.9388 11.9929Z",fill:"currentColor",style:{mixBlendMode:"luminosity"}})})}function o(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM10.8252 4.94075C10.8252 4.29101 11.3519 3.76428 12.0017 3.76428C12.6514 3.76428 13.1781 4.29101 13.1781 4.94075V19.0584C13.1781 19.7081 12.6514 20.2349 12.0017 20.2349C11.3519 20.2349 10.8252 19.7081 10.8252 19.0584V4.94075ZM9.64941 6.60679C7.57194 7.51453 6.12012 9.58753 6.12012 11.9996C6.12012 14.4117 7.57194 16.4847 9.64941 17.3925V6.60679ZM14.3553 17.3926C16.4329 16.4849 17.8848 14.4118 17.8848 11.9996C17.8848 9.58745 16.4329 7.51438 14.3553 6.60669V17.3926Z",fill:"currentColor",style:{mixBlendMode:"luminosity"}})})}function a(e){let{className:t}=e;return(0,n.jsxs)("div",{className:`flex items-center gap-2 h-12 py-2 px-4 ${t??""}`,children:[(0,n.jsx)(o,{className:""}),(0,n.jsx)(i,{className:"mt-1"})]})}},72197:function(e,t,r){"use strict";r.d(t,{Y:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",d:"M4 12.0041C4 12.2851 4.11703 12.5661 4.32602 12.7645L9.80982 18.186C10.0355 18.4008 10.2863 18.5 10.5455 18.5C11.1473 18.5 11.5737 18.0785 11.5737 17.5248C11.5737 17.219 11.4483 16.9711 11.256 16.7893L9.38349 14.9215L7.17659 12.9298L9.07419 13.0372H18.93C19.5653 13.0372 20 12.6157 20 12.0041C20 11.3926 19.5653 10.9711 18.93 10.9711H9.07419L7.18495 11.0785L9.38349 9.08678L11.256 7.21901C11.4483 7.02893 11.5737 6.78099 11.5737 6.48347C11.5737 5.92149 11.1473 5.5 10.5455 5.5C10.2863 5.5 10.0355 5.60744 9.80146 5.83884L4.32602 11.2438C4.11703 11.4421 4 11.7231 4 12.0041Z",fill:"currentColor"})})}r(67294)},72223:function(e,t,r){"use strict";r.d(t,{H:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{d:"M11.9959 4C11.7149 4 11.4339 4.11703 11.2355 4.32602L5.81405 9.80982C5.59917 10.0355 5.5 10.2863 5.5 10.5455C5.5 11.1473 5.92149 11.5737 6.47521 11.5737C6.78099 11.5737 7.02892 11.4483 7.21074 11.256L9.07851 9.38349L11.0702 7.17659L10.9628 9.07419L10.9628 18.93C10.9628 19.5653 11.3843 20 11.9959 20C12.6074 20 13.0289 19.5653 13.0289 18.93L13.0289 9.07419L12.9215 7.18495L14.9132 9.38349L16.781 11.256C16.9711 11.4483 17.219 11.5737 17.5165 11.5737C18.0785 11.5737 18.5 11.1473 18.5 10.5455C18.5 10.2863 18.3926 10.0355 18.1612 9.80146L12.7562 4.32602C12.5579 4.11703 12.2769 4 11.9959 4Z",fill:"currentColor"})})}r(67294)},88686:function(e,t,r){"use strict";r.d(t,{c:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 12a8 8 0 1116 0 8 8 0 01-16 0zm8-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm.709 4.948a.75.75 0 00-1.5 0v1.014c0 .027.001.054.004.08a3.22 3.22 0 00-.681.22c-.44.201-.787.48-1.04.837-.25.357-.374.774-.372 1.252-.002.583.184 1.047.56 1.391.375.344.887.597 1.535.76l.838.215c.28.07.517.146.71.231.195.085.342.188.443.309.102.12.154.27.154.446 0 .19-.057.359-.17.505a1.1 1.1 0 01-.476.343 1.902 1.902 0 01-.718.123c-.28 0-.532-.043-.754-.13a1.234 1.234 0 01-.53-.398c-.234-.318-.528-.662-.923-.662h-.105c-.42 0-.774.352-.664.758.067.248.167.472.3.671.257.383.615.672 1.073.867.25.106.522.183.818.231a.782.782 0 00-.002.062v1.014a.75.75 0 001.5 0v-1.014a.8.8 0 00-.001-.044 3.44 3.44 0 00.91-.245c.446-.195.787-.469 1.022-.82.238-.355.358-.774.36-1.257a2.14 2.14 0 00-.176-.874 1.967 1.967 0 00-.477-.663 2.797 2.797 0 00-.728-.474 4.786 4.786 0 00-.924-.308l-.691-.17a3.987 3.987 0 01-.473-.139 2.005 2.005 0 01-.39-.196.915.915 0 01-.267-.274.663.663 0 01-.087-.37c0-.169.048-.32.143-.454a.948.948 0 01.42-.312 1.73 1.73 0 01.673-.116c.39 0 .7.086.927.258a.99.99 0 01.124.11l.042.045c.254.27.536.57.902.57h.115c.42 0 .773-.353.637-.749a2.125 2.125 0 00-.243-.492 2.379 2.379 0 00-.998-.836 3.082 3.082 0 00-.822-.249.806.806 0 00.002-.052V6.948z",clipRule:"evenodd"})})}r(67294)},19393:function(e,t,r){"use strict";r.d(t,{T:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.585 6.415a4.657 4.657 0 00-6.585 0l-1 1A1 1 0 118.585 6l1-1A6.657 6.657 0 0119 14.415l-1 1A1 1 0 1116.585 14l1-1a4.657 4.657 0 000-6.586zm-1.878 1.878a1 1 0 010 1.415l-6 6a1 1 0 11-1.415-1.415l6-6a1 1 0 011.415 0zm-8.293.293a1 1 0 010 1.415l-1 1A4.657 4.657 0 1013 17.585l1-1a1 1 0 011.414 1.415l-1 1A6.657 6.657 0 115 9.585l1-1a1 1 0 011.414 0z",clipRule:"evenodd"})})}r(67294)},86047:function(e,t,r){"use strict";r.d(t,{_:function(){return i}});var n=r(85893);function i(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:[(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 19l.353.114A18.43 18.43 0 0012 20v0a18.43 18.43 0 005.647-.886L18 19"}),(0,n.jsx)("path",{fill:"currentColor",d:"M12.004 17.57c.281 0 .562-.117.76-.326l5.422-5.484a1.05 1.05 0 00.314-.735c0-.602-.422-1.029-.975-1.029a.99.99 0 00-.736.318l-1.868 1.873-1.991 2.206.107-1.897V4.07c0-.635-.421-1.07-1.033-1.07-.611 0-1.033.435-1.033 1.07v8.426l.107 1.89-1.991-2.2-1.868-1.872a1.017 1.017 0 00-.736-.318c-.562 0-.983.427-.983 1.029 0 .259.107.51.339.743l5.405 5.476c.198.209.48.326.76.326z"})]})}r(67294)},75287:function(e,t,r){"use strict";r.d(t,{m:function(){return i}});var n=r(85893);function i(e){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M4 13.4C4 11.1502 4 10.0252 4.57295 9.23664C4.75799 8.98196 4.98196 8.75799 5.23664 8.57295C6.02524 8 7.15016 8 9.4 8H14.6C16.8498 8 17.9748 8 18.7634 8.57295C19.018 8.75799 19.242 8.98196 19.4271 9.23664C20 10.0252 20 11.1502 20 13.4V15.6C20 17.8498 20 18.9748 19.4271 19.7634C19.242 20.018 19.018 20.242 18.7634 20.4271C17.9748 21 16.8498 21 14.6 21H9.4C7.15016 21 6.02524 21 5.23664 20.4271C4.98196 20.242 4.75799 20.018 4.57295 19.7634C4 18.9748 4 17.8498 4 15.6V13.4Z",stroke:"currentColor",strokeWidth:"2"}),(0,n.jsx)("path",{d:"M10 13C10 11.8954 10.8954 11 12 11C13.1046 11 14 11.8954 14 13V16C14 17.1046 13.1046 18 12 18C10.8954 18 10 17.1046 10 16V13Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M7 8V8C7 5.23858 9.23858 3 12 3V3C14.7614 3 17 5.23858 17 8V8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},57755:function(e,t,r){"use strict";r.d(t,{P:function(){return i}});var n=r(85893);function i(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,n.jsx)("path",{d:"M7.24241 20.8072L7.3511 21.8012L7.24241 20.8072ZM4.76118 18.8151L5.75526 18.7064L4.76118 18.8151ZM18.7555 17.2849L19.7496 17.1762L18.7555 17.2849ZM16.7634 19.7661L16.6547 18.772L16.7634 19.7661ZM15.2333 5.77178L15.1246 4.77771L15.2333 5.77178ZM17.7145 7.76389L16.7204 7.87258L17.7145 7.76389ZM5.71226 6.81282L5.82095 7.8069L5.71226 6.81282ZM3.72015 9.29405L2.72607 9.40274L3.72015 9.29405ZM5.82095 7.8069L15.342 6.76586L15.1246 4.77771L5.60356 5.81874L5.82095 7.8069ZM16.7204 7.87258L17.7615 17.3936L19.7496 17.1762L18.7086 7.6552L16.7204 7.87258ZM16.6547 18.772L7.13372 19.8131L7.3511 21.8012L16.8721 20.7602L16.6547 18.772ZM5.75526 18.7064L4.71422 9.18535L2.72607 9.40274L3.76711 18.9237L5.75526 18.7064ZM7.13372 19.8131C6.44745 19.8881 5.8303 19.3926 5.75526 18.7064L3.76711 18.9237C3.9622 20.708 5.56681 21.9963 7.3511 21.8012L7.13372 19.8131ZM17.7615 17.3936C17.8365 18.0799 17.341 18.697 16.6547 18.772L16.8721 20.7602C18.6564 20.5651 19.9447 18.9605 19.7496 17.1762L17.7615 17.3936ZM15.342 6.76586C16.0282 6.69082 16.6454 7.18632 16.7204 7.87258L18.7086 7.6552C18.5135 5.87091 16.9089 4.58261 15.1246 4.77771L15.342 6.76586ZM5.60356 5.81874C3.81927 6.01384 2.53097 7.61845 2.72607 9.40274L4.71422 9.18535C4.63918 8.49909 5.13468 7.88193 5.82095 7.8069L5.60356 5.81874Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M10.1489 15.8243C10.7438 16.3886 11.7062 16.268 12.1434 15.5743L13.0077 14.2028C13.0111 14.2009 13.0186 14.1978 13.0296 14.1966C13.0406 14.1954 13.0486 14.1968 13.0523 14.1979L14.944 16.1095L8.28179 16.838L9.40843 15.1697C9.40848 15.1697 9.40853 15.1696 9.40859 15.1696C9.41183 15.1677 9.41945 15.1645 9.43057 15.1632C9.4417 15.162 9.44985 15.1636 9.45342 15.1647C9.45348 15.1647 9.45354 15.1647 9.45359 15.1648L10.1489 15.8243ZM13.0094 14.2001C13.0094 14.2001 13.0094 14.2001 13.0094 14.2002L13.0094 14.2001Z",stroke:"currentColor",strokeWidth:"2"}),(0,n.jsx)("circle",{cx:"9",cy:"11",r:"1.5",fill:"currentColor"}),(0,n.jsx)("path",{d:"M13 6C13 3.79086 14.7909 2 17 2C19.2091 2 21 3.79086 21 6C21 8.20914 19.2091 10 17 10C16.3388 10 15.7151 9.83959 15.1657 9.55556",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}r(67294)},68995:function(e,t,r){"use strict";r.d(t,{p:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",d:"M19 12C19 11.4125 18.5118 10.9326 17.9326 10.9326H13.0674V6.06738C13.0674 5.48818 12.5875 5 12 5C11.4125 5 10.9326 5.48818 10.9326 6.06738V10.9326H6.06738C5.47991 10.9326 5 11.4125 5 12C5 12.5875 5.47991 13.0674 6.06738 13.0674H10.9326V17.9326C10.9326 18.5201 11.4125 19 12 19C12.5875 19 13.0674 18.5201 13.0674 17.9326V13.0674H17.9326C18.5118 13.0674 19 12.5875 19 12Z",fill:"currentColor"})})}r(67294)},22227:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(85893);r(67294);var i=r(25675),o=r.n(i);function a(e){return(0,n.jsx)(o(),{src:"/images/design/pro.png",alt:"Pro Icon",width:24,height:24,...e})}},11007:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=r(85893);function i(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9839 16.0764C13.8125 16.0764 16.1055 13.7834 16.1055 10.9549C16.1055 8.12632 13.8125 5.83333 10.9839 5.83333C8.15537 5.83333 5.86238 8.12632 5.86238 10.9549C5.86238 13.7834 8.15537 16.0764 10.9839 16.0764ZM10.9839 17.9388C14.841 17.9388 17.9678 14.812 17.9678 10.9549C17.9678 7.09776 14.841 3.97095 10.9839 3.97095C7.12681 3.97095 4 7.09776 4 10.9549C4 14.812 7.12681 17.9388 10.9839 17.9388Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M14.0739 15.827L15.3908 14.5101L19.3415 18.4608C19.7052 18.8245 19.7052 19.4141 19.3415 19.7777C18.9779 20.1414 18.3883 20.1414 18.0246 19.7777L14.0739 15.827Z",fill:"currentColor"})]})}r(67294)},59480:function(e,t,r){"use strict";r.d(t,{X:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30352 18.285L4.56888 8H4C3.44772 8 3 7.55228 3 7C3 6.44772 3.44772 6 4 6H5.13008L6.07144 5.19312C7.72252 3.7779 9.82539 3 12 3C14.1746 3 16.2775 3.7779 17.9286 5.19312L18.8699 6H20C20.5523 6 21 6.44772 21 7C21 7.55228 20.5523 8 20 8H19.4311L18.6965 18.285C18.547 20.3782 16.8052 22 14.7066 22H9.29336C7.1948 22 5.45304 20.3782 5.30352 18.285ZM12 5C13.2873 5 14.5424 5.34929 15.6359 6H8.3641C9.45756 5.34929 10.7127 5 12 5ZM7.29844 18.1425L6.57398 8H17.426L16.7016 18.1425C16.6268 19.1891 15.7559 20 14.7066 20H9.29336C8.24408 20 7.3732 19.1891 7.29844 18.1425ZM10 9.5C10.5523 9.5 11 9.94772 11 10.5V17C11 17.5523 10.5523 18 10 18C9.44772 18 9 17.5523 9 17V10.5C9 9.94772 9.44772 9.5 10 9.5ZM14 9.5C14.5523 9.5 15 9.94772 15 10.5V17C15 17.5523 14.5523 18 14 18C13.4477 18 13 17.5523 13 17V10.5C13 9.94772 13.4477 9.5 14 9.5Z",fill:"currentColor"})})}r(67294)},30013:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(85893);r(67294);var i=r(48105),o=r(41664),a=r.n(o),s=r(9454);function l(e){let{error:t}=e,[r,o]=["An error occurred",""];return 404===t?(r="Page not found",o="The page you are looking for doesn't exist or has been moved."):403===t||401===t?(r="This design is private.",o="To access it, ask the owner to copy a public link on the Export page."):500===t?(r="Internal server error",o="An error occurred on our end. Please try again later"):"AUTH_ERROR"===t&&(r="An unknown authentication error occurred.",o=(0,n.jsxs)("span",{children:["Please contact"," ",(0,n.jsx)("a",{href:"mailto:support@playgroundai.com",className:"underline",children:"support@playgroundai.com"})," ","for help."]})),(0,n.jsx)(s.QY,{children:(0,n.jsxs)("div",{className:"w-screen flex flex-col items-center justify-center gap-4 text-center p-8 mt-[25vh]",children:[(0,n.jsx)("h1",{className:"text-design-2xl",children:r}),(0,n.jsx)("h2",{children:o}),(0,n.jsxs)("div",{className:"flex gap-4 flex-col sm:flex-row",children:[500!==t&&(0,n.jsx)(i.z,{variant:"action-secondary",type:"button",asChild:!0,children:(0,n.jsx)(a(),{href:"/design",children:"Explore Templates"})}),(0,n.jsx)(i.z,{variant:"secondary",type:"button",onClick:()=>{window.location.reload()},children:"Reload this page"})]})]})})}},3567:function(e,t,r){"use strict";r.d(t,{Z:function(){return Q},F:function(){return J}});var n=r(85893),i=r(2337),o=r(67294),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l={Pixel:"Pixel",Percent:"Percent"},u={unit:l.Percent,value:.8};function c(e){return"number"==typeof e?{unit:l.Percent,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:l.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:l.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),u):(console.warn("scrollThreshold should be string or number"),u)}var d=function(e){function t(t){var r=e.call(this,t)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:"string"==typeof r.props.scrollableTarget?document.getElementById(r.props.scrollableTarget):(null===r.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n        happen because the element may not have been added to DOM yet.\n        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n      "),null)},r.onStart=function(e){!r.lastScrollTop&&(r.dragging=!0,e instanceof MouseEvent?r.startY=e.pageY:e instanceof TouchEvent&&(r.startY=e.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(e){r.dragging&&(e instanceof MouseEvent?r.currentY=e.pageY:e instanceof TouchEvent&&(r.currentY=e.touches[0].pageY),r.currentY<r.startY||(r.currentY-r.startY>=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),r.currentY-r.startY>1.5*r.maxPullDownDistance||!r._infScroll||(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")})},r.onScrollListener=function(e){"function"==typeof r.props.onScroll&&setTimeout(function(){return r.props.onScroll&&r.props.onScroll(e)},0);var t=r.props.height||r._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;r.actionTriggered||((r.props.inverse?r.isElementAtTop(t,r.props.scrollThreshold):r.isElementAtBottom(t,r.props.scrollThreshold))&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=t.scrollTop)},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},r.throttledOnScrollListener=(function(e,t,r,n){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function l(){var l=this,u=Date.now()-a,c=arguments;function d(){a=Date.now(),r.apply(l,c)}o||(n&&!i&&d(),s(),void 0===n&&u>e?d():!0!==t&&(i=setTimeout(n?function(){i=void 0}:d,void 0===n?e-u:e)))}return"boolean"!=typeof t&&(n=r,r=t,t=void 0),l.cancel=function(){s(),o=!0},l})(150,r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return!function(e,t){function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw Error('Mandatory prop "refreshFunction" missing.\n          Pull Down To Refresh functionality will not work\n          as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?s(s({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,n=c(t);return n.unit===l.Pixel?e.scrollTop<=n.value+r-e.scrollHeight+1:e.scrollTop<=n.value/100+r-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,n=c(t);return n.unit===l.Pixel?e.scrollTop+r>=e.scrollHeight-n.value:e.scrollTop+r>=n.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=s({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),n=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return o.createElement("div",{style:n,className:"infinite-scroll-component__outerdiv"},o.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&o.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},o.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(o.Component),f=r(39854),p=r(5266),h=r(11163),m=r(598),g=r(54167),v=r(51879),y=r(9669),x=r.n(y),b=r(33299),w=r(47922),_=e=>{let{initialImages:t,initialCursor:r,options:n,sortBy:i,filter:a,dateFilter:s}=e,[l,u]=(0,o.useState)(t),[c,d]=(0,o.useState)(r),f=(0,b.useSession)(),[p,h]=(0,o.useState)(!1),[m,g]=(0,o.useState)(!1),y=(0,o.useRef)({sortBy:i,filter:a,dateFilter:s}),_=(0,w.y)("dedupe-grid-images"),j=void 0!==c,C=(0,o.useCallback)(async e=>{g(!0);let{data:t}=await x().get(n.url,{params:{limit:v.NM,cursor:e,userId:f?.data?.user?.id,...n.params}}),r=t.images,i=t.cursor,o=r.map(e=>e.id);return _&&(r=l.filter(e=>!o.includes(e.id))),g(!1),{newImages:r,newCursor:i,nasMoreImages:void 0!==e}},[l,n.params,n.url,f?.data?.user?.id,_]);return(0,o.useEffect)(()=>{let e=!1,t=async()=>{h(!0);let{newImages:t,newCursor:r}=await C(0);e||(r&&d(r),u(t),h(!1))};return y.current.sortBy!==i&&(y.current.sortBy=null,t()),y.current.filter!==a&&(y.current.filter=null,t()),(y.current.dateFilter?.start!==s?.start||y.current.dateFilter?.end!==s?.end)&&(y.current.dateFilter=null,t()),()=>{e=!0}},[i,a,s?.start,s?.end]),{images:l,getMoreImages:(0,o.useCallback)(async()=>{let{newImages:e,newCursor:t}=await C(c);return t&&d(t),setTimeout(()=>u(t=>[...t,...e]),0),e},[c,C]),haveMoreImages:j,setImages:u,showEmptyImages:p,isLoading:m,isLoadingMore:m&&j}},j=r(41752),C=r(93123),k=r(627),E=r(28456),S=r(92323),N=r(41301),P=r.n(N);function L(e){let{deleteImages:t,numSelected:r}=e,{closeModal:i}=(0,S.d)(),o=(0,j.bJ)();return(0,n.jsxs)(E.Z,{onSubmit:e=>{e.preventDefault(),t()},children:[(0,n.jsx)(E.Z.Header,{children:(0,n.jsx)(E.Z.HeaderTitle,{children:`Are you sure you want to delete ${r} ${r>1?"images":"image"}?`})}),(0,n.jsx)(E.Z.Body,{children:"Deleting images will permanently remove them and you will not be able to recover them later."}),(0,n.jsxs)(E.Z.Footer,{children:[(0,n.jsx)(E.Z.Cancel,{onClick:i,disabled:o}),(0,n.jsx)(E.Z.Submit,{className:P().DeleteButton,disabled:o,children:o?(0,n.jsx)(k.ZP,{smallest:!0,flex:!0}):"Delete"})]})]})}function T(e){let{error:t}=e,{closeModal:r}=(0,S.d)();return(0,n.jsxs)(E.Z,{onSubmit:e=>{e.preventDefault(),r()},children:[(0,n.jsx)("div",{className:"flex px-8"}),(0,n.jsx)(E.Z.Header,{children:(0,n.jsx)(E.Z.HeaderTitle,{children:"Cannot complete download"})}),(0,n.jsx)(E.Z.Body,{children:t}),(0,n.jsx)(E.Z.Footer,{children:(0,n.jsx)(E.Z.Submit,{children:"Okay"})})]})}var O=r(86010),R=r(60422),A=r(13346),I=r(19311),M=r(35893),D=r(62469),F=r(42796);function z(e){let{selectAll:t,allAreSelected:r,allowEdits:i=!0,deletedCallback:o}=e,a=(0,j.dW)(e=>e.active),s=(0,j.Le)(),l=(0,j.uh)(),{setModalContent:u,closeModal:c,isModalOpen:d}=(0,S.d)(),f=e=>{u((0,n.jsx)(T,{error:e}))};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:(0,O.Z)(`flex fixed min-w-[600px] left-[50%] -translate-x-[50%] bg-pg-900 p-3 text-sm font-medium rounded-pg-md items-center z-[${C.KN.SELECT_POPOVER}]`,"border-[1px] border-pg-700","transition-all translate-y-full ease-in-out","shadow-2xl",a?"bottom-20":"-bottom-20"),children:[(0,n.jsxs)("div",{className:"flex items-center ml-1 gap-4 font-semibold text-gray-10",children:[(0,n.jsx)(A.z,{size:"icon",onClick:j.dW.getState().reset,disabled:l||d,children:(0,n.jsx)(R.Z,{})}),`${s} selected`]}),(0,n.jsx)("div",{className:"flex-grow"}),(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[i&&(0,n.jsx)(A.z,{size:"lg",onClick:()=>{u((0,n.jsx)(L,{deleteImages:()=>{let e=j.dW.getState(),t=e.images.map(e=>e.id);setTimeout(()=>{o(t),c()},300),e.delete()},numSelected:s}))},disabled:0===s||l||d,children:"Delete"}),(0,n.jsx)(A.z,{size:"lg",className:"min-w-[120px]",onClick:()=>{j.dW.getState().download(f)},disabled:0===s||l||d,variant:"create",children:l?(0,n.jsx)(k.ZP,{smallest:!0,flex:!0}):"Download"}),i&&(0,n.jsx)(B,{disabled:0===s||l||d})]})]})})}function B(e){let{disabled:t}=e,r=(0,j.a5)(),[i,a]=(0,o.useState)(null),s=(0,j.dW)(e=>e.images.every(e=>!e.private)),l=(0,j.dW)(e=>e.images.every(e=>e.private)),u=!(0,I.Z)();return(0,n.jsxs)(M.h_,{children:[(0,n.jsx)(M.$F,{disabled:t,asChild:!0,children:(0,n.jsx)(A.z,{size:"icon",children:(0,n.jsx)(D.AjK,{className:"w-4 h-4 "})})}),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(M.AW,{align:"end",side:window.innerWidth>1100?"right":"top",sideOffset:15,alignOffset:window.innerWidth>1100?-27:-10,children:[(0,n.jsxs)(M.Xi,{disabled:r||s,className:"flex items-center disabled:text-gray-50",onClick:()=>{a("public"),j.dW.getState().setPrivacy(!1)},children:["Make public"," ",r&&"public"===i&&(0,n.jsx)(k.ZP,{smallest:!0,flex:!0,className:"ml-2"})]}),(0,n.jsx)(F._,{open:!!u&&!r&&!l&&void 0,label:"This feature is only available to Pro users",mixpanelKey:"Change Privacy (Profile bulk action)",alignOffset:-25,sideOffset:10,children:(0,n.jsxs)(M.Xi,{disabled:r||l,className:"flex items-center disabled:text-gray-50",onClick:()=>{u||(a("private"),j.dW.getState().setPrivacy(!0))},children:["Make private"," ",r&&"private"===i&&(0,n.jsx)(k.ZP,{smallest:!0,flex:!0,className:"ml-2"})]})})]})})]})}var U=r(81810),V=r(49325),$=r(14490),H=r(41664),Z=r.n(H),W=r(8891),q=r.n(W),G=r(25675),Y=r.n(G),K=r(1233);function X(e){let{data:t}=e,r=(0,w.y)("new-daily-theme-grid-card"),i=(0,$.L)({fallbackData:t});return(0,n.jsx)(Z(),{href:"/create",onClick:()=>{q().track("Daily Theme Card Clicked",{dailyThemeId:i?.data?.id,dailyThemeTitle:i?.data?.title})},children:(0,n.jsxs)("div",{className:(0,K.cn)("overflow-hidden p-1 rounded-lg relative",r?"bg-pg-600":"bg-gray-75"),children:[(0,n.jsx)("div",{className:(0,K.cn)("absolute top-0 left-0 z-10 p-2 rounded-br-[7px] text-xs font-pg-semibold",r?"bg-pg-600 text-pg-100":"bg-gray-75 text-gray-5"),children:"DAILY THEME"}),(0,n.jsx)("div",{className:"relative",children:i?.data?.imageUrl?(0,n.jsx)(Y(),{height:400,width:400,src:i?.data?.imageUrl,className:"aspect-square h-full w-full relative rounded-[4px]",alt:i?.data?.title}):null}),(0,n.jsxs)("div",{className:"z-10 relative p-3",children:[(0,n.jsx)("h2",{className:"text-gray-5 font-bold text-sm",children:i?.data?.title}),(0,n.jsx)("p",{className:"text-gray-25 text-sm",children:i?.data?.body})]})]})})}let J={300:2,440:2,800:3,1200:4,1600:5,3e3:7,3400:8,4e3:9};function Q(e){let{className:t,initialImages:r,initialCursor:a,options:s,sortBy:l,filter:u,dateFilter:c,emptyState:v,onScroll:y,groupBatchedImages:x=!1,hideProfileImages:b=!1,scrollThreshold:C=.8,showDailyThemeCard:k,dailyTheme:E}=e,[N,P]=(0,o.useState)(null),[L,T]=(0,o.useState)(!1),[O,R]=(0,o.useState)(null),A=(0,h.useRouter)(),I="/profile/likes/[id]"===A.pathname,{isLoadingMore:M,haveMoreImages:D,getMoreImages:F,setImages:B,images:$,showEmptyImages:H}=_({initialImages:r,initialCursor:a,options:s,sortBy:l,filter:u,dateFilter:c}),{setImageData:Z}=(0,g.g)(),{isModalOpen:W,closeModal:q}=(0,S.d)(),G=V.t5.useUserHasPermission("moderation:images:private"),Y=(0,w.y)("show-grid-loading"),K=(0,o.useCallback)(async function(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];P(t),Z(e);let{id:i}=e;A.query.postId=i,n&&A.push(A,`/post/${(0,U.Td)(e)}`,{shallow:!0}),r&&localStorage.setItem("modal-return-to",A.asPath)},[A,Z]),Q=(0,m.Z)(),ee=(0,o.useMemo)(()=>{let e=[];return $?.forEach(t=>{if(t.hide)return;let r=e.find(e=>e.id===t.batchId);r?r.images.length<4&&r.images.push(t):e.push({id:x&&t.batchId?t.batchId:t.id,images:[t]})}),k?[{id:"daily-theme-batch",images:[{id:"daily-theme",isDailyTheme:!0}]},...e]:e},[$,x,k]),et=(0,o.useCallback)(async e=>{if(null!==N){let t=N+e;if(k&&0===t)return;let r=k?$.length+1:$.length;if(t>=0&&t<r){let e=ee[t].images?.[0];if(ee[t].images?.[0]?.id)return K(e,t,!1,!0)}t>=$.length-2&&await F()}},[ee,F,$.length,K,N,k]);(0,o.useEffect)(()=>j.dW.getState().reset,[]),(0,o.useEffect)(()=>{let e=async e=>{switch(e.key?.toLowerCase()){case"arrowleft":case"arrowright":if(!A?.query.postId)return;et("ArrowRight"===e.key?1:-1);break;case"shift":console.log("Multi-select: on"),T(!0);break;case"escape":W?q():j.dW.getState().reset()}};document.addEventListener("keydown",e);let t=async e=>{e.key?.toLowerCase()==="shift"&&(console.log("Multi-select: off"),T(!1))};return document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[$,et,A?.query.postId,N,W,q]),(0,o.useEffect)(()=>{let e=()=>et(1),t=()=>et(-1);return document.addEventListener("pai:modal:next",e),document.addEventListener("pai:modal:prev",t),()=>{document.removeEventListener("pai:modal:next",e),document.removeEventListener("pai:modal:prev",t)}},[et]);let er=(0,o.useMemo)(()=>$.some(e=>e.hide),[$]),en=(e,t)=>{B(r=>r.map(r=>t.includes(r.id)?{...r,hide:e}:r))},{width:ei}=(0,p.iP)(),eo=(0,o.useMemo)(()=>(0,p.QN)(ei,J),[ei]),ea=(0,j.dW)(e=>e.active),es=(0,j.Le)()===$.length,el=e=>{let{col:t,row:r}=e;return r*eo+t},eu=(0,o.useMemo)(()=>{let e=-1,t={0:0,1:0,2:0,3:0,4:0};$.length;let r={};return ee.forEach(n=>{let i=(e+=1)%eo,o=t[i];t[i]+=2===n.images.length?1:2,n.images.forEach((e,t)=>{r[e.id]={col:i+([1,3].includes(t)?.5:0),row:o+([0,1].includes(t)?0:1)}})}),r},[ee,$.length,eo,D]),ec=e=>{let t=j.dW.getState();if(!t.downloadLoading&&!t.deleteLoading){if(t.isSelected(e.id))t.deselect(e.id);else{R(e.id);let r={id:e.id,url:e.url,prompt:e.prompt,private:e.private,publishedFromCanvas:e.fromCanvas};if(L&&t.images.length&&O){if(L){let r=eu[O],n=eu[e.id],i=el(r),o=el(n);if(o>i){let r=$.filter(e=>!e.hide).filter(e=>el(eu[e.id])>=i&&el(eu[e.id])<=o).map(t=>({id:t.id,url:t.url,prompt:t.prompt,private:t.private,publishedFromCanvas:e.fromCanvas}));t.selectAll([...t.images,...r.filter(e=>!t.images.some(t=>t.id===e.id))])}else if(o<i){let r=$.filter(e=>!e.hide).filter(e=>el(eu[e.id])>=o&&el(eu[e.id])<=i).map(t=>({id:t.id,url:t.url,prompt:t.prompt,private:t.private,publishedFromCanvas:e.fromCanvas}));t.selectAll([...t.images,...r.filter(e=>!t.images.some(t=>t.id===e.id))])}}}else t.select(r)}}},ed=(0,o.useRef)(null);return Q?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d,{ref:ed,className:t,dataLength:$.length,next:F,hasMore:D,loader:(0,n.jsx)(n.Fragment,{}),style:{overflow:"visible"},scrollThreshold:C,onScroll:()=>y?.(ed.current?.lastScrollTop),children:(0,n.jsx)(p.ZP,{columnsCountBreakPoints:J,children:ee.length&&!H?(0,n.jsx)(i.Z,{gutter:"4px",children:ee.map((e,t)=>{let r=Math.min(e.images.length,2);return(0,n.jsx)("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`},children:e.images.map((e,i)=>{if(e.isDailyTheme)return(0,n.jsx)(X,{data:E},"daily-theme-card");let o=0===t;return(0,n.jsx)(f.F,{highFetchPriority:o,id:e.id,width:e.width,height:e.height,aspectRatio:(e.width??1)/(e.height??1),prompt:r>1?"":e.prompt,showPrompt:!0,url:e.url,url_jpeg:e.url_jpeg,title:e.title,isPrivate:e.private,createdAt:e.createdAt,source:e.source,user:{id:e.user.id,name:e.user.displayName,avatar:e.user.image},hideImage:b,isLiked:e.userLiked??!1,numLikes:e.likeCount??0,fromCanvas:e.fromCanvas,onClick:r=>{if(ea){ec(e);return}L&&(console.log("Multi-select: off [2]"),T(!1)),r.metaKey||L||K(e,t)},setHidden:en,forceVisible:er||o,parent_image_url:e.parent_image_url},`${e.id}-${i}`)})},e.id)})}):(0,n.jsx)("p",{className:"text-gray-400 p-10",children:v||H||"No images."})})}),Y&&D&&M&&(0,n.jsx)("div",{className:"text-center text-pg-300 p-4",children:"Loading more..."}),(0,n.jsx)(z,{selectAll:()=>{let e=$.map(e=>({id:e.id,url:e.url,prompt:e.prompt,private:e.private,publishedFromCanvas:e.fromCanvas}));j.dW.getState().selectAll(e)},allAreSelected:es,deletedCallback:e=>en(!0,e),allowEdits:!I||G})]}):null}},43222:function(e,t,r){"use strict";r.d(t,{R:function(){return i}});var n=r(67294);class i extends n.Component{static #e=this.defaultProps={columnsCount:3,gutter:"10px",className:"",style:{},containerTag:"div",itemTag:"div",itemStyle:{},autoPlace:!1};getColumns(){if(this.props.autoPlace){let e=this.props.columnsCount,t=Array(e).fill(0),r=Array.from({length:e},()=>[]),i=0;return n.Children.forEach(this.props.children,e=>{let o=t.indexOf(Math.min(...t));if(!(e&&n.isValidElement(e)))return;let a=e.props["data-aspect-ratio"];if(!a)throw Error("data-aspect-ratio is required for autoPlace");t[o]+=1/a,r[o].push(e),i=Math.max(i,r[o].length)}),r}{let{children:e,columnsCount:t}=this.props,r=Array.from({length:t},()=>[]),i=0;return n.Children.forEach(e,e=>{e&&n.isValidElement(e)&&(r[i%t].push(e),i++)}),r}}renderColumns(){let{gutter:e,itemTag:t,itemStyle:r}=this.props;return this.getColumns().map((i,o)=>n.createElement(t,{key:o,style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch",flex:1,width:0,gap:e,...r}},i.map(e=>e)))}render(){let{gutter:e,className:t,style:r,containerTag:i}=this.props;return n.createElement(i,{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"stretch",boxSizing:"border-box",width:"100%",gap:e,...r},className:t},this.renderColumns())}}},5266:function(e,t,r){"use strict";r.d(t,{QN:function(){return l},iP:function(){return s}});var n=r(85893),i=r(598),o=r(77690),a=r(67294);let s=()=>{let e=(0,i.Z)(),[t,r]=(0,a.useState)({width:0,height:0}),n=(0,a.useCallback)(()=>{e&&r({width:window.innerWidth,height:window.innerHeight})},[e]);return(0,o.L)(()=>{if(e)return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[e,n]),{...t,hasMounted:e}};function l(e,t){let r=1;return Object.entries(t).sort((e,t)=>{let[r]=e,[n]=t;return parseInt(n)-parseInt(r)}).some(t=>{let[n,i]=t;return e>=parseInt(n)&&(r=i,!0)}),r}t.ZP=e=>{let{columnsCountBreakPoints:t,children:r,className:o,style:u,fallbackColumnsCount:c}=e,d=(0,i.Z)(),f=function(e,t){let{width:r,hasMounted:n}=s();return(0,a.useMemo)(()=>t&&!n?t:l(r,e),[e,r,t,n])}(t,c);return(0,n.jsx)("div",{className:o,style:u,children:d||void 0!==c?a.Children.map(r,(e,t)=>a.cloneElement(e,{key:t,columnsCount:f})):null})}},97797:function(e,t,r){"use strict";r.d(t,{ZN:function(){return h},gl:function(){return d},t1:function(){return f},uc:function(){return p}});var n=r(85893);r(67294);var i=r(94055),o=r.n(i),a=r(24011),s=r(86010),l=r(44746),u=r(20672);let c=(0,a.L)("span",o().Tag);function d(e){let{className:t=""}=e;return(0,n.jsx)(c,{className:t,children:"New"})}function f(){return(0,l.sA)()?null:(0,n.jsxs)("div",{className:"bg-purple-primary inline-flex self-start items-center h-[18px] rounded-full pl-[4px] pr-[6px]",children:[(0,n.jsx)(u.Z,{color:"#FFFFFF",backgroundColor:"#7C6BFF",height:12,width:12}),(0,n.jsx)("span",{className:"text-[10px]",children:"Pro"})]})}function p(e){let{className:t="",...r}=e,i=(0,l.WI)(),a=(0,l.s4)();return(0,n.jsx)(c,{...r,className:(0,s.Z)(t,i&&o().Pro,a&&o().Turbo),children:a?"Turbo":i?"Pro":"Free"})}function h(){return(0,n.jsx)("div",{className:"bg-pai-cyan inline-flex items-center rounded-full h-5 px-2 font-bold text-xs text-black leading-5",children:"Pro"})}},4404:function(e,t,r){"use strict";r.d(t,{$N:function(){return P},Ok:function(){return T},on:function(){return N},ZP:function(){return O}});var n=r(85893),i=r(41664),o=r.n(i),a=r(67294);function s(){return(0,n.jsxs)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M5.78188 18.75H13.2185C13.783 18.75 14.2272 18.2817 14.1147 17.7285C13.8042 16.2012 12.7899 13.5 9.5002 13.5C6.21051 13.5 5.19625 16.2012 4.88569 17.7285C4.7732 18.2817 5.21738 18.75 5.78188 18.75Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M15.75 13.5C17.8288 13.5 18.6802 15.6479 19.0239 17.196C19.2095 18.032 18.5333 18.75 17.6769 18.75H16.75",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.5 11.5C11.0188 11.5 12.25 10.2688 12.25 8.75C12.25 7.23122 11.0188 6 9.5 6C7.98122 6 6.75 7.23122 6.75 8.75C6.75 10.2688 7.98122 11.5 9.5 11.5Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14.75 11.5C16.2688 11.5 17.25 10.2688 17.25 8.75C17.25 7.23122 16.2688 6 14.75 6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}var l=r(48563);function u(){return(0,n.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M8.40625 18.6875H6.25C5.86875 18.6875 5.50312 18.536 5.23353 18.2665C4.96395 17.9969 4.8125 17.6312 4.8125 17.25V12.2188C4.8125 11.8375 4.96395 11.4719 5.23353 11.2023C5.50312 10.9327 5.86875 10.7812 6.25 10.7812H8.40625M13.4375 9.34375V6.46875C13.4375 5.89688 13.2103 5.34843 12.8059 4.94405C12.4016 4.53968 11.8531 4.3125 11.2812 4.3125L8.40625 10.7812V18.6875H16.5138C16.8604 18.6914 17.1968 18.5699 17.461 18.3454C17.7252 18.1208 17.8993 17.8084 17.9513 17.4656L18.9431 10.9969C18.9744 10.7909 18.9605 10.5805 18.9024 10.3804C18.8443 10.1802 18.7434 9.99515 18.6066 9.8379C18.4699 9.68065 18.3006 9.55501 18.1105 9.46969C17.9204 9.38436 17.714 9.34139 17.5056 9.34375H13.4375Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}var c=r(81084),d=r(8891),f=r.n(d);function p(e){let{className:t}=e,r=(0,c.h)(),i=(0,a.useCallback)(()=>{f().track("Rate images button clicked"),r(!0,!0)},[r]);return(0,n.jsxs)("button",{type:"button",onClick:i,className:`items-center px-4 hover:bg-gray-90 text-sm text-gray-25 flex gap-1 font-pg-medium ${t}`,children:[(0,n.jsx)(u,{}),"Rate ",(0,n.jsx)("span",{className:"max-lg:hidden",children:"Images"})]})}var h=r(54589),m=r(11923),g=r(59820),v=r(9669),y=r.n(v),x=r(11163),b=r(13346),w=r(35893),_=r(1233),j=r(14622),C=r(69306),k=r(76581),E=r(13728),S=r(47922);function N(e){let t=(0,l.K)();return t?(0,n.jsx)(P,{...e,children:t>9?(0,n.jsxs)(n.Fragment,{children:["9",(0,n.jsx)("span",{className:"text-2xs",children:"+"})]}):t}):null}function P(e){return(0,n.jsx)("div",{className:(0,_.cn)("bg-destructive rounded-full text-2xs font-bold h-5 w-5 border-2 border-background text-background absolute -bottom-0.5 right-1 inline-flex items-center justify-center ",e.className),children:e.children})}let L=(0,a.forwardRef)((e,t)=>{let{pathname:r}=(0,x.useRouter)(),i=r?.includes("/canvas");return(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{className:"relative",asChild:!0,children:(0,n.jsxs)(b.z,{variant:"ghost",size:"icon",...e,ref:t,className:(0,_.cn)("text-pg-300 relative data-[state=open]:bg-pg-500/50 data-[state=open]:text-pg-100",i&&"h-[50px] w-[50px] !rounded-none"),children:[e.children,(0,n.jsx)(N,{className:"bottom-0 right-0"})]})}),(0,n.jsx)(k._v,{children:"Notifications"})]})});function T(){let{mutate:e}=(0,g.kY)(),[t,r]=a.useState(!1),{data:i}=(0,g.ZP)("/api/notifications/list?limit=250&leaveUnread=true",m.S),o=a.useRef(null),s=(0,C.OV)("md"),l=(0,C.OV)("xs"),u=(0,S.y)("disabled-background-scroll-for-modals");return(0,n.jsxs)(w.h_,{modal:l||u,onOpenChange:async t=>{r(t),f().track(t?"Opened notifications dropdown":"Closed notifications dropdown"),t?o.current=setTimeout(async()=>{await y().get("/api/notifications/mark-all-read"),f().track("Viewed Notifications",{newDropdown:!0}),await e("/api/notifications/count",{optimisticData:{count_unread_notifications:0}})},500):o.current&&(clearTimeout(o.current),o.current=null)},children:[(0,n.jsx)(w.$F,{asChild:!0,children:(0,n.jsx)(L,{open:t,children:(0,n.jsx)(j.D,{className:"h-7 w-7"})})}),(0,n.jsxs)(w.AW,{sideOffset:s?12:8,className:(0,_.cn)("p-0"),align:"end",side:"top",children:[(0,n.jsx)(h.AD,{}),(0,n.jsx)(E.x,{ViewportProps:{className:"max-h-[calc(100vh_-_14rem)] xs:max-h-[calc(100vh_-_12.5rem)]"},children:(0,n.jsx)(h.uE,{initialData:i})})]})]})}function O(){let e=(0,x.useRouter)();return(0,n.jsxs)("div",{className:"flex border-l border-gray-85 h-full divide-x divide-gray-85",children:[(0,n.jsx)(p,{}),(0,n.jsx)(R,{}),"/notifications"===e.pathname?null:(0,n.jsx)(T,{})]})}function R(){return(0,n.jsxs)(o(),{href:"/feed",className:"items-center px-4 hover:bg-gray-90 text-sm text-gray-25 flex gap-1 font-pg-medium",children:[(0,n.jsx)(s,{})," ",(0,n.jsx)("span",{className:"max-lg:hidden",children:"Community"}),"Feed"]})}L.displayName="NotificationsButton"},21534:function(e,t,r){"use strict";var n=r(85893);r(67294);var i=r(18534),o=r.n(i),a=r(69306),s=r(51865),l=r(93123),u=r(54589),c=r(60422),d=r(41664),f=r.n(d),p=r(8891),h=r.n(p);function m(e){let{userId:t,userName:r,userImageUrl:i}=e;return(0,n.jsx)(f(),{href:`/profile/${t}`,className:"cursor-default",onClick:e=>{e.stopPropagation(),h().track("Clicked user link from list of users popup")},children:(0,n.jsxs)("div",{className:"flex p-4 items-center gap-3 border-b border-b-gray-85 hover:bg-gray-80",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)("img",{src:i,alt:"",className:"w-10 h-10 rounded-full object-cover cursor-pointer"})}),(0,n.jsx)("div",{className:"flex-grow",children:(0,n.jsx)("span",{className:"text-gray-5 text-sm font-pg-semibold cursor-pointer hover:underline hover:underline-offset-2 hover:decoration-[0.5px]",children:r})}),(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)(u.eg,{userId:t})})]})})}function g(e){let{trigger:t,children:r,...i}=e,u=(0,a.c0)(768);return(0,n.jsxs)(s.fC,{modal:!0,children:[(0,n.jsx)(s.xz,{asChild:!0,children:(0,n.jsx)("div",{...i,children:t})}),(0,n.jsxs)(s.h_,{children:[(0,n.jsx)(s.aV,{className:"fixed inset-0 backdrop-blur-[4px]",style:{zIndex:l.KN.TOASTS},children:(0,n.jsx)("div",{className:"bg-black opacity-50 w-full h-full",children:"\xa0"})}),(0,n.jsx)("div",{className:"fixed outline-none",style:{top:0,left:0,bottom:0,right:0,zIndex:l.KN.TOASTS},children:(0,n.jsx)("div",{className:"flex w-full h-full",children:(0,n.jsx)(s.VY,{className:`${o().Parent} m-auto flex flex-col border border-gray-85 bg-gray-90 text-gray-25 ${u?"w-[100vw] h-full max-h-[100vh] -mt-1":"w-[533px] max-w-[533px] max-h-[75vh] rounded-xl overflow-hidden"} select-none overscroll-contain animate-fade-in`,style:{filter:"drop-shadow(0px 0px 12px rgba(0, 0, 0, 0.25)) drop-shadow(0px 0px 24px rgba(0, 0, 0, 0.25))"},children:r})})})]})]})}t.Z=function(e){let{children:t,users:r,title:i,...o}=e,l=(0,a.c0)(768);return(0,n.jsx)(g,{trigger:t,...o,children:(0,n.jsxs)("div",{className:`flex flex-col ${l?"h-[100vh]":"max-h-[75vh]"}`,children:[(0,n.jsxs)("div",{className:"p-4 text-base font-pg-semibold text-gray-5 border-b border-b-gray-85 flex items-center",children:[(0,n.jsx)(s.Dx,{className:"flex-grow",children:i}),(0,n.jsx)(s.x8,{className:"flex-shrink-0 text-gray-50 hover:text-gray-25",children:(0,n.jsx)(c.Z,{width:24,height:24})})]}),(0,n.jsx)("div",{className:"w-full h-full overflow-y-auto",children:r.map((e,t)=>(0,n.jsx)(m,{...e},`user-card-${t}`))})]})})}},29338:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(85893),i=r(67294),o=r(32478),a=r(86010);function s(e){let{visible:t,children:r,classNames:s}=e,[l,u]=(0,i.useState)(!1);return l||!t?null:(0,n.jsxs)("div",{className:(0,a.Z)("bg-[#0F1D42] w-full flex justify-center max-lg:pr-8 items-center gap-1 text-sm py-3 lg:py-2 transition-transform z-30 min-h-[41px]",t?"translate-y-0 relative":"absolute -translate-y-full",s),children:[r,(0,n.jsx)("button",{type:"button",onClick:()=>{u(!0)},className:"absolute right-2 text-gray-10 p-0.5 hover:text-white rounded-full aspect-square flex items-center justify-center",children:(0,n.jsx)(o.Z,{height:18,width:18})})]})}},54589:function(e,t,r){"use strict";r.d(t,{eg:function(){return S},AD:function(){return O},uE:function(){return L}});var n=r(85893),i=r(11923),o=r(41664),a=r.n(o),s=r(67294),l=r(76607),u=r(18534),c=r.n(u),d=r(18957),f=r(8891),p=r.n(f),h=r(82449);function m(e){return(0,n.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9938 9.51715C14.0225 7.3096 10.7351 6.71577 8.26515 8.73723C5.79517 10.7587 5.44744 14.1384 7.38712 16.5293L15.9938 24.5L24.6006 16.5293C26.5403 14.1384 26.235 10.7374 23.7226 8.73723C21.2101 6.73704 17.9653 7.3096 15.9938 9.51715Z",fill:"#FF4D88"})})}function g(){return(0,n.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M16.0013 15.0026C18.3945 15.0026 20.3346 13.0625 20.3346 10.6693C20.3346 8.27604 18.3945 6.33594 16.0013 6.33594C13.6081 6.33594 11.668 8.27604 11.668 10.6693C11.668 13.0625 13.6081 15.0026 16.0013 15.0026Z",fill:"#7C6BFF"}),(0,n.jsx)("path",{d:"M9.13094 25.6641H22.8709C24.3935 25.6641 25.5663 24.3549 24.8553 23.0086C23.8093 21.0282 21.4249 18.6641 16.0009 18.6641C10.577 18.6641 8.1925 21.0282 7.14659 23.0086C6.43556 24.3549 7.60838 25.6641 9.13094 25.6641Z",fill:"#7C6BFF"})]})}var v=r(59820),y=r(9669),x=r.n(y),b=r(69306),w=r(21534),_=r(1233),j=r(17037),C=r(48563);function k(e){let{notificationType:t,element:r}=e;p().track("Clicked notification",{notificationType:t,element:r})}function E(e){let{imageUrl:t,imageId:r,userIds:i,userNames:o,userImageUrls:s,latestReactionCreatedAt:l,seenByUser:u,isLast:c}=e,f=(0,b.OV)("xs"),p=function(e){let{index:t}=e;return(0,n.jsx)(a(),{href:`/profile/${i[t]}`,className:"text-gray-5 font-pg-semibold hover:underline hover:underline-offset-2 hover:decoration-[0.5px]",onClick:e=>{k({notificationType:"reaction",element:"userName"})},children:o[t]})},h=function(e){let{index:t,key:r}=e;return(0,n.jsx)(a(),{href:`/profile/${i[t]}`,onClick:e=>{k({notificationType:"reaction",element:"userImage"})},children:(0,n.jsx)("img",{src:s[t],className:"w-8 h-8 rounded-full"})},r)};return(0,n.jsx)(a(),{href:`/post/${r}`,className:"cursor-default",onClick:e=>{k({notificationType:"reaction",element:"notification"})},children:(0,n.jsx)(T,{seenByUser:u,isLast:c,children:(0,n.jsxs)("div",{className:"p-3 flex gap-3 align-middle items-center",children:[(0,n.jsxs)("div",{className:"text-gray-25 flex flex-col gap-3 text-sm flex-grow",children:[s.length>1&&(0,n.jsxs)("div",{className:"w-full h-8 align-middle my-1 rounded-full overflow-hidden flex-shrink-0 flex gap-2.5",children:[(0,n.jsx)(m,{className:"mr-0.5"}),s.slice(0,f?4:6).map((e,t)=>(0,n.jsx)(h,{index:t},`reaction-user-image-${t}`))]}),(0,n.jsxs)("div",{className:"flex gap-3 text-sm",children:[1===s.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m,{className:"mr-0.5"}),(0,n.jsx)(h,{index:0},"reaction-user-image-0")]}):(0,n.jsx)("div",{className:"w-8 align-middle my-1 rounded-full overflow-hidden flex-shrink-0"}),(0,n.jsx)("div",{className:"flex-grow my-auto",children:(0,n.jsxs)("span",{className:"line-clamp-2 text-ellipsis",children:[(0,n.jsx)("span",{className:"mr-2",children:1===o.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p,{index:0})," liked your image."]}):2===o.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p,{index:0})," and ",(0,n.jsx)(p,{index:1})," liked your image."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p,{index:0})," and"," ",(0,n.jsx)(function(e){let{children:t}=e;return(0,n.jsx)("span",{onClick:e=>{e.preventDefault(),e.stopPropagation(),k({notificationType:"reaction",element:"userList"})},children:(0,n.jsx)(w.Z,{title:`${o.length} new likes`,className:"inline cursor-pointer text-gray-5 font-pg-semibold",users:o.map((e,t)=>({userId:i[t],userName:e,userImageUrl:s[t]})),children:t})})},{children:(0,n.jsxs)("span",{className:"hover:underline hover:underline-offset-2 hover:decoration-[0.5px]",children:[o.length-1," others"]})})," ","liked your image."]})}),(0,n.jsx)("span",{className:"text-gray-60 inline-block",title:`${new Date(l).toDateString()} ${new Date(l).toLocaleTimeString()}`,children:(0,d.mD)(new Date(l))})]})})]})]}),(0,n.jsx)("div",{className:"w-[48px] h-[48px] rounded-sm overflow-hidden flex-shrink-0",children:(0,n.jsx)(a(),{href:`/post/${r}`,onClick:e=>{k({notificationType:"reaction",element:"image"})},children:(0,n.jsx)("img",{src:t,className:"aspect-square object-cover"})})})]})})})}function S(e){let{userId:t}=e,r=`/api/notifications/isFollowingUser?userId=${t}`,{data:o,isLoading:a}=(0,v.ZP)(r,i.S),{mutate:l}=(0,v.kY)(),u=(0,s.useMemo)(()=>o?.isFollowingUser,[o]),c=s.useRef(Promise.resolve()),d=(0,s.useCallback)(async e=>{e.stopPropagation(),e.preventDefault(),k({notificationType:"follow",element:"followButton"}),p().track("Followed another user",{source:"notification"}),await l(r,null,{populateCache:()=>({isFollowingUser:!0}),revalidate:!1}),c.current=c.current.then(async()=>{await x().post("/api/friendships/create",{userId:t})})},[t,l,r]),f=(0,s.useCallback)(async e=>{e.stopPropagation(),e.preventDefault(),k({notificationType:"follow",element:"unfollowButton"}),p().track("Unfollowed another user",{source:"notification"}),await l(r,null,{populateCache:()=>({isFollowingUser:!1}),revalidate:!1}),c.current=c.current.then(async()=>{await x().post("/api/friendships/unfollow",{userId:t})})},[t,l,r]),[h,m]=(0,s.useState)(!1),[g,y]=(0,s.useState)(!1),b=(0,s.useMemo)(()=>h&&g,[h,g]);return(0,s.useEffect)(()=>{u||(m(!1),y(!1))},[u]),(0,n.jsx)("div",{className:`transition-opacity ${a?"opacity-0 pointer-events-none":""}`,children:u?(0,n.jsx)("button",{type:"button",className:`flex py-1.5 rounded-md text-sm font-pg-semibold w-[88px] border ${b?"border-pai-error-red !text-pai-error-red !bg-[rgba(255,77,136,0.2)]":"border-transparent cursor-default"}`,style:{color:"rgba(133, 113, 255, 1)",background:"rgba(133, 113, 255, 0.28)"},onClick:f,onMouseEnter:()=>y(!0),onMouseLeave:()=>{m(!0),y(!1)},children:(0,n.jsx)("span",{className:"m-auto",children:b?"Unfollow":"Following"})}):(0,n.jsx)("button",{type:"button",className:"bg-purple-primary1 hover:bg-purple-primary text-white text-sm font-pg-semibold flex py-1.5 px-4 rounded-md items-center gap-2 disabled:opacity-56 w-[88px]",onClick:d,children:(0,n.jsx)("span",{className:"m-auto",children:"Follow"})})})}function N(e){let{userName:t,userId:r,userImageUrl:i,followCreatedAt:o,seenByUser:s,isLast:l}=e;return(0,n.jsx)(a(),{href:`/profile/${r}`,className:"cursor-default",onClick:e=>{k({notificationType:"follow",element:"notification"})},children:(0,n.jsx)(T,{seenByUser:s,isLast:l,children:(0,n.jsxs)("div",{className:"p-3 text-gray-25 flex gap-3 text-sm",children:[(0,n.jsx)("div",{className:"w-8 h-8 align-middle my-1 rounded-full overflow-hidden flex-shrink-0",children:(0,n.jsx)(g,{})}),(0,n.jsx)("div",{className:"w-8 h-8 align-middle my-1 rounded-full overflow-hidden flex-shrink-0",children:(0,n.jsx)(a(),{href:`/profile/${r}`,onClick:e=>{k({notificationType:"follow",element:"userImage"})},children:(0,n.jsx)("img",{src:i})})}),(0,n.jsx)("div",{className:"flex-grow my-auto",children:(0,n.jsxs)("span",{className:"line-clamp-2",children:[(0,n.jsxs)("span",{className:"mr-2",children:[(0,n.jsx)("span",{className:"text-gray-5 font-pg-semibold cursor-pointer hover:underline hover:underline-offset-2 hover:decoration-[0.5px]",onClick:e=>{k({notificationType:"follow",element:"userName"})},children:t})," ","started following you."]}),(0,n.jsx)("span",{className:"text-gray-60 inline-block",title:`${new Date(o).toDateString()} ${new Date(o).toLocaleTimeString()}`,children:(0,d.mD)(new Date(o))})]})}),(0,n.jsx)("div",{className:"flex-shrink-0 my-auto",children:(0,n.jsx)(S,{userId:r})})]})})})}function P(e){let{userName:t,userId:r,userImageUrl:i,numberOfImages:o,time:s,seenByUser:l,isLast:u}=e;return(0,n.jsx)(a(),{href:`/profile/${r}`,className:"cursor-default",onClick:e=>{k({notificationType:"drive-by",element:"notification"})},children:(0,n.jsx)(T,{seenByUser:l,isLast:u,children:(0,n.jsxs)("div",{className:"p-3 text-gray-25 flex gap-3 text-sm",children:[(0,n.jsx)("div",{className:"w-8 h-8 align-middle my-1 rounded-full overflow-hidden flex-shrink-0",children:(0,n.jsx)(m,{})}),(0,n.jsx)("div",{className:"w-8 h-8 align-middle my-1 rounded-full overflow-hidden flex-shrink-0",children:(0,n.jsx)(a(),{href:`/profile/${r}`,onClick:e=>{k({notificationType:"follow",element:"userImage"})},children:(0,n.jsx)("img",{src:i})})}),(0,n.jsx)("div",{className:"flex-grow my-auto",children:(0,n.jsxs)("span",{className:"line-clamp-2",children:[(0,n.jsxs)("span",{className:"mr-2",children:[(0,n.jsx)("span",{className:"text-gray-5 font-pg-semibold cursor-pointer hover:underline hover:underline-offset-2 hover:decoration-[0.5px]",onClick:e=>{k({notificationType:"follow",element:"userName"})},children:t})," ","liked ",o," of your images."]}),(0,n.jsx)("span",{className:"text-gray-60 inline-block",title:`${new Date(s).toDateString()} ${new Date(s).toLocaleTimeString()}`,children:(0,d.mD)(new Date(s))})]})}),(0,n.jsx)("div",{className:"flex-shrink-0 my-auto",children:(0,n.jsx)(S,{userId:r})})]})})})}function L(e){let{initialData:t,fullPage:r=!1}=e,{data:o,isLoading:a,setSize:u}=(0,l.ZP)((e,t)=>{let r=t?.pagination?.nextCursor;return e&&r?`/api/notifications/list?limit=250&leaveUnread=true&cursor=${r}`:0===e?"/api/notifications/list?limit=250&leaveUnread=true":null},i.S),d=s.useMemo(()=>{if(o&&o.length)return o[o.length-1].pagination?.nextCursor},[o]);(0,s.useEffect)(()=>{null===d&&p().track("Loaded all notifications")},[d]);let[f,m]=s.useState(0),g=(0,s.useCallback)(()=>{!f&&(a||d)&&(m(e=>e+1),p().track("Reached bottom of notifications dropdown and triggered loading more"),u(e=>e+1).then(()=>m(e=>e-1)))},[u,f,m,a,d]),v=s.useCallback(e=>{let t=e.target;1>Math.abs(t.scrollHeight-t.scrollTop-t.clientHeight)&&g()},[g]),y=s.useMemo(()=>{let e=o||t;if(!e||!e.length)return[];let r=[],n=[],i=e=>{if("reaction"===e.notificationType){let t=n.find(t=>"drive-by"===t.notificationType&&t.userId===e.userId);t?((0,h.assert)("drive-by"===t.notificationType),t.numberOfImages++):n.push({notificationType:"drive-by",userName:e.userName,userId:e.userId,userImageUrl:e.userImageUrl,numberOfImages:1,time:e.notificationCreatedAt,seenByUser:e.seenByUser});let r=n.find(t=>"reaction"===t.notificationType&&t.imageId===e.imageId);r?((0,h.assert)("reaction"===r.notificationType),r.userIds.push(e.userId),r.userNames.push(e.userName),r.userImageUrls.push(e.userImageUrl)):n.push({notificationType:"reaction",imageUrl:e.imageUrl,imageId:e.imageId,userIds:[e.userId],userNames:[e.userName],userImageUrls:[e.userImageUrl],latestReactionCreatedAt:e.notificationCreatedAt,seenByUser:e.seenByUser})}else"follow"===e.notificationType&&n.push({notificationType:"follow",userName:e.userName,userId:e.userId,userImageUrl:e.userImageUrl,followCreatedAt:e.notificationCreatedAt,seenByUser:e.seenByUser})},a=()=>{let e={},t=[];for(let r of n){if(["reaction","follow"].includes(r.notificationType)){t.push(r);continue}if((0,h.assert)("drive-by"===r.notificationType),r.numberOfImages>=5){t.push(r),e[r.userId]=r;continue}}t=t.filter(t=>!!["follow","drive-by"].includes(t.notificationType)||((0,h.assert)("reaction"===t.notificationType),t.userIds.length>1||!e[t.userIds[0]])),r.push(...t),n=[]};for(let{data:t}of e){let e=null;for(let r of t){if(e){if(!e.seenByUser&&r.seenByUser)a();else{let t=new Date(e.notificationCreatedAt),n=new Date(r.notificationCreatedAt),i=Date.now()-t.getTime(),o=t.getTime()-n.getTime();(i>36e5&&o>i||i<=36e5&&o>36e5)&&a()}}i(r),e=r}}return a(),r},[o,t]),[x,w]=(0,s.useState)(0);(0,s.useEffect)(()=>{y.length!==x&&(w(y.length),y.length<25&&g())},[y.length,x,g]);let C=(0,s.useRef)(null),k=(0,j.Y)(C,{margin:"0px 0px 0px 0px"});(0,s.useEffect)(()=>{k&&!a&&d&&g()},[k,a,g,d]);let S=(0,b.OV)("md");return(0,n.jsxs)("div",{className:(0,_.cn)(c().Parent,"flex flex-col h-full select-none animate-fade-in",S?"w-full h-full max-h-[calc(100vh-50px)] -mt-1":r?"max-w-2xl h-[calc(100vh-112px)] m-auto":"w-[434px] max-w-[434px] max-h-[90vh]"),onScroll:v,onClick:e=>{e.ctrlKey||e.metaKey||document.dispatchEvent(new KeyboardEvent("keydown",{altKey:!1,code:"Escape",ctrlKey:!1,isComposing:!1,key:"Escape",location:0,metaKey:!1,repeat:!1,shiftKey:!1,which:27,charCode:0,keyCode:27}))},children:[o&&!!y.length&&y.map((e,t)=>{let r=t===y.length-1;return"reaction"===e.notificationType?(0,n.jsx)(E,{...e,isLast:r},`notification-${t}`):"follow"===e.notificationType?(0,n.jsx)(N,{...e,isLast:r},`notification-${t}`):(0,n.jsx)(P,{...e,isLast:r},`notification-${t}`)}),!(a||d)&&(!o||!y.length)&&(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center text-gray-25 mt-1 leading-5 tracking-[0.14px]",children:[(0,n.jsxs)("div",{className:"py-6 text-center w-full",children:[(0,n.jsx)("div",{className:"text-base text-gray-5 font-pg-semibold",children:"No notifications"}),(0,n.jsx)("div",{className:"text-sm text-gray-50 font-pg-medium mt-1",children:"No new notifications at the moment"})]}),(0,n.jsx)("div",{className:"relative",children:(0,n.jsx)("video",{className:"rounded-sm overflow-hidden mt-0.5 relative w-[304px]",muted:!0,playsInline:!0,autoPlay:!0,loop:!0,children:(0,n.jsx)("source",{src:"https://cdn.playground.com/tooltips/notifications-empty-state.mp4",type:"video/mp4"})})}),(0,n.jsx)("div",{className:"p-6 text-center",children:(0,n.jsx)("div",{className:"text-sm text-gray-50 font-pg-medium mt-1",children:"In the meantime, browse through our community creations and show some love."})})]}),(0,n.jsx)("div",{ref:C}),(a||!!d)&&(0,n.jsx)("div",{className:"flex justify-center items-center text-gray-25 p-3 mt-1",children:"Loading..."}),S&&(0,n.jsx)("div",{className:"min-h-full overflow-hidden",children:(0,n.jsx)("div",{className:"h-[100vh]",children:"\xa0"})})]})}function T(e){let t=e.seenByUser;return(0,n.jsx)("div",{className:(0,_.cn)("p-1",!e.isLast&&"border-b border-border"),children:(0,n.jsx)("div",{className:(0,_.cn)({"p-1 rounded-pg-base hover:bg-pg-500 group":!0,"bg-primary/20 hover:bg-primary/40":!t}),children:e.children})})}function O(){let e=(0,C.K)(),t=e>0?e.toLocaleString("en-US"):e;return(0,n.jsxs)("div",{className:"flex flex-row text-sm font-pg-semibold px-4 py-3 border-b border-b-border sticky top-0 z-10 bg-pg-700",children:[(0,n.jsx)("h3",{className:"",children:"Notifications"}),(0,n.jsx)("div",{className:"flex-grow"}),(0,n.jsx)("div",{className:"text-purple-primary font-pg-normal",children:(0,n.jsx)(a(),{href:"/notifications",legacyBehavior:!0,children:`Show all ${t?`(${t})`:""}`})})]})}},32622:function(e,t,r){"use strict";r.d(t,{r:function(){return h}});var n=r(85893),i=r(93123),o=r(32478),a=r(67294),s=r(45697),l=r.n(s);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var c=(0,a.forwardRef)(function(e,t){var r=e.color,n=e.size,i=void 0===n?24:n,o=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["color","size"]);return a.createElement("svg",u({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:void 0===r?"currentColor":r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),a.createElement("circle",{cx:"12",cy:"12",r:"10"}),a.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),a.createElement("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))});c.propTypes={color:l().string,size:l().oneOfType([l().string,l().number])},c.displayName="AlertCircle";var d=r(33299),f=r(44746),p=r(40302);function h(){let e=(0,d.useSession)(),[t,r]=(0,a.useState)(!1),s=(0,f.s4)()?"Turbo":"Pro";return((0,a.useEffect)(()=>{let t=e?.data?.user?.subscriptions;t&&t.some(e=>"past_due"===e.stripeStatus)&&r(!0)},[e]),t)?(0,n.jsx)("div",{className:`z-[${i.KN.PAST_DUE_BANNER}] flex justify-center text-white text-sm font-medium absolute top-0 w-full bg-purple-primary1 p-2 h-[51px]`,id:"notif-banner",children:(0,n.jsxs)("div",{className:"flex flex-grow-0 items-center justify-center gap-2 mr-10 md:mr-0",children:[(0,n.jsx)(c,{size:20}),(0,n.jsxs)("div",{children:["Your payment method could not be charged.",(0,n.jsx)("span",{className:"hidden sm:inline",children:` You may lose access to ${s}.`})]}),(0,n.jsx)("button",{className:"text-purple-primary1 px-4 py-1 ml-2 rounded-full bg-white bg-opacity-100 hover:bg-opacity-90 text-xs md:text-sm",type:"button",onClick:async()=>{try{let e=await (0,p.A)();window.location.assign(e)}catch(e){console.error("Could not create portal link",e),window.location.assign("/pricing")}},children:"Update payment"}),(0,n.jsx)("button",{type:"button",className:"absolute right-2 hover:text-gray-10",onClick:()=>r(!1),children:(0,n.jsx)(o.Z,{})})]})}):null}},87536:function(e,t,r){"use strict";r.d(t,{s:function(){return es}});var n=r(85893),i=r(67294),o=r(11163),a=r(1233),s=r(13346),l=r(74371),u=r(23659),c=r(96486),d=r.n(c),f=r(95295),p=r(35362),h=r(15696),m=r(35758),g=r(26440),v=r(75266),y=r(44746),x=r(33299),b=r(69306),w=r(49296),_=r(25675),j=r.n(_),C=r(32949),k=r(63518),E=r(94670),S=r(46825),N=r(6894),P=r(46302),L=r(17701),T=r(67539),O=r(97797),R=r(73751),A=r(51879),I=r(158),M=r(92323),D=r(18794),F=r(68450),z=r(8891),B=r.n(z);function U(e){let{selectedFilter:t,filters:r,updateImageOptions:o,handleInitImageDelete:s,imageOptions:l,searchRef:c,query:d,setQuery:f,close:p,disabledIds:h,isSelectingNewPin:m}=e,g=(0,i.useRef)(null),v=(0,i.useRef)(null),{setNegativePromptSetting:x}=(0,u.vX)(),{isModalOpen:_}=(0,M.d)(),[j,E]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=e=>{"Escape"!==e.key||_||(document.activeElement&&"pai-board-filters-search-input"===document.activeElement.id&&document.activeElement.blur(),p())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[p,_]),(0,i.useEffect)(()=>{E(r.findIndex(e=>e===t))},[r,t]),(0,w.p)(g,e=>{"filter-select-button"!==e.target.id&&p()}),(0,b.OV)("lg");let N=(0,i.useMemo)(()=>r.filter(e=>!d||e.name.toUpperCase().includes(d.toUpperCase())),[r,d]),O=(0,L.E)(),D=(0,P.b0)({isPlaygroundv2dot5:l.modelType===S.Hn.PLAYGROUND_V2_5}),z=(0,y.sA)(),U=(0,I.d)()>0,V=(0,R.n)("Upgrade to Pro for unlimited use of Photorealism",`You've reached your limit of ${A.Sq.FREE.photorealismGensPerMonthLimit} uses of this filter. Upgrade to Pro to unlock unlimited generations.`);function H(e){return z||U||"photorealism"!==e.id?!!m||(!function(e,t){let{updateImageOptions:r,imageOptions:n,filters:i,handleInitImageDelete:o,setNegativePromptSetting:a,maxSteps:s,availableSchedulers:l}=t;r("filter")(e.id),B().track("Filter selected",{filter:e.id,source:"board",unifiedUX:!0});let u=i.find(e=>e.id===n.filter);u&&(0,T.k)(u.id,{cfgScale:n.cfg_scale,steps:n.steps,schedulerKey:void 0!==n.sampler?P.HH.fromSamplerId(n.sampler)?.key:void 0});let c=(0,T.l)(),d=void 0!==c&&e.id in c?c[e.id]:void 0;if("cfg_scale"in e&&void 0!==e.cfg_scale){let t=d?.cfgScale??e.cfg_scale;r("cfg_scale")(t),(0,T.k)(e.id,{cfgScale:t})}if("steps"in e&&void 0!==e.steps){let t=Math.min(s,d?.steps??e.steps);r("steps")(t),console.log("steps-filter-dropdown",1),(0,T.k)(e.id,{steps:t})}if("scheduler_key"in e&&void 0!==e.scheduler_key){let t=d?.schedulerKey??e.scheduler_key;if(l.map(e=>e.key).includes(t)){let n=P.HH.fromKey(t).samplerId;r("sampler")(n),(0,T.k)(e.id,{schedulerKey:t})}}let f=n?.negativePrompt??"",p=u?.negativePrompt??"",h=f.replace(p,"");(h=h.trim()).startsWith(",")&&(h=h.slice(1)),h.endsWith(",")&&(h=h.slice(0,-1)),0===(h=h.trim()).length?h=e.negativePrompt??"":e.negativePrompt&&(h=`${h}, ${e.negativePrompt??""}`),h!==f&&((0,k.K)("pai:negative-prompts:focus",{negativePrompt:h,focus:!1,forceOpen:!!e.negativePrompt}),r("negativePrompt")(h)),"dream_booth_model"in e&&n.mask_image&&o()}(e,{handleInitImageDelete:s,imageOptions:l,filters:r,updateImageOptions:o,setNegativePromptSetting:x,maxSteps:O,availableSchedulers:D}),p(),!0):(V(),!1)}let Z=(0,i.useRef)(null);return(0,n.jsxs)("div",{className:(0,a.cn)("scrollbar-hide h-full z-50 transition-[transform,opacity] duration-75 opacity-100"),children:[(0,n.jsx)(F.xp,{ref:Z,hidden:!0}),(0,n.jsx)("div",{className:"w-full absolute z-50 items-center space-y-2",children:(0,n.jsxs)("div",{className:"relative m-2",children:[(0,n.jsx)("input",{type:"text",autoComplete:"off",autoCorrect:"off",id:"pai-board-filters-search-input",ref:c,placeholder:"Search filters",value:d,onKeyDown:e=>{let t=window.getComputedStyle(v.current).getPropertyValue("grid-template-columns").split(" ").length,r=(j||0)%t,n=Math.floor((j||0)/t),i=r,o=n;"ArrowDown"===e.key?o+=1:"ArrowUp"===e.key?o-=1:"ArrowRight"===e.key?i+=1:"ArrowLeft"===e.key&&(i-=1);let a=o*t+i;a>=0&&a<N.length?(E(a),(i!==r||o!==n)&&e.preventDefault()):a<0?E(0):a>=N.length&&E(N.length-1),"Enter"===e.key&&(H(N[a])&&(Z.current?.click(),p()),e.preventDefault(),e.stopPropagation())},onChange:e=>{f(e.target.value)},className:"input pai-border w-full rounded-lg bg-gray-95 p-2 pl-8 outline-none"}),(0,n.jsx)("span",{className:"absolute left-2 top-2.5 text-gray-500",children:(0,n.jsx)(C.Z,{})})]})}),(0,n.jsx)("div",{className:"h-30 lg:h-[56px]"}),0===N.length&&(0,n.jsxs)("p",{className:"p-3 text-gray-400",children:["No filters matching ",(0,n.jsxs)("span",{className:"text-white",children:["“",d,"”"]})]}),(0,n.jsx)("div",{"data-testid":"filter-select",ref:v,className:"grid grid-cols-3 gap-2 p-2 sm:grid-cols-4 lg:grid-cols-4 max-h-[400px] overflow-y-scroll",children:N.map((e,r)=>(0,n.jsx)($,{i:r,filter:e,isPotential:j===r,isCurrent:t.id===e.id,disabled:h?.includes(e.id),onClick:()=>{H(e)&&p()},modelType:l.modelType,isProFilter:e.is_pro},e.name))})]})}function V(e,t){return e?e.startsWith("https")?e:`https://cdn.playground.com/filters/${e}`:t?"https://cdn.playground.com/filters/no_filter.svg":""}function $(e){let{filter:t,isCurrent:r,isPotential:i,onClick:o,i:s,disabled:l,hideLabel:u,modelType:c,isProFilter:d}=e,f=t.name,p=t.thumbnail_file,h=u?"":f,m=(0,D.cd)(),g=(0,n.jsxs)(F.xp,{type:"button",disabled:l,className:(0,a.cn)("filter-button disabled:pointer-events-none relative origin-center overflow-hidden rounded-xl border group transition-[transform,opacity] duration-200 disabled:opacity-20",`active:border-purple-primary1/50 lg:h-[100px] lg:w-[120px] max-lg:aspect-[6/5] ${r?"border-purple-primary1":i?"border-transparent shadow-[0px_0px_0px_3px_#ffffff2b]":"hover:border-gray-75 border-gray-85"}`),"aria-label":"Select filter style: "+f,style:{transitionDelay:10*s+"ms"},"data-testid":"filter-select-option","data-label":f,onClick:o,children:[p?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j(),{src:V(p),alt:f,loader:e=>{let{src:t}=e;return t},fill:!0,sizes:"100vw",style:{objectFit:"cover"}}),!m&&(0,n.jsx)(N.Z,{filter:t,model:c}),!l&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:`absolute inset-0 flex flex-col justify-end gap-1
                pl-1.5 pb-1.5 p-0.5 text-left text-sm via-black/40 bg-gradient-to-t from-black/90`,children:[d&&(0,n.jsx)(O.t1,{}),h]})})]}):(0,n.jsx)("div",{className:"absolute inset-0 flex rounded-lg items-end pl-1.5 pb-1.5 p-0.5 text-sm bg-black",children:h}),r&&(0,n.jsx)("div",{className:"absolute right-2 top-2 flex h-4 w-4 items-center justify-center rounded-full bg-pai-blue text-gray-90",children:(0,n.jsx)("svg",{className:"mt-[1px]",fill:"none",height:"10",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",viewBox:"0 0 24 24",width:"10",children:(0,n.jsx)("path",{d:"M20 6L9 17l-5-5"})})})]},f);return u?(0,n.jsx)(E.u,{label:f,color:"white",placement:"top",children:g}):g}var H=r(80980),Z=r(10443);function W(e){return(0,n.jsx)(j(),{src:r(44290),alt:"Select a filter",width:22,height:21,...e,style:{maxWidth:"100%",height:"auto"}})}var q=r(20835),G=r(24581);function Y(e){let{isOpen:t,setIsOpen:r,onClose:o,selectedFilter:l,filters:u,updateImageOptions:c,handleInitImageDelete:d,imageOptions:f}=e,p=(0,i.useRef)(null),[m,g]=(0,i.useState)(""),v=(0,b.r$)(),y=(0,G.s)(),x=(0,i.useCallback)(e=>{if(r(!0),e?.detail?.filterId){let t=u.find(t=>t.id===e.detail.filterId);if(t){c("filter")(t.id);let e=document.querySelector(`button[data-testid='filter-select-option'][data-label='${t.name}']`);e?.parentElement?.parentElement?.scrollTo({behavior:"smooth",top:e.offsetTop-e.clientHeight-10})}}else v||y||setTimeout(()=>{p.current?.focus()},300)},[r,v,y,u,c]),w=(0,i.useCallback)(function(){let{queryTimeout:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{queryTimeout:500};r(!1),o?.(),setTimeout(()=>{g("")},e)},[r,o]),_=(0,i.useRef)(null),j=(0,h.cK)();return(0,k.Z)("pai:filters:open",()=>{j&&_.current?.click()}),(0,n.jsx)(q.I,{children:(0,n.jsxs)(F.J2,{onOpenChange:e=>{e?x():w(),B().track(`Filter dropdown ${e?"opened":"closed"}`,{source:"board"})},children:[(0,n.jsx)(F.xo,{asChild:!0,children:(0,n.jsxs)(s.z,{className:(0,a.cn)("shrink-0 rounded-pg-sm bg-pg-500/50 w-[40px] h-[40px] shadow-sm overflow-hidden flex items-center justify-center","hover:shadow-none transition-all duration-50 ease-in",l.id===Z.$p.id?"hover:bg-pg-500":"hover:opacity-75"),size:"icon",type:"button",onClick:()=>r(!t),ref:_,"data-testid":"filter-select-trigger","data-value":l.id,children:[l.id===Z.$p.id&&(0,n.jsx)("div",{className:"h-10 w-10 flex items-center justify-center border-sm",children:(0,n.jsx)(W,{})}),l.thumbnail_file&&(0,n.jsx)("img",{src:V(l.thumbnail_file),alt:"",className:"object-cover w-full h-full"})]})}),l.tip&&(0,n.jsx)(H.Z,{className:"mt-4",tip:l.tip}),(0,n.jsx)(F.yk,{className:(0,a.cn)("p-0 w-auto min-w-[400px] md:max-w-2xl"),align:"start",side:"bottom",sideOffset:18,alignOffset:-8,onOpenAutoFocus:e=>{e.preventDefault()},children:(0,n.jsx)(U,{selectedFilter:l,filters:u,updateImageOptions:c,handleInitImageDelete:d,imageOptions:f,searchRef:p,query:m,setQuery:g,open:x,close:w})})]})})}var K=r(76581),X=r(78603),J=r(85821),Q=r(47922),ee=r(46192);function et(e){var t;let{children:r,className:i,withActionKey:o=!1}=e;return(0,n.jsx)(q.I,{children:(0,n.jsx)("kbd",{className:(0,a.cn)("bg-pg-500 text-pg-300","text-sm font-mono font-bold px-2 py-1 leading-[0px] h-6","flex items-center rounded",i),children:(t={withActionKey:o},ee.eE?t?.withActionKey?`⌘ ${r}`:`${r}`:ee.ED?t?.withActionKey?`Ctrl ${r}`:`${r}`:r)})})}var er=r(1679);function en(e){return(0,n.jsx)(j(),{src:r(9875),alt:"Describe Image",width:22,height:21,...e,style:{maxWidth:"100%",height:"auto"}})}function ei(){let{setPromptLoading:e,handleUploadDescribeImage:t,describeImageDataURL:r,setDescribeImageDataURL:i,describeImageAbortController:o}=(0,u.vX)();return(0,k.Z)("paste",e=>{let r=e.clipboardData?.items;if(r&&r.length)for(let e of r){if(!e.type.startsWith("image/"))continue;let r=e.getAsFile();if(r){t(r);break}}}),(0,n.jsxs)("div",{children:[!r&&(0,n.jsxs)(K.u,{children:[(0,n.jsx)(K.aJ,{children:(0,n.jsx)("div",{children:(0,n.jsxs)("label",{className:(0,a.cn)("shrink-0 rounded-pg-sm bg-pg-500/50 w-[40px] h-[40px] shadow-sm overflow-hidden flex items-center justify-center","hover:shadow-none transition-all duration-50 ease-in","hover:bg-pg-500 hover:cursor-pointer"),children:[(0,n.jsx)("input",{className:"hidden",value:"",type:"file",accept:"image/*",onChange:e=>{e.target.files&&t(e.target.files[0])}}),(0,n.jsx)(en,{})]})})}),(0,n.jsx)(K._v,{sideOffset:12,children:"Describe image"})]}),r&&(0,n.jsxs)("div",{className:"flex items-center gap-3 hover:cursor-default",children:[(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("img",{className:"w-auto h-[40px] rounded-pg-sm bg-pg-500/50 shadow-sm overflow-hidden object-contain",src:r,alt:"uploaded"}),(0,n.jsx)("div",{className:"absolute -top-2 -right-2 w-min h-min",children:(0,n.jsx)(s.z,{className:"h-4 w-4 m-0 p-0 bg-pg-500/80",size:"iconSm",variant:"delete",onClick:()=>{o.current?.abort(),e(!1),i(null)},children:(0,n.jsx)(er.T,{className:"text-gray-50 text-[8px]"})})})]}),(0,n.jsx)("div",{className:"animate-pulse text-base text-pg-300 font-pg-medium",children:"Describing the image..."})]})]})}var eo=r(32178),ea=r(79134);function es(){let[e,t]=(0,i.useState)(""),[r,s]=(0,i.useState)(!1),c=(0,o.useRouter)(),{setShowSidebars:b}=(0,l.Z)(),{}=(0,J.A)(),w=(0,u.vX)(),{generateImage:_,imageOptions:j,updateImageOptions:C,buttonTimeoutUntil:k,filters:E,filterStyle:S,generateButtonRef:N,promptBoxRef:P,isFocused:L,setIsFocused:T,handleUploadDescribeImage:O,promptLoading:R}=w,{isDisabled:A,canSimultaneouslyGenerate:I,imagesRemaining:M}=(0,f.Z)(w,j.prompt,k),D=(0,y.sA)(),F=(0,x.useSession)(),z=(0,h.cK)(),B=(0,G.s)();(0,Q.y)("prompt-box-kbd");let U=(0,i.useMemo)(()=>d().debounce(e=>{C("prompt")(e)},500,{leading:!0,trailing:!1}),[C]);(0,i.useEffect)(()=>{j.prompt!==e&&t(j.prompt)},[j.prompt,U,e]),function(){let{generateButtonRef:e,promptBoxRef:t,isFocused:r}=(0,u.vX)();(0,p.i)(n=>{"Enter"===n.key&&(0,g.Z)(n)&&e.current?.click(),"Escape"===n.key&&t.current?.blur(),"p"===n.key&&(0,g.Z)(n)&&!r&&(n.preventDefault(),t.current?.focus())},{force:!0}),(0,p.i)(e=>{"p"===e.key&&(e.preventDefault(),t.current?.focus()),"f"!==e.key||(0,g.Z)(e)||(e.preventDefault(),document.dispatchEvent(new CustomEvent("pai:filters:open")))})}();let{width:V}=(0,X.e)();(0,i.useEffect)(()=>{P.current&&(P.current.style.height="auto",P.current.style.height=`${Math.min(P.current.scrollHeight,160)}px`)},[P,V,e]);let $=window.navigator.platform.toUpperCase().includes("MAC")?"⌘ Enter":"Ctrl + Enter",[H]=(0,eo.I)(ea.M9,!1);return(0,n.jsx)("div",{className:(0,a.cn)("flex items-center relative transition-all duration-layout-speed ease-in-out",R?"cursor-default":"cursor-text"),children:(0,n.jsxs)("div",{className:(0,a.cn)("flex items-end w-full flex-row gap-2 px-2"),children:[(0,n.jsxs)("div",{className:"py-2 flex gap-1",children:[!H&&(0,n.jsxs)(K.u,{children:[(0,n.jsx)(K.aJ,{children:(0,n.jsx)(Y,{isOpen:r,setIsOpen:s,selectedFilter:S,filters:E,updateImageOptions:C,handleInitImageDelete:()=>{},imageOptions:j})}),(0,n.jsx)(K._v,{sideOffset:12,children:"Filters"})]}),(0,n.jsx)(ei,{})]}),(0,n.jsxs)("div",{className:(0,a.cn)("relative flex-grow self-center py-1"),onClick:()=>P.current?.focus(),children:[(0,n.jsx)("div",{className:(0,a.cn)("absolute inset-0 pointer-events-none","transition-height duration-150 ease-in-out","flex-grow-0","cursor-text placeholder:textg-pg-300 font-pg-medium flex-grow min-w-[10px] w-[100%] resize-none","bg-transparent outline-none text-base invisible select-none","no-scrollbar","pt-2"),children:e.split("\n").map((e,t)=>(0,n.jsx)("div",{children:e||(0,n.jsx)("br",{})},t))}),(0,n.jsx)("textarea",{"data-testid":"prompt-input",autoComplete:"off",ref:P,rows:1,onChange:e=>{t(e.target.value),U(e.target.value),P.current&&(P.current.style.height="auto",P.current.style.height=`${Math.min(P.current.scrollHeight,160)}px`)},className:(0,a.cn)("relative z-10","transition-height duration-150 ease-in-out","flex-grow-0","cursor-text placeholder:text-pg-300 font-pg-medium flex-grow min-w-[10px] w-[100%] resize-none","bg-transparent outline-none text-base","placeholder:text-center focus:placeholder:text-left","no-scrollbar","selection:bg-selection","pt-1",R&&"hidden"),placeholder:"Describe your image, get playful",value:e,onBlur:()=>{T(!1),r||requestAnimationFrame(()=>{"/create"!==m.X.getState()&&b(!1)})},onFocus:()=>{b(!0),T(!0)}}),!R&&!j.prompt?.trim()&&!L&&(0,n.jsx)(et,{className:"absolute right-2 bottom-2",withActionKey:!0,children:"P"})]}),(0,n.jsxs)(K.u,{children:[(0,n.jsx)(K.aJ,{asChild:!0,children:(0,n.jsx)("div",{className:"py-2 flex-shrink-0 cursor-default",onClick:()=>{I||v._.showKnownError("SIMULTANEOUS_GENS_DISABLED",{isPaidPlan:D,session:F.data,errBody:`You can only generate ${M} more images. Generating images simultaneously has been disabled.`,type:"warning"})},children:(0,n.jsx)(el,{generateButtonRef:N,isDisabled:A,isOnCreate:z,runCreate:()=>{if(b(!0),e.length>0&&_({variants:!1,override:{prompt:e}}),"/create"!==c.pathname)return c.push("/create");B&&setTimeout(()=>{P.current?.blur()},200)}})})}),(0,n.jsx)(K._v,{children:$})]})]})})}let el=e=>{let{generateButtonRef:t,isDisabled:r,isOnCreate:i,runCreate:o}=e;return(0,n.jsx)(s.z,{"data-testid":"generate-button",ref:t,size:"lg",variant:"create",type:"button",onClick:e=>{i&&(e.preventDefault(),e.stopPropagation(),o())},disabled:r&&i,className:(0,a.cn)("z-20 pointer-events-all items-center self-end transition-all duration-150 ease-in-out px-3 lg:px-6",r&&i&&"cursor-default pointer-events-auto","px-3 lg:px-6"),children:"Create"})}},39163:function(e,t,r){"use strict";r.d(t,{X:function(){return c}});var n=r(85893),i=r(13346),o=r(76581);function a(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M14 4v6h6M4 14h6v6M4 20l5.5-5.5m5-5L20 4"})})}var s=r(41026),l=r(1233),u=r(85821);function c(){let{rightSidebarOpen:e,toggle:t}=(0,u.A)();return(0,n.jsx)("div",{className:(0,l.cn)("items-center relative rounded-pg-md overflow-hidden shrink-0","prompt-box-shadow"),children:(0,n.jsxs)(o.u,{children:[(0,n.jsx)(o.aJ,{asChild:!0,children:(0,n.jsx)(i.z,{className:(0,l.cn)("h-14 w-14 self-end p-1"),type:"button",variant:"fab",onClick:()=>t(),children:e?(0,n.jsx)(s.Z,{}):(0,n.jsx)(a,{})})}),(0,n.jsx)(o._v,{children:e?"Close advanced settings":"Open advanced settings"})]})})}},61116:function(e,t,r){"use strict";r.d(t,{a:function(){return i}});var n=r(85893);function i(){return(0,n.jsx)("div",{className:"inset-0 absolute shadow-[inset_0_1px_1px_rgba(0,0,0,0.6)] shadow-pg-400/50 -z-10 bg-pg-700",style:{borderRadius:"inherit"}})}r(67294)},17402:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(85893),i=r(62469),o=r(51879),a=r(8891),s=r.n(a),l=r(67294);function u(){let[e,t]=(0,l.useState)(!1);return(0,l.useEffect)(()=>void p().then(t),[]),(0,n.jsxs)("div",{className:"w-full flex flex-col space-between pt-8 h-[630px] md:h-[500px]",children:[(0,n.jsxs)("div",{className:"w-full mx-auto px-8 flex flex-col md:flex-row justify-between items-center",children:[(0,n.jsx)("div",{className:"flex self-center md:self-start mb-6 md:mb-0 md:mr-16",children:(0,n.jsx)("img",{src:"/logos/logo-icon.png",alt:"Logo",className:"h-8 w-8"})}),(0,n.jsxs)("div",{className:"flex flex-col md:flex-row md:space-x-16 mt-0 md:mt-8 md:mr-8 w-full md:w-auto",children:[(0,n.jsx)(f,{title:"Templates",className:"hidden md:block",children:(0,n.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-x-16 gap-y-1 mt-3",children:[(0,n.jsx)(d,{href:"/design/c/logo?notour",children:"Logos"}),(0,n.jsx)(d,{href:"/design/c/art?notour",children:"Art"}),(0,n.jsx)(d,{href:"/design/c/stickers?notour",children:"Stickers"}),(0,n.jsx)(d,{href:"/design/c/mobile-wallpaper?notour",children:"Wallpapers"}),(0,n.jsx)(d,{href:"/design/c/poster?notour",children:"Posters"}),(0,n.jsx)(d,{href:"/design/c/t-shirt?notour",children:"T-shirts"}),(0,n.jsx)(d,{href:"/design/c/monogram?notour",children:"Monograms"}),(0,n.jsx)(d,{href:"/design/c/ebook-cover?notour",children:"E-book Covers"}),(0,n.jsx)(d,{href:"/design/c/cards-invites?notour",children:"Cards & Invites"}),(0,n.jsx)(d,{href:"/design/c/seamless-patterns?notour",children:"Patterns"}),(0,n.jsx)(d,{href:"/design/c/mockups?notour",children:"Mockups"}),(0,n.jsx)(d,{href:"/design/c/memes?notour",children:"Memes"}),(0,n.jsx)(d,{href:"/templates/s/floral-background",children:"Floral Background"}),(0,n.jsx)(d,{href:"/templates/s/new-year",children:"New Year"}),(0,n.jsx)(d,{href:"/templates/s/happy-holi",children:"Happy Holi"}),(0,n.jsx)(d,{href:"/templates/s/football",children:"Football"}),(0,n.jsx)(d,{href:"/templates/s/painting",children:"Painting"}),(0,n.jsx)(d,{href:"/templates/s/valentines-day",children:"Valentines Day"}),(0,n.jsx)(d,{href:"/templates/s/travel",children:"Travel"}),(0,n.jsx)(d,{href:"/templates/s/save-the-date",children:"Save the Date"}),(0,n.jsx)(d,{href:"/templates/s/aesthetic-background",children:"Aesthetic Background"})]})}),(0,n.jsxs)(f,{title:"Product",children:[(0,n.jsx)(d,{href:"/design",className:"inline md:hidden",children:"Templates"}),(0,n.jsx)(d,{href:"/pg-v3",className:"whitespace-nowrap",children:"Playground v3"}),(0,n.jsx)(d,{href:o.jB,children:"iOS App"}),(0,n.jsx)(d,{href:"/design/pricing",children:"Pricing"}),(0,n.jsx)(d,{href:o.a3,withStatus:!0,isOutage:e,children:"Status"}),(0,n.jsx)(d,{href:"/enterprise/api",children:"API"})]}),(0,n.jsxs)(f,{title:"Company",children:[(0,n.jsx)(d,{href:"/jobs",children:"Careers"}),(0,n.jsx)(d,{href:"/faq",children:"FAQ"}),(0,n.jsx)(d,{href:o.N$,children:"Twitter"})]}),(0,n.jsxs)(f,{title:"Legal",children:[(0,n.jsx)(d,{href:"/terms",children:"Terms"}),(0,n.jsx)(d,{href:"/privacy",children:"Privacy"})]})]})]}),(0,n.jsx)("div",{className:"flex-grow"}),(0,n.jsx)(c,{})]})}function c(){return(0,n.jsx)("div",{className:"w-full text-center mt-4 md:mt-8 border-t border-[#22211f]",children:(0,n.jsx)("span",{className:"font-bold text-[#22211f] whitespace-nowrap overflow-hidden block",style:{height:"15vw",fontSize:"18vw",lineHeight:1},children:"Playground"})})}function d(e){let{href:t,children:r,withStatus:o=!1,isOutage:a=!1,className:l=""}=e;return(0,n.jsxs)("li",{className:`flex items-center justify-between w-full ${l}`,children:[(0,n.jsxs)("div",{className:"flex items-center mb-4 md:mb-0",children:[(0,n.jsx)("a",{href:t,className:"hover:text-white",onClick:()=>{s().track("Clicked Home Page Link",{link:r,href:t,section:"footer"})},children:r}),o&&(0,n.jsx)("span",{className:`ml-2 w-2 h-2 rounded-full ${a?"bg-yellow-500":"bg-green-500"}`})]}),(0,n.jsx)("div",{className:"flex md:hidden",children:(0,n.jsx)(i.LZ3,{})})]})}function f(e){let{title:t,children:r,className:i=""}=e;return(0,n.jsxs)("div",{className:`flex flex-col items-start mb-1 ${i}`,children:[(0,n.jsx)("h5",{className:"font-semibold mb-2 text-pg-ds-650 hidden md:flex",children:t}),(0,n.jsx)("ul",{className:"w-full space-y-1 font-medium text-pg-ds-450",children:r})]})}async function p(){let e=await fetch("https://status.playground.com/api/v2/summary.json");return(await e.json()).incidents.some(e=>"resolved"!==e.status)}},97597:function(e,t,r){"use strict";r.d(t,{Z:function(){return x}});var n=r(85893),i=r(373),o=r(48105),a=r(41664),s=r.n(a),l=r(8891),u=r.n(l),c=r(38372),d=r(33299),f=r(11163),p=r(50497),h=r(77922),m=r(67294),g=r(11007),v=r(1233);let y=e=>{let{searchQuery:t,setSearchQuery:r,variant:i,...o}=e,a=(0,f.useRouter)();return(0,n.jsx)(h.Z,{className:(0,v.cn)("text-fg-tertiary",o.className),backgroundClass:"search-landing-page"===i?"bg-white":"bg-bg-primary",useDarkerBackground:"search-landing-page"!==i,variant:"small",value:t,onChange:e=>r(e.target.value),onSubmit:e=>{let r=new URLSearchParams,n=e??t;r.set("q",n),r.set("f","home"),a.push(`/design?${r.toString()}`)},...o})};function x(e){let{login:t,variant:r="default"}=e,a=!!(0,c.Z)(),l=(0,d.useSession)(),u=(0,f.useRouter)(),[h,x]=(0,m.useState)(""),[w,_]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{if(w){let e=()=>{_(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}},[w]),(0,n.jsx)("div",{className:"p-4 w-full",children:(0,n.jsxs)("div",{className:"w-full mx-auto flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center space-x-6",children:[(0,n.jsx)(s(),{href:"/",className:"flex-shrink-0",children:(0,n.jsx)("img",{src:"https://cdn.playground.com/logo/Logo_monochrome.png",className:"h-10 w-10 p-1 object-cover object-left sm:h-8 sm:w-auto sm:p-0",alt:"Logo"})}),(0,n.jsx)("div",{className:"relative hidden sm:inline w-[384px]",children:(0,n.jsx)(y,{searchQuery:h,setSearchQuery:x,variant:r})})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,n.jsxs)("div",{className:"sm:hidden",children:[(0,n.jsx)(o.z,{onClick:()=>_(!0),variant:"ghost",className:"p-0",children:(0,n.jsx)(g.W,{className:(0,v.cn)("text-design-md mx-1","text-fg-secondary","w-8 h-8 min-w-[2rem] min-h-[2rem] p-1")})}),w&&(0,n.jsx)("div",{className:"fixed top-0 left-0 right-0 p-3 bg-white z-50 rounded-b-[12px]",style:{boxShadow:"0px 2px 12px 0px rgba(0, 0, 0, 0.08)"},children:(0,n.jsx)("div",{className:"flex gap-2 justify-between items-center",children:(0,n.jsx)(y,{searchQuery:h,setSearchQuery:x,className:"w-full max-w-full flex-grow-1",autoFocus:!0,variant:r,onBlur:()=>_(!1)})})})]}),(0,n.jsx)(b,{href:"/become-a-creator",className:"hidden lg:inline",children:"Creators"}),(0,n.jsx)(b,{href:"/design/pricing",className:"hidden md:inline",children:"Pricing"}),(0,n.jsx)(p.N,{className:"hidden md:inline-flex",buttonSize:"default"}),!a&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(b,{className:"hidden sm:inline",onClick:t,children:"Log in"})}),(0,n.jsxs)(o.z,{onClick:()=>{l.data?u.push("/design"):t()},variant:"secondary",className:"hover:bg-bg-tertiary",children:[a&&(0,n.jsx)(i.p,{}),a?"Create new design":"Get started for free"]})]})]})})}let b=e=>{let{href:t,children:r,className:i,onClick:a}=e;return(0,n.jsx)(o.z,{variant:"ghost",asChild:!!t,onClick:()=>{u().track("Clicked Home Page Link",{link:r,href:t,section:"header"}),a?.()},children:t?(0,n.jsx)(s(),{href:t,className:`text-fg-secondary hover:text-fg-tertiary font-semibold whitespace-nowrap ${i}`,children:r}):(0,n.jsx)("span",{className:`text-fg-secondary hover:text-fg-tertiary font-semibold whitespace-nowrap ${i}`,children:r})})}},11444:function(e,t,r){"use strict";r.d(t,{O:function(){return y},Z:function(){return v}});var n=r(85893),i=r(67294),o=r(92323),a=r(38372),s=r(96897),l=r(11163),u=r(9669),c=r.n(u),d=r(59345),f=r(33299),p=r(41664),h=r.n(p),m=r(48105),g=r(1233);function v(e){let{header:t,children:r,primary:o,secondary:a,disabled:s,error:l,confirmationString:u="",theme:c="dark"}=e,[d,f]=(0,i.useState)(!1),[p,h]=(0,i.useState)("");return(0,n.jsxs)("div",{className:`p-6 max-w-lg ${"dark"===c?"bg-gray-90 divide-gray-85 border-gray-85":"bg-bg-primary border-bg-tertiary"}`,children:[(0,n.jsx)("div",{className:`${"dark"===c?"text-gray-10":"text-fg-primary"} font-semibold text-[16px] mb-6`,children:t}),(0,n.jsxs)("div",{className:"max-w-xl",children:[r,u&&!s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"select-none text-gray-50 mt-4 text-sm block",children:["Type"," ",(0,n.jsx)("span",{className:`${"dark"===c?"text-gray-10":"text-fg-primary"} font-bold`,children:u})," ","to confirm deletion."]}),(0,n.jsx)("input",{placeholder:u,autoFocus:!0,value:p,onChange:e=>{h(e.target.value)},onKeyDown:e=>e.stopPropagation(),type:"text",className:`border  px-3 py-2 w-full mt-2 outline-none placeholder:text-gray-75 focus:border-gray-75 ${"dark"===c?"rounded-md border-gray-85 bg-gray-90 text-gray-25 placeholder:text-gray-75":"rounded-full border-bg-tertiary bg-bg-primary text-fg-primary placeholder:text-fg-quaternary"}`})]})]}),l&&(0,n.jsx)("div",{className:"flex justify-end pb-3 text-gray-25",children:(0,n.jsx)("p",{className:"text-right max-w-md w-full",children:l})}),(0,n.jsxs)("div",{className:"flex justify-end gap-4 mt-4",children:["light"===c&&(0,n.jsxs)(n.Fragment,{children:[a&&(0,n.jsx)(m.z,{type:"button",variant:"secondary",disabled:d,onClick:a.onClick,children:a.label??"Cancel"}),(0,n.jsx)(m.z,{type:"button",disabled:d||s||p!==u,variant:"action-secondary",className:"font-medium",onClick:async()=>{f(!0),await o.onClick(),f(!1)},children:o.label??"OK"})]}),"dark"===c&&(0,n.jsxs)(n.Fragment,{children:[a&&(0,n.jsx)("button",{type:"button",className:"playground-button large",disabled:d,onClick:a.onClick,children:a.label??"Cancel"}),(0,n.jsx)("button",{type:"button",disabled:d||s||p!==u,className:o.class||"playground-button large danger",onClick:async()=>{f(!0),await o.onClick(),f(!1)},children:o.label??"OK"})]})]})]})}function y(e){let{theme:t="dark"}=e,r=(0,o.d)(),u=(0,a.Z)(),p=(0,l.useRouter)(),[m,y]=(0,i.useState)(null),x=(0,f.useSession)(),b=!!(x.data?.user?.subscriptions||[]).filter(e=>!e.cancelAtPeriodEnd).length;return(0,n.jsx)(v,{header:(0,n.jsx)("span",{className:"text-[18px]",children:"Delete Account"}),disabled:b,error:m,confirmationString:u.displayName||u.name||"Delete Account",theme:t,primary:{async onClick(){y(null);let e=await (0,s.wX)(()=>c().delete(`/api/user/id?id=${encodeURIComponent(u.id)}`));if((0,s.dZ)(e)){console.error(e.error),y(e.error?.response?.data?.error||e.error.message);return}return r.closeModal(),(0,d.U)(),p.reload(),localStorage.clear(),e},label:"Delete account"},secondary:{onClick:r.closeModal,label:"Cancel"},children:b?(0,n.jsxs)("div",{className:"text-sm font-pg-medium mb-6 "+(0,g.cn)("light"===t?"text-fg-secondary":"text-gray-25"),children:["Your account has an active subscription. Please"," ",(0,n.jsx)(h(),{href:"light"===t?"/design/pricing":"/pricing",target:"_blank",className:"text-purple-l1",children:"cancel your subscription"})," ","before deleting your account."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:" text-sm font-pg-medium mb-2 "+(0,g.cn)("light"===t?"text-fg-primary":"text-white"),children:"Are you sure you want to delete your account?"}),(0,n.jsx)("p",{className:"text-gray-50 text-sm font-pg-medium",children:"Deleting the account will permanently remove all images created using your account on Playground."})]})})}},92323:function(e,t,r){"use strict";r.d(t,{D:function(){return k},d:function(){return S}});var n=r(85893),i=r(67294),o=r(45697),a=r.n(o),s=Object.defineProperty,l=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t,r)=>(l(e,"symbol"!=typeof t?t+"":t,r),r),c=new class{constructor(){u(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return!!e&&this.modals.get(e)===this.modals.size}},d=r(25432),f=r(81103),p=r(23541),h=r(1702),m=r(55227),g=r(27603),v=r(12668),[y,x]=(0,m.k)({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" "}),[b,w]=(0,m.k)({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),_=e=>{let t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:r,children:o,autoFocus:a,trapFocus:s,initialFocusRef:l,finalFocusRef:u,returnFocusOnClose:m,blockScrollOnMount:x,allowPinchZoom:w,preserveScrollBarGap:_,motionPreset:j,lockFocusAcrossFrames:C,onCloseComplete:k}=t,E=(0,g.jC)("Modal",t),S={...function(e){let{isOpen:t,onClose:r,id:n,closeOnOverlayClick:o=!0,closeOnEsc:a=!0,useInert:s=!0,onOverlayClick:l,onEsc:u}=e,h=(0,i.useRef)(null),m=(0,i.useRef)(null),[g,v,y]=function(e,...t){let r=(0,i.useId)(),n=e||r;return(0,i.useMemo)(()=>t.map(e=>`${e}-${n}`),[n,t])}(n,"chakra-modal","chakra-modal--header","chakra-modal--body");!function(e,t){let r=e.current;(0,i.useEffect)(()=>{if(e.current&&t)return(0,p.Ry)(e.current)},[t,e,r])}(h,t&&s);let x=function(e,t){let[r,n]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let r=e.current;if(r)return t&&n(c.add(r)),()=>{c.remove(r),n(0)}},[t,e]),r}(h,t),b=(0,i.useRef)(null),w=(0,i.useCallback)(e=>{b.current=e.target},[]),_=(0,i.useCallback)(e=>{"Escape"===e.key&&(e.stopPropagation(),a&&(null==r||r()),null==u||u())},[a,r,u]),[j,C]=(0,i.useState)(!1),[k,E]=(0,i.useState)(!1),S=(0,i.useCallback)((e={},t=null)=>({role:"dialog",...e,ref:(0,f.lq)(t,h),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":j?v:void 0,"aria-describedby":k?y:void 0,onClick:(0,d.v0)(e.onClick,e=>e.stopPropagation())}),[y,k,g,v,j]),N=(0,i.useCallback)(e=>{e.stopPropagation(),b.current===e.target&&c.isTopModal(h.current)&&(o&&(null==r||r()),null==l||l())},[r,o,l]),P=(0,i.useCallback)((e={},t=null)=>({...e,ref:(0,f.lq)(t,m),onClick:(0,d.v0)(e.onClick,N),onKeyDown:(0,d.v0)(e.onKeyDown,_),onMouseDown:(0,d.v0)(e.onMouseDown,w)}),[_,w,N]);return{isOpen:t,onClose:r,headerId:v,bodyId:y,setBodyMounted:E,setHeaderMounted:C,dialogRef:h,overlayRef:m,getDialogProps:S,getDialogContainerProps:P,index:x}}(t),autoFocus:a,trapFocus:s,initialFocusRef:l,finalFocusRef:u,returnFocusOnClose:m,blockScrollOnMount:x,allowPinchZoom:w,preserveScrollBarGap:_,motionPreset:j,lockFocusAcrossFrames:C};return(0,n.jsx)(b,{value:S,children:(0,n.jsx)(y,{value:E,children:(0,n.jsx)(v.M,{onExitComplete:k,children:S.isOpen&&(0,n.jsx)(h.h,{...r,children:o})})})})};_.displayName="Modal";var j=r(20967);let C=(0,i.createContext)({isModalOpen:!1,closeModal:()=>{},openModal:()=>{},setModalContent:()=>null,showCloseButton:!0,closeOnOutsideClick:!0,setCloseOnOutsideClick:()=>null,transitionModal:!1,removeBorder:!1,className:""});function k(e){let{children:t}=e,r=function(){let{isOpen:e,onOpen:t,onClose:r}=(0,j.q)();return{openModal:t,closeModal:r,isModalOpen:e}}(),[o,a]=(0,i.useState)((0,n.jsx)(n.Fragment,{})),[s,l]=(0,i.useState)(!0),[u,c]=(0,i.useState)(!0),[d,f]=(0,i.useState)(!0),[p,h]=(0,i.useState)(!0),[m,g]=(0,i.useState)(!1),[v,y]=(0,i.useState)(()=>()=>{}),[x,b]=(0,i.useState)(""),{openModal:w}=r,_=(0,i.useCallback)((e,t)=>{let{showCloseButton:r,closeOnOutsideClick:n,useBlurredBackground:i}=t??{};a(e),l(r??!0),c(n??!0),f(i??!1),h(t?.transitionModal??!1),g(t?.removeBorder??!1),b(t?.className??""),y(()=>t?.onClose??(()=>()=>{})),w()},[w]),k=r.closeModal,S=(0,i.useCallback)(()=>{v?.(),k()},[k,v]);return(0,n.jsxs)(C.Provider,{value:{...r,closeModal:S,setModalContent:_,showCloseButton:s,closeOnOutsideClick:u,setCloseOnOutsideClick:c,transitionModal:p,removeBorder:m,className:x},children:[(0,n.jsx)(E,{useBlurredBackground:d,removeBorder:m,modalContent:o,className:x}),t]})}k.propTypes={children:a().element.isRequired};let E=e=>{let{modalContent:t,useBlurredBackground:r,removeBorder:o,className:a}=e,{isModalOpen:s,closeModal:l,showCloseButton:u,closeOnOutsideClick:c,transitionModal:d}=(0,i.useContext)(C),f=(0,i.useCallback)(()=>{h(!1),setTimeout(()=>{l()},10)},[l]);(0,i.useEffect)(()=>{let e=e=>{"Escape"===e.key&&f()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[f,s]);let[p,h]=(0,i.useState)(!1),[m,g]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{requestAnimationFrame(()=>{h(s)})},[s]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(_,{isOpen:s,onClose:f,motionPreset:"scale",children:(0,n.jsx)("div",{className:`inset-0 h-screen fixed bg-black/50 z-[900] flex items-center justify-center ${p&&r?"backdrop-blur-md":""}`,onMouseUp:e=>{!m&&e.target===e.currentTarget&&c&&f(),g(!1)},children:(0,n.jsxs)("div",{className:`absolute transition-all duration-100 ease-out will-change-transform transform-gpu ${d&&!p?"scale-95 opacity-0":""} bg-gray-95 overflow-hidden m-3  overflow-y-auto ${a||"max-h-[calc(100vh-20px)] rounded-xl"} ${!o&&"border border-gray-85"}`,onMouseDown:()=>{g(!0)},children:[u&&(0,n.jsx)("button",{className:"text-[#8F899A] text-2xl font-light absolute right-8 top-5 leading-[20px]",onClick:f,title:"Close",children:"\xd7"}),t]})})})})},S=()=>(0,i.useContext)(C)},24011:function(e,t,r){"use strict";r.d(t,{L:function(){return o}});var n=r(86010),i=r(67294);function o(e,t){return(0,i.forwardRef)((r,o)=>(0,i.createElement)(e,{...r,ref:o,className:(0,n.Z)(t,Array.isArray(r.className)?r.className.filter(Boolean).join(" "):r.className)}))}},26516:function(e,t,r){"use strict";r.d(t,{f:function(){return i}});var n=r(85893);function i(e){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M4.75 8.75C4.75 7.64543 5.64543 6.75 6.75 6.75H17.25C18.3546 6.75 19.25 7.64543 19.25 8.75V17.25C19.25 18.3546 18.3546 19.25 17.25 19.25H6.75C5.64543 19.25 4.75 18.3546 4.75 17.25V8.75Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8 4.75V8.25",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M16 4.75V8.25",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.75 10.75H16.25",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},22653:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=24,height:r=24,...i}=e;return(0,n.jsxs)("svg",{width:t,height:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[(0,n.jsx)("path",{d:"M10.1328 10.1329C10.1329 9.79071 10.227 9.45511 10.4049 9.16279C10.5828 8.87047 10.8377 8.63268 11.1416 8.47541C11.4455 8.31814 11.7869 8.24744 12.1282 8.27105C12.4696 8.29465 12.798 8.41165 13.0774 8.60925C13.3567 8.80684 13.5764 9.07744 13.7124 9.39147C13.8484 9.70549 13.8955 10.0509 13.8484 10.3898C13.8014 10.7288 13.6621 11.0483 13.4458 11.3134C13.2294 11.5786 12.9443 11.7791 12.6217 11.8932C12.4396 11.9576 12.282 12.0768 12.1706 12.2344C12.0592 12.3922 11.9994 12.5805 11.9995 12.7736V13.3996",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M11.999 15.7333C11.8701 15.7333 11.7656 15.6288 11.7656 15.4999C11.7656 15.3711 11.8701 15.2666 11.999 15.2666",stroke:"currentColor"}),(0,n.jsx)("path",{d:"M12 15.7333C12.1289 15.7333 12.2333 15.6288 12.2333 15.4999C12.2333 15.3711 12.1289 15.2666 12 15.2666",stroke:"currentColor",strokeWidth:"1.3"}),(0,n.jsx)("path",{d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19Z",stroke:"currentColor",strokeWidth:"1.3",strokeMiterlimit:"10"})]})}},58573:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=15,height:r=14,...i}=e;return(0,n.jsxs)("svg",{width:t,height:r,viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[(0,n.jsx)("path",{d:"M8.55602 7.07205L5.94531 5.05469V9.08941L8.55602 7.07205Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.22059",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("rect",{x:"0.5",y:"0.5",width:"13",height:"13",rx:"6.5",stroke:"currentColor"})]})}r(67294)},40582:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t,height:r}=e;return(0,n.jsxs)("svg",{width:t??"20",height:r??"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M5.625 6.46094L6.32596 14.522C6.40085 15.3833 7.12185 16.0443 7.98636 16.0443H12.0137C12.8782 16.0443 13.5992 15.3833 13.674 14.522L14.375 6.46094",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8.125 6.2526V5.6276C8.125 4.70713 8.87117 3.96094 9.79167 3.96094H10.2083C11.1288 3.96094 11.875 4.70713 11.875 5.6276V6.2526",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M4.16406 6.46094H15.8307",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},70882:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{size:t=24,color:r="currentColor",...i}=e;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[(0,n.jsx)("path",{d:"M4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12Z",stroke:r,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.75 12.75L10.1837 13.6744C10.5275 14.407 11.5536 14.4492 11.9564 13.7473L14.25 9.75",stroke:r,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},48247:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=24,height:r=16,...i}=e;return(0,n.jsx)("svg",{fill:"none",height:r,shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:t,...i,children:(0,n.jsx)("path",{d:"M20 6L9 17l-5-5"})})}r(67294)},79125:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{className:t,strokeWidth:r,height:i="16",width:o="24",...a}=e;return t=t||"",r=r||1.5,(0,n.jsx)("svg",{...a,"data-testid":"geist-icon",fill:"none",height:i,width:o,shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:r,viewBox:"0 0 24 24",className:t,children:(0,n.jsx)("path",{d:"M6 9l6 6 6-6"})})}r(67294)},33048:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(){return(0,n.jsx)("svg",{fill:"none",height:"16",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"16",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}r(67294)},59420:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(){return(0,n.jsx)("svg",{fill:"none",height:"16",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"16",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6"})})}r(67294)},32155:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t="25",height:r="24",...i}=e;return(0,n.jsxs)("svg",{width:t,height:r,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[(0,n.jsx)("path",{d:"M12.5 21C17.4706 21 21.5 16.9706 21.5 12C21.5 7.02944 17.4706 3 12.5 3C7.52944 3 3.5 7.02944 3.5 12C3.5 16.9706 7.52944 21 12.5 21Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),(0,n.jsx)("path",{d:"M8.75 12H16.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5 8.25V15.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},68364:function(e,t,r){"use strict";r.d(t,{Z:function(){return i},l:function(){return o}});var n=r(85893);function i(e){let{className:t}=e;return(0,n.jsxs)("svg",{width:"24",className:t??"",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_2143_58689)",children:[(0,n.jsx)("path",{d:"M10.7083 12.6459C10.9857 13.0166 11.3395 13.3234 11.7459 13.5455C12.1522 13.7675 12.6016 13.8995 13.0635 13.9326C13.5253 13.9656 13.9889 13.899 14.4227 13.7372C14.8566 13.5753 15.2505 13.3221 15.5779 12.9946L17.5154 11.0571C18.1036 10.4481 18.4291 9.63238 18.4218 8.7857C18.4144 7.93902 18.0748 7.12911 17.4761 6.5304C16.8774 5.93168 16.0674 5.59207 15.2208 5.58472C14.3741 5.57736 13.5584 5.90284 12.9494 6.49106L11.8385 7.59544",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M13.2917 11.3542C13.0143 10.9834 12.6605 10.6766 12.2541 10.4546C11.8478 10.2326 11.3984 10.1005 10.9365 10.0675C10.4747 10.0344 10.0111 10.101 9.57726 10.2629C9.14342 10.4247 8.74945 10.6779 8.42209 11.0054L6.48459 12.9429C5.89637 13.5519 5.57089 14.3676 5.57825 15.2143C5.5856 16.061 5.92521 16.8709 6.52393 17.4696C7.12264 18.0683 7.93255 18.4079 8.77923 18.4153C9.62591 18.4227 10.4416 18.0972 11.0506 17.509L12.155 16.4046",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_2143_58689",children:(0,n.jsx)("rect",{width:"15.5",height:"15.5",fill:"white",transform:"translate(4.25 4.25)"})})})]})}function o(){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12.5",height:"12.5",fill:"none",viewBox:"0 0 16 17",className:"mr-2",children:[(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M6.721 6.832a2.98 2.98 0 00-2.221-1h-1a3 3 0 100 6h1a2.982 2.982 0 002.221-1M9.279 6.832a2.98 2.98 0 012.221-1h1a3 3 0 110 6h-1a2.981 2.981 0 01-2.221-1"}),(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 8.832h7"})]})}r(67294)},38304:function(e,t,r){"use strict";r.d(t,{Z:function(){return i},j:function(){return o}});var n=r(85893);function i(e){let{...t}=e;return(0,n.jsxs)("svg",{...t,width:t.width??"24",height:t.width??"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M17.8125 13.9375V16.5208C17.8125 16.8634 17.6764 17.1919 17.4342 17.4342C17.1919 17.6764 16.8634 17.8125 16.5208 17.8125H7.47917C7.1366 17.8125 6.80805 17.6764 6.56582 17.4342C6.32359 17.1919 6.1875 16.8634 6.1875 16.5208V13.9375",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8.77084 10.7084L12 13.9375L15.2292 10.7084",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12 13.9375V6.1875",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}function o(e){let{className:t="mr-2"}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12.5",height:"12.5",fill:"none",viewBox:"0 0 16 17",className:t,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M8 3v8M5 8l3 3 3-3M15.5 11v1a2 2 0 01-2 2h-11a2 2 0 01-2-2v-1"})})}r(67294)},16135:function(e,t,r){"use strict";r.d(t,{Z:function(){return i},n:function(){return o}});var n=r(85893);function i(e){let{width:t=24,height:r=16,...i}=e;return(0,n.jsx)("svg",{fill:"currentColor",height:r,shapeRendering:"geometricPrecision",stroke:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 300 300",width:t,...i,children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M290.422,79.244L220.034,8.857c-11.794-11.795-30.986-11.795-42.78,0C175.866,10.245,12.971,173.14,8.867,177.244    c-11.822,11.821-11.824,30.957,0,42.78l70.388,70.388c11.821,11.822,30.957,11.824,42.78,0    c1.046-1.046,165.357-165.357,168.388-168.388C302.244,110.203,302.246,91.066,290.422,79.244z M110.367,278.744    c-5.374,5.373-14.071,5.373-19.446,0l-70.388-70.388c-5.373-5.374-5.375-14.071,0-19.446l34.61-34.61l89.834,89.834    L110.367,278.744z M278.755,110.357l-122.111,122.11l-89.833-89.833l122.11-122.111c5.374-5.374,14.071-5.374,19.446,0    l70.388,70.388C284.129,96.285,284.129,104.983,278.755,110.357z"})})})}function o(e){let{width:t=24,height:r=24,...i}=e;return(0,n.jsx)("svg",{width:t,height:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:(0,n.jsx)("path",{d:"M18.4349 17.8377H12.1714L14.7109 15.2982L14.7121 15.2971L14.7132 15.2959L18.8485 11.1606C19.1771 10.8312 19.3617 10.3849 19.3617 9.91961C19.3617 9.45433 19.1771 9.00805 18.8485 8.67865L15.5394 5.36947C15.2102 5.04036 14.7639 4.85547 14.2984 4.85547C13.833 4.85547 13.3866 5.04036 13.0575 5.36947L8.9217 9.50525L8.92096 9.50593L8.92028 9.50668L4.78451 13.6425C4.4554 13.9716 4.27051 14.418 4.27051 14.8834C4.27051 15.3489 4.4554 15.7952 4.78451 16.1244L7.49656 18.8364C7.60629 18.946 7.75508 19.0077 7.91023 19.0077H18.4349C18.59 19.0077 18.7388 18.946 18.8485 18.8363C18.9582 18.7266 19.0198 18.5778 19.0198 18.4227C19.0198 18.2675 18.9582 18.1187 18.8485 18.009C18.7388 17.8993 18.59 17.8377 18.4349 17.8377ZM13.8848 6.19682C13.9391 6.14249 14.0036 6.09939 14.0746 6.06998C14.1455 6.04058 14.2216 6.02544 14.2984 6.02544C14.3752 6.02544 14.4513 6.04058 14.5223 6.06998C14.5932 6.09939 14.6577 6.14249 14.712 6.19682L18.0212 9.506C18.1307 9.61579 18.1922 9.76455 18.1922 9.91964C18.1922 10.0747 18.1307 10.2235 18.0212 10.3333L14.2984 14.0561L10.162 9.91964L13.8848 6.19682Z",fill:"currentColor"})})}r(67294)},22795:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{height:t=24,width:r=24,color:i="currentColor",...o}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:r,fill:"none",viewBox:"0 0 27.963 27.963",...o,children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M4.95203 16.3545L10.215 5.85751C10.9529 4.38574 13.0537 4.38613 13.7911 5.85816L19.0493 16.3552C19.7154 17.685 18.7485 19.2509 17.2611 19.2509H6.7399C5.25217 19.2509 4.28523 17.6844 4.95203 16.3545Z",stroke:i,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12 10V12",stroke:i,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z",fill:i})]})})}r(67294)},50429:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(85893),i=r(67294);function o(e){let{width:t=12.5,height:r=12.5,className:o="mr-2"}=e,a=(0,i.useId)();return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,fill:"none",viewBox:"0 0 16 17",className:o,children:[(0,n.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#clip0_5_6674${a})`,children:[(0,n.jsx)("path",{d:"M9.242 10.453a2 2 0 01-2.4 0M11.626 7.107A4.146 4.146 0 018 5a4.147 4.147 0 01-4 2.089v2.196a4.123 4.123 0 004 3.914 4.124 4.124 0 004-3.914V7.089c-.124.012-.25.018-.374.018v0z"}),(0,n.jsx)("path",{d:"M10.303 1.653A5.26 5.26 0 008 1.121a5.795 5.795 0 00-5.594 5.89s0 3.82-1.785 6.407a.69.69 0 00.105.901C2.017 15.472 5 16.04 8 16c3 .041 5.982-.527 7.274-1.68a.688.688 0 00.104-.901c-1.784-2.587-1.784-6.407-1.784-6.407 0-.504-.064-1.007-.188-1.495M13.5 2h2M14.5 1v2M10.5 4h2M11.5 3v2"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_5_6674"+a,children:(0,n.jsx)("path",{fill:"#fff",d:"M0 0H16V16H0z",transform:"translate(0 .5)"})})})]})}},97686:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{size:t=16}=e;return(0,n.jsx)("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M12.5753 7.06565C12.2995 6.44705 11.8986 5.89183 11.3977 5.43471L10.9844 5.05671C10.9703 5.04423 10.9534 5.03537 10.9352 5.03091C10.9169 5.02646 10.8978 5.02654 10.8796 5.03115C10.8613 5.03576 10.8445 5.04477 10.8306 5.05737C10.8167 5.06997 10.8061 5.08579 10.7997 5.10343L10.615 5.6315C10.5 5.96279 10.2883 6.30115 9.98863 6.63385C9.96874 6.65509 9.94602 6.66075 9.93039 6.66217C9.91477 6.66358 9.89062 6.66075 9.86931 6.64093C9.84942 6.62394 9.83948 6.59846 9.8409 6.57297C9.89346 5.72069 9.63778 4.7594 9.07812 3.71317C8.61505 2.8439 7.97159 2.16576 7.16761 1.6929L6.58096 1.34887C6.50426 1.30357 6.40625 1.36303 6.41051 1.45222L6.44176 2.13178C6.46306 2.59614 6.40909 3.00671 6.28125 3.3479C6.125 3.76555 5.90057 4.15346 5.61363 4.50174C5.41395 4.74378 5.18763 4.9627 4.93892 5.1544C4.33992 5.61333 3.85286 6.20139 3.5142 6.87453C3.17638 7.55354 3.00041 8.30112 3 9.05903C3 9.72726 3.1321 10.3743 3.39347 10.9844C3.64583 11.5719 4.01003 12.1051 4.46591 12.5545C4.92613 13.0075 5.46022 13.3643 6.05539 13.6121C6.67187 13.8697 7.32528 14 7.99999 14C8.67471 14 9.32812 13.8697 9.9446 13.6135C10.5383 13.3672 11.0782 13.008 11.5341 12.5559C11.9943 12.1029 12.3551 11.5734 12.6065 10.9859C12.8675 10.3773 13.0014 9.72222 13 9.06044C13 8.36956 12.8579 7.69849 12.5753 7.06565Z",stroke:"currentColor",strokeWidth:"1.33"})})}},91170:function(e,t,r){"use strict";var n=r(85893);r(67294),t.Z=function(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:[(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5.621 14.963l1.101.172c.813.127 1.393.872 1.333 1.71l-.081 1.137a.811.811 0 00.445.787l.814.4c.292.145.641.09.88-.134l.818-.773a1.55 1.55 0 012.138 0l.818.773a.776.776 0 00.88.135l.815-.402a.808.808 0 00.443-.785l-.08-1.138c-.06-.838.52-1.583 1.332-1.71l1.101-.172a.798.798 0 00.651-.62l.201-.9a.816.816 0 00-.324-.847l-.918-.643a1.634 1.634 0 01-.476-2.132l.555-.988a.824.824 0 00-.068-.907l-.563-.723a.78.78 0 00-.85-.269l-1.064.334a1.567 1.567 0 01-1.928-.949l-.407-1.058a.791.791 0 00-.737-.511l-.903.002a.791.791 0 00-.734.516l-.398 1.045a1.566 1.566 0 01-1.93.956l-1.11-.348a.78.78 0 00-.851.27l-.56.724a.823.823 0 00-.062.91l.568.99c.418.73.213 1.666-.469 2.144l-.907.636a.817.817 0 00-.324.847l.2.9c.072.325.33.57.651.62z"}),(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M13.591 10.409a2.25 2.25 0 11-3.183 3.182 2.25 2.25 0 013.183-3.182z"})]})}},70315:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(){return(0,n.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_229_5144)",children:[(0,n.jsx)("path",{d:"M23.766 12.5477C23.766 11.732 23.6999 10.9119 23.5588 10.1094H12.24V14.7304H18.7217C18.4528 16.2207 17.5885 17.5391 16.323 18.3769V21.3752H20.19C22.4608 19.2852 23.766 16.1987 23.766 12.5477Z",fill:"#4285F4"}),(0,n.jsx)("path",{d:"M12.24 24.2708C15.4764 24.2708 18.2058 23.2082 20.1944 21.3739L16.3274 18.3756C15.2516 19.1075 13.8626 19.522 12.2444 19.522C9.11376 19.522 6.45934 17.4099 5.50693 14.5703H1.51648V17.6613C3.55359 21.7134 7.70278 24.2708 12.24 24.2708Z",fill:"#34A853"}),(0,n.jsx)("path",{d:"M5.50253 14.5683C4.99987 13.0779 4.99987 11.4641 5.50253 9.97375V6.88281H1.51649C-0.18551 10.2736 -0.18551 14.2684 1.51649 17.6592L5.50253 14.5683Z",fill:"#FBBC04"}),(0,n.jsx)("path",{d:"M12.24 5.01919C13.9508 4.99274 15.6043 5.6365 16.8433 6.8182L20.2694 3.39215C18.1 1.35504 15.2207 0.235065 12.24 0.27034C7.70277 0.27034 3.55359 2.82775 1.51648 6.88434L5.50252 9.97528C6.45052 7.13126 9.10935 5.01919 12.24 5.01919Z",fill:"#EA4335"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_229_5144",children:(0,n.jsx)("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 0.269531)"})})})]})}r(67294)},330:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=20,height:r=20}=e;return(0,n.jsx)("svg",{width:t,height:r,viewBox:"0 0 247 215",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"overflow-visible",children:(0,n.jsx)("path",{d:"M33.5343 119.395L33.5342 119.395L23.2823 109.144C23.2823 109.144 23.2822 109.144 23.2822 109.144C-0.427431 85.4339 -0.427399 46.9924 23.2823 23.2827C46.9925 -0.427563 85.4336 -0.427563 109.144 23.2827C116.953 31.0925 129.616 31.0922 137.425 23.2827L133.536 19.3936L137.425 23.2826C161.135 -0.42755 199.576 -0.42755 223.286 23.2826L227.175 19.3936L223.286 23.2827C246.996 46.9925 246.996 85.434 223.286 109.144L226.851 112.709L223.286 109.144L213.035 119.395L123.3 209.129L123.3 209.129C123.297 209.132 123.295 209.134 123.294 209.135C123.292 209.135 123.289 209.136 123.284 209.136C123.28 209.136 123.276 209.135 123.275 209.135C123.273 209.134 123.271 209.132 123.268 209.129L123.268 209.129L33.5343 119.395Z",stroke:"currentColor",strokeWidth:"20"})})}r(67294)},3225:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{stroke:t="currentColor",width:r=16,height:i=16,...o}=e;return(0,n.jsxs)("svg",{...o,xmlns:"http://www.w3.org/2000/svg",width:r,height:i,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),(0,n.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}r(67294)},67988:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(){return(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M14.61 8C14.61 12.0332 11.4788 15.25 7.68 15.25C3.88123 15.25 0.75 12.0332 0.75 8C0.75 3.96679 3.88123 0.75 7.68 0.75C11.4788 0.75 14.61 3.96679 14.61 8Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.jsx)("mask",{id:"mask0_2_26",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:(0,n.jsx)("ellipse",{cx:"8.32001",cy:"8",rx:"7.68",ry:"8",fill:"currentColor"})}),(0,n.jsx)("g",{mask:"url(#mask0_2_26)",children:(0,n.jsx)("ellipse",{cx:"1.91999",cy:"8",rx:"7.68",ry:"8",fill:"currentColor"})})]})}r(67294)},68431:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=24,height:r=16,className:i=""}=e;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:i,children:[(0,n.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,n.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,n.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,n.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}r(67294)},96394:function(e,t,r){"use strict";r.d(t,{ZP:function(){return o},dT:function(){return a}});var n=r(85893),i=r(67294);function o(e){return(0,n.jsx)("svg",{width:e.width||16,height:e.height||16,viewBox:"0 0 16 17",fill:"none",stroke:"currentColor",strokeWidth:"0.90625",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",className:e.className,children:(0,n.jsx)("path",{d:"M11.0205 3.06301C11.1792 2.90433 11.3676 2.77846 11.5749 2.69258C11.7822 2.6067 12.0044 2.5625 12.2288 2.5625C12.4532 2.5625 12.6755 2.6067 12.8828 2.69258C13.0901 2.77846 13.2785 2.90433 13.4372 3.06301C13.5959 3.22169 13.7217 3.41007 13.8076 3.6174C13.8935 3.82472 13.9377 4.04693 13.9377 4.27134C13.9377 4.49575 13.8935 4.71796 13.8076 4.92529C13.7217 5.13261 13.5959 5.32099 13.4372 5.47967L5.28092 13.6359L1.95801 14.5422L2.86426 11.2193L11.0205 3.06301Z"})})}function a(){let e=(0,i.useId)();return(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsxs)("g",{clipPath:`url(#${e})`,children:[(0,n.jsx)("path",{d:"M9.08057 13.916C10.1399 12.6494 9.14723 11.024 10.0892 9.92869C10.2444 9.73791 10.4363 9.58019 10.6535 9.46485C10.8706 9.34951 11.1088 9.2789 11.3537 9.25718C11.5987 9.23547 11.8455 9.2631 12.0796 9.33843C12.3137 9.41376 12.5303 9.53528 12.7166 9.69578C12.9029 9.85628 13.0552 10.0525 13.1643 10.2729C13.2735 10.4932 13.3374 10.7333 13.3521 10.9787C13.3669 11.2242 13.3323 11.4701 13.2504 11.702C13.1685 11.9339 13.0409 12.147 12.8752 12.3287C12.4237 12.8869 11.8406 13.3242 11.1782 13.6013C10.5159 13.8784 9.79507 13.9865 9.08057 13.916V13.916Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M13.0666 10.1997L17.2206 4.6977C17.3323 4.54665 17.4115 4.37409 17.4531 4.19091C17.4947 4.00772 17.4979 3.8179 17.4624 3.63343C17.4269 3.44896 17.3536 3.27384 17.247 3.11915C17.1405 2.96445 17.003 2.83353 16.8433 2.73466C16.6835 2.63579 16.505 2.57112 16.319 2.54473C16.1331 2.51833 15.9436 2.5308 15.7627 2.58133C15.5818 2.63186 15.4133 2.71935 15.2679 2.8383C15.1225 2.95724 15.0033 3.10504 14.9179 3.27236L11.8979 9.3497",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.03805 13.3846C3.50471 12.4893 4.89005 10.6406 3.33338 10.6406C1.30938 10.6406 3.27471 15.286 6.59471 17.0106C7.51325 17.4405 8.54126 17.5792 9.54088 17.4082C10.5405 17.2372 11.464 16.7647 12.1874 16.054L12.2414 15.9993",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:e,children:(0,n.jsx)("rect",{width:"16",height:"16",fill:"white",transform:"translate(2 2)"})})})]})}},91132:function(e,t,r){"use strict";r.d(t,{Rx:function(){return i},uF:function(){return o}});var n=r(85893);function i(e){let{width:t=24,height:r=25,...i}=e;return(0,n.jsxs)("svg",{width:t,height:r,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_963_46762)",children:[(0,n.jsx)("path",{d:"M7.12891 20.7499L11.3789 19.7499L21.328 9.80071C21.7186 9.41018 21.7186 8.77702 21.328 8.38649L19.4923 6.55071C19.1017 6.16018 18.4686 6.16018 18.078 6.55071L8.12891 16.4999L7.12891 20.7499Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M16.4023 8.28125L19.4023 11.2813",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M4.37891 20.742C4.37891 20.742 1.74254 21.1068 1.74254 19.8052C1.74254 18.5036 5.75781 18.6453 5.37891 16.768C5 14.8906 0.5 15.5 0.5 15.5",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_963_46762",children:(0,n.jsx)("rect",{width:24,height:24,fill:"currentColor",transform:"translate(0 0.5)"})})})]})}function o(e){let{width:t=24,height:r=25,...i}=e;return(0,n.jsxs)("svg",{width:t,height:r,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_963_46762)",children:[(0,n.jsx)("path",{d:"M7.12891 20.7499L11.3789 19.7499L21.328 9.80071C21.7186 9.41018 21.7186 8.77702 21.328 8.38649L19.4923 6.55071C19.1017 6.16018 18.4686 6.16018 18.078 6.55071L8.12891 16.4999L7.12891 20.7499Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M16.4023 8.28125L19.4023 11.2813",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_963_46762",children:(0,n.jsx)("rect",{width:24,height:24,fill:"currentColor",transform:"translate(0 0.5)"})})})]})}r(67294),t.ZP=function(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"17",fill:"none",viewBox:"0 0 17 17",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M6.544 14H3.75a.5.5 0 01-.5-.5v-2.794a.494.494 0 01.144-.35l7.5-7.5a.5.5 0 01.712 0l2.788 2.788a.5.5 0 010 .712l-7.5 7.5a.492.492 0 01-.35.144v0zM9.25 4.5l3.5 3.5"})})}},94441:function(e,t,r){"use strict";r.d(t,{dN:function(){return o},pO:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.25",d:"M10 4.792v10.416M15.208 10H4.792"})})}function o(e){return(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M7 3.35156V10.6432",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10.6462 7H3.35449",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}},32949:function(e,t,r){"use strict";r.d(t,{D:function(){return o},Z:function(){return i}});var n=r(85893);function i(){return(0,n.jsxs)("svg",{fill:"none",height:"20",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"20",children:[(0,n.jsx)("path",{d:"M11 17.25a6.25 6.25 0 110-12.5 6.25 6.25 0 010 12.5z"}),(0,n.jsx)("path",{d:"M16 16l4.5 4.5"})]})}function o(e){return(0,n.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M9.16667 16.3333C12.8486 16.3333 15.8333 13.3486 15.8333 9.66667C15.8333 5.98477 12.8486 3 9.16667 3C5.48477 3 2.5 5.98477 2.5 9.66667C2.5 13.3486 5.48477 16.3333 9.16667 16.3333Z",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M17.5 18L13.875 14.375",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},40097:function(e,t,r){"use strict";r.d(t,{Z:function(){return i},_:function(){return o}});var n=r(85893);function i(e){let{size:t=16}=e;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),(0,n.jsx)("polyline",{points:"16 6 12 2 8 6"}),(0,n.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function o(){return(0,n.jsxs)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M6.82021 18.3496H14.2568C14.8213 18.3496 15.2655 17.8813 15.153 17.3281C14.8425 15.8008 13.8282 13.0996 10.5385 13.0996C7.24884 13.0996 6.23458 15.8008 5.92402 17.3281C5.81153 17.8813 6.25571 18.3496 6.82021 18.3496Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M15.7886 13.0996C17.8674 13.0996 18.7188 15.2475 19.0625 16.7956C19.2481 17.6316 18.5719 18.3496 17.7155 18.3496H16.7886",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10.5386 11.1504C12.0574 11.1504 13.2886 9.91917 13.2886 8.40039C13.2886 6.88161 12.0574 5.65039 10.5386 5.65039C9.01979 5.65039 7.78857 6.88161 7.78857 8.40039C7.78857 9.91917 9.01979 11.1504 10.5386 11.1504Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14.7886 11.1504C16.3074 11.1504 17.2886 9.91917 17.2886 8.40039C17.2886 6.88161 16.3074 5.65039 14.7886 5.65039",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},2267:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=24,height:r=16}=e;return(0,n.jsxs)("svg",{fill:"none",height:r,shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:t,children:[(0,n.jsx)("path",{d:"M3 6h18"}),(0,n.jsx)("path",{d:"M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"}),(0,n.jsx)("path",{d:"M10 11v6"}),(0,n.jsx)("path",{d:"M14 11v6"})]})}r(67294)},53574:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=24,height:r=24}=e;return(0,n.jsxs)("svg",{width:t,height:r,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M9.69808 13.8542L5.73975 9.89583L9.69808 5.9375",stroke:"currentColor",strokeWidth:"1.38",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M18.4064 18.6029V13.0612C18.4064 12.2213 18.0728 11.4159 17.4789 10.822C16.8851 10.2282 16.0796 9.89453 15.2397 9.89453H5.73975",stroke:"currentColor",strokeWidth:"1.38",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},2641:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(85893),i=r(67294);function o(e){let{width:t=12.5,height:r=12.5,className:o="mr-2"}=e,a="clip0_5_6684"+(0,i.useId)();return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,fill:"none",viewBox:"0 0 16 17",className:o,children:[(0,n.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#${a})`,children:[(0,n.jsx)("path",{d:"M8.76 6.852a1 1 0 00-1.523 0l-6.5 7.5A1 1 0 001.499 16h13a1 1 0 00.762-1.648l-6.5-7.5z"}),(0,n.jsx)("path",{d:"M14 10.5h.5a1 1 0 00.762-1.648l-6.5-7.5a1 1 0 00-1.524 0l-6.5 7.5a1 1 0 00.76 1.648H2"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:a,children:(0,n.jsx)("path",{fill:"#fff",d:"M0 0H16V16H0z",transform:"translate(0 .5)"})})})]})}},77719:function(e,t,r){"use strict";r.d(t,{M:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M12 11.25a3.25 3.25 0 100-6.5 3.25 3.25 0 000 6.5zM6.847 19.25h10.305c1.142 0 2.022-.982 1.488-1.992C17.857 15.773 16.069 14 12 14s-5.857 1.773-6.641 3.258c-.533 1.01.346 1.992 1.488 1.992z"})})}r(67294)},66639:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=24,height:r=24}=e;return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M12 11.25C13.7949 11.25 15.25 9.79493 15.25 8C15.25 6.20507 13.7949 4.75 12 4.75C10.2051 4.75 8.75 6.20507 8.75 8C8.75 9.79493 10.2051 11.25 12 11.25Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.84723 19.25H17.1522C18.2941 19.25 19.1737 18.2681 18.6405 17.2584C17.856 15.7731 16.0677 14 11.9997 14C7.93174 14 6.1434 15.7731 5.35897 17.2584C4.8257 18.2681 5.70531 19.25 6.84723 19.25Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}},91187:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsxs)("g",{filter:"url(#filter0_b_1009_95144)",children:[(0,n.jsx)("rect",{width:"24",height:"24",rx:"12",fill:"#6858F5"}),(0,n.jsx)("path",{d:"M9.19995 8.00386C9.19995 7.78765 9.44027 7.65808 9.6209 7.77691L15.669 11.7554C15.8322 11.8627 15.8322 12.102 15.669 12.2093L9.6209 16.1878C9.44027 16.3066 9.19995 16.1771 9.19995 15.9608V8.00386Z",fill:"#F3F2F3"})]}),(0,n.jsx)("defs",{children:(0,n.jsxs)("filter",{id:"filter0_b_1009_95144",x:"-18.9655",y:"-18.9655",width:"61.931",height:"61.931",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,n.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,n.jsx)("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"9.48276"}),(0,n.jsx)("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_1009_95144"}),(0,n.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_backgroundBlur_1009_95144",result:"shape"})]})})]})}r(67294)},85686:function(e,t,r){"use strict";var n=r(85893);r(67294),t.Z=function(e){let{width:t=20,height:r=20,...i}=e;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,fill:"none",viewBox:"0 0 21 20",...i,children:[(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.281",d:"M4.628 13.628l4.386-8.747c.615-1.227 2.366-1.227 2.98 0l4.382 8.748a1.667 1.667 0 01-1.49 2.413H6.118a1.667 1.667 0 01-1.49-2.414z"}),(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.708",d:"M10.5 8.332v1.667"}),(0,n.jsx)("path",{fill:"currentColor",d:"M10.5 14.167a.833.833 0 100-1.667.833.833 0 000 1.667z"})]})}},32478:function(e,t,r){"use strict";r.d(t,{Z:function(){return i},k:function(){return o}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.0303 7.21438C17.2742 6.97053 17.2742 6.57518 17.0303 6.33133C16.7865 6.08747 16.3911 6.08747 16.1473 6.33133L11.6808 10.7978L7.21438 6.33133C6.97053 6.08747 6.57518 6.08747 6.33133 6.33133C6.08747 6.57518 6.08747 6.97053 6.33133 7.21438L10.7978 11.6808L6.33133 16.1473C6.08747 16.3911 6.08747 16.7865 6.33133 17.0303C6.57518 17.2742 6.97053 17.2742 7.21438 17.0303L11.6808 12.5639L16.1473 17.0303C16.3911 17.2742 16.7865 17.2742 17.0303 17.0303C17.2742 16.7865 17.2742 16.3911 17.0303 16.1473L12.5639 11.6808L17.0303 7.21438Z",fill:"currentColor"})})}function o(){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",fill:"none",viewBox:"0 0 12 12",children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.3",d:"M8.625 3.375l-5.25 5.25M3.375 3.375l5.25 5.25"})})}r(67294)},20672:function(e,t,r){"use strict";var n=r(85893);let i=(0,r(67294).forwardRef)((e,t)=>{let{color:r="#45A5FF",backgroundColor:i="#243B5B",...o}=e;return(0,n.jsxs)("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",fill:"none",viewBox:"0 0 15 15",...o,children:[(0,n.jsxs)("g",{filter:"url(#filter0_b_2759_130319)",children:[(0,n.jsx)("rect",{width:"15",height:"15",fill:i,rx:"7.5"}),(0,n.jsx)("path",{fill:r,stroke:r,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.804",d:"M6.146 6.53c.685-.786 1.355-2.952 1.355-2.952S8.17 5.744 8.855 6.53c.667.766 2.031.975 2.031.975s-1.364.209-2.031.975C8.17 9.267 7.5 11.432 7.5 11.432S6.83 9.267 6.146 8.48c-.667-.766-2.03-.975-2.03-.975s1.363-.209 2.03-.975z"})]}),(0,n.jsx)("defs",{children:(0,n.jsxs)("filter",{id:"filter0_b_2759_130319",width:"29",height:"29",x:"-7",y:"-7",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[(0,n.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,n.jsx)("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"3.5"}),(0,n.jsx)("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_2759_130319"}),(0,n.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_2759_130319",result:"shape"})]})})]})});i.displayName="Pro",t.Z=i},62363:function(e,t,r){"use strict";r.d(t,{F5:function(){return f},TG:function(){return p.Z},VA:function(){return o},XZ:function(){return c.Z},_M:function(){return d.Z},s$:function(){return v.Z},_Q:function(){return x.Z},Gq:function(){return w.Z},Oz:function(){return j},CK:function(){return C},QM:function(){return S.Z},QL:function(){return P},$L:function(){return h.Z},Ju:function(){return m},JO:function(){return E},kI:function(){return L},HE:function(){return a.Z},cu:function(){return s},d6:function(){return g},Yq:function(){return b.Z},Gm:function(){return _.ZP},Im:function(){return N},mB:function(){return T.Z},rF:function(){return l.Z},Rj:function(){return u},Sl:function(){return y},ny:function(){return O}});var n=r(85893),i=r(67294);function o(e){return(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{d:"M12 6L8 10L4 6",stroke:"#C0C0C3",strokeLinecap:"round",strokeLinejoin:"round"})})}var a=r(3225);function s(e){let{width:t,height:r}=e;return(0,n.jsxs)("svg",{width:t??16,height:r??16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M12.6667 7.83301H3.33333C2.59695 7.83301 2 8.42996 2 9.16634V13.833C2 14.5694 2.59695 15.1663 3.33333 15.1663H12.6667C13.403 15.1663 14 14.5694 14 13.833V9.16634C14 8.42996 13.403 7.83301 12.6667 7.83301Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M4.66675 7.83301V5.16634C4.66675 4.28229 5.01794 3.43444 5.64306 2.80932C6.26818 2.1842 7.11603 1.83301 8.00008 1.83301C8.88414 1.83301 9.73198 2.1842 10.3571 2.80932C10.9822 3.43444 11.3334 4.28229 11.3334 5.16634V7.83301",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}var l=r(2267);function u(e){return(0,n.jsxs)("svg",{width:e.width??16,height:e.height??16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M2 4.5H3.33333H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.6666 4.49967V13.833C12.6666 14.1866 12.5261 14.5258 12.2761 14.7758C12.026 15.0259 11.6869 15.1663 11.3333 15.1663H4.66659C4.31296 15.1663 3.97382 15.0259 3.72378 14.7758C3.47373 14.5258 3.33325 14.1866 3.33325 13.833V4.49967M5.33325 4.49967V3.16634C5.33325 2.81272 5.47373 2.47358 5.72378 2.22353C5.97383 1.97348 6.31296 1.83301 6.66659 1.83301H9.33325C9.68687 1.83301 10.026 1.97348 10.2761 2.22353C10.5261 2.47358 10.6666 2.81272 10.6666 3.16634V4.49967",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.66675 7.83301V11.833",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.33325 7.83301V11.833",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}var c=r(48247),d=r(79125);function f(e){let{width:t=20,height:r=20,className:i="stroke-current",...o}=e;return(0,n.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,className:i,width:t,height:r,children:[(0,n.jsx)("path",{d:"M5.41671 12.7085C4.61129 12.7085 3.95837 12.0556 3.95837 11.2502V5.62516C3.95837 4.70469 4.70457 3.9585 5.62504 3.9585H11.25C12.0555 3.9585 12.7084 4.61141 12.7084 5.41683",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14.375 7.2915H8.95829C8.03782 7.2915 7.29163 8.0377 7.29163 8.95817V14.3748C7.29163 15.2953 8.03782 16.0415 8.95829 16.0415H14.375C15.2954 16.0415 16.0416 15.2953 16.0416 14.3748V8.95817C16.0416 8.0377 15.2954 7.2915 14.375 7.2915Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}var p=r(40582),h=r(38304);function m(e){let{...t}=e;return(0,n.jsxs)("svg",{width:t.width??"20",height:t.height??"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M3.9585 12.2915V13.5415C3.9585 14.9223 5.07779 16.0415 6.4585 16.0415H13.5418C14.9226 16.0415 16.0418 14.9223 16.0418 13.5415V12.2915",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10 11.8752V3.9585",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.2915 8.9585L9.99984 11.8752L12.7082 8.9585",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}function g(e){let{width:t=24,height:r=16}=e;return(0,n.jsxs)("svg",{fill:"none",height:r,shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:t,children:[(0,n.jsx)("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),(0,n.jsx)("path",{d:"M16 17l5-5-5-5"}),(0,n.jsx)("path",{d:"M21 12H9"})]})}r(53574);var v=r(33048);function y(e){let{stroke:t="currentColor",width:r=16,height:i=16,...o}=e;return(0,n.jsxs)("svg",{...o,xmlns:"http://www.w3.org/2000/svg",width:r,height:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),(0,n.jsx)("path",{d:"M7 11V7a5 5 0 0 1 9.9-1"})]})}r(16135),r(67988);var x=r(59420);r(97686);var b=r(68431);r(77719);var w=r(32155);r(330);var _=r(96394);function j(e){let{className:t,...r}=e;return(0,n.jsxs)("svg",{fill:"none",height:"16",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"24",...r,className:t,children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,n.jsx)("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}function C(e){let{width:t=24,height:r=24,...i}=e;return(0,n.jsxs)("svg",{...i,xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-copy",children:[(0,n.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,n.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}r(66639),r(94441);let k={pen:'<path d="M4.75 19.2512L9 18.2512L18.5625 8.68872C19.46 7.79126 19.46 6.33618 18.5625 5.43872C17.665 4.54126 16.21 4.54126 15.3125 5.43872L5.75 15.0012L4.75 19.2512Z" stroke="currentColor" stroke-width="1.56" stroke-linecap="round" stroke-linejoin="round"/>'};function E(e){let{name:t,...r}=e;return(0,n.jsx)("svg",{fill:"none",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.2",viewBox:"0 0 24 24",dangerouslySetInnerHTML:{__html:k[t]},...r})}var S=r(68364);function N(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_2143_58151)",children:[(0,n.jsx)("path",{d:"M14.7083 6.04163L16.875 8.20829L14.7083 10.375",stroke:"currentColor",strokeWidth:"1.08333",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.125 11.4584V10.375C7.125 9.8004 7.35327 9.2493 7.7596 8.84298C8.16593 8.43665 8.71703 8.20837 9.29167 8.20837H16.875",stroke:"currentColor",strokeWidth:"1.08333",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.29167 17.9583L7.125 15.7917L9.29167 13.625",stroke:"currentColor",strokeWidth:"1.08333",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M16.875 12.5416V13.625C16.875 14.1996 16.6467 14.7507 16.2404 15.157C15.8341 15.5634 15.283 15.7916 14.7083 15.7916H7.125",stroke:"currentColor",strokeWidth:"1.08333",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_2143_58151",children:(0,n.jsx)("rect",{width:"13",height:"13",fill:"white",transform:"translate(5.5 5.5)"})})})]})}function P(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M17.1667 10.0625H11.3542C10.6408 10.0625 10.0625 10.6408 10.0625 11.3542V17.1667C10.0625 17.88 10.6408 18.4583 11.3542 18.4583H17.1667C17.88 18.4583 18.4583 17.88 18.4583 17.1667V11.3542C18.4583 10.6408 17.88 10.0625 17.1667 10.0625Z",stroke:"#C0C0C3",strokeWidth:"1.08",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.47917 13.9375H6.83334C6.49077 13.9375 6.16223 13.8014 5.91999 13.5591C5.67776 13.3169 5.54167 12.9884 5.54167 12.6458V6.83329C5.54167 6.49072 5.67776 6.16218 5.91999 5.91995C6.16223 5.67771 6.49077 5.54163 6.83334 5.54163H12.6458C12.9884 5.54163 13.3169 5.67771 13.5592 5.91995C13.8014 6.16218 13.9375 6.49072 13.9375 6.83329V7.47913",stroke:"#C0C0C3",strokeWidth:"1.08",strokeLinecap:"round",strokeLinejoin:"round"})]})}var L=(0,i.forwardRef)(function(e,t){let{...r}=e;return(0,n.jsxs)("svg",{fill:"none",height:"16",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"24",...r,ref:t,children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10",fill:"var(--geist-fill)"}),(0,n.jsx)("path",{d:"M12 16v-4",stroke:"var(--geist-stroke)"}),(0,n.jsx)("path",{d:"M12 8h.01",stroke:"var(--geist-stroke)"})]})}),T=r(40097);function O(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{fill:"currentColor",d:"M13 12a1 1 0 11-2 0 1 1 0 012 0zM13 8a1 1 0 11-2 0 1 1 0 012 0zM13 16a1 1 0 11-2 0 1 1 0 012 0z"})})}},29065:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{color:t="#FF2E6D",...r}=e;return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:[(0,n.jsx)("path",{d:"M4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.75 9.75L14.25 14.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14.25 9.75L9.75 14.25",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},60422:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{width:t=20,height:r=20}=e;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M14.375 5.625L5.625 14.375",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.625 5.625L14.375 14.375",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}},26085:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{size:t=24}=e;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{cx:12,cy:12,r:"9.35",fill:"#6858F5",stroke:"#6858F5",strokeWidth:"1.3"}),(0,n.jsx)("path",{d:"M7.75 12.75L10 15.25L16.25 8.75",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}r(67294)},31941:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){let{size:t=24}=e;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("g",{clipPath:"url(#clip0_951_45025)",children:(0,n.jsx)("g",{filter:"url(#filter0_d_951_45025)",children:(0,n.jsx)("circle",{cx:12,cy:12,r:"7.79167",stroke:"white",strokeWidth:"1.4",shapeRendering:"geometricPrecision"})})}),(0,n.jsxs)("defs",{children:[(0,n.jsxs)("filter",{id:"filter0_d_951_45025",x:"-0.75",y:"-0.75",width:"25.5",height:"25.5",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,n.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,n.jsx)("feOffset",{}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"2.125"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,n.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),(0,n.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_951_45025"}),(0,n.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_951_45025",result:"shape"})]}),(0,n.jsx)("clipPath",{id:"clip0_951_45025",children:(0,n.jsx)("rect",{width:24,height:24,fill:"white"})})]})]})}r(67294)},17929:function(e,t,r){"use strict";r.d(t,{UQ:function(){return H},vF:function(){return q},Qd:function(){return Z},o4:function(){return W}});var n=r(85893),i=r(67294),o=r(87462),a=r(25360),s=r(13879),l=r(28771),u=r(36206),c=r(77342),d=r(64757),f=r(334),p=r(91276),h=r(78990);let m="Accordion",g=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[v,y,x]=(0,s.B)(m),[b,w]=(0,a.b)(m,[x,f.p_]),_=(0,f.p_)(),j=i.forwardRef((e,t)=>{let{type:r,...n}=e;return i.createElement(v.Provider,{scope:e.__scopeAccordion},"multiple"===r?i.createElement(P,(0,o.Z)({},n,{ref:t})):i.createElement(N,(0,o.Z)({},n,{ref:t})))});j.propTypes={type(e){let t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};let[C,k]=b(m),[E,S]=b(m,{collapsible:!1}),N=i.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:a=()=>{},collapsible:s=!1,...l}=e,[u,d]=(0,c.T)({prop:r,defaultProp:n,onChange:a});return i.createElement(C,{scope:e.__scopeAccordion,value:u?[u]:[],onItemOpen:d,onItemClose:i.useCallback(()=>s&&d(""),[s,d])},i.createElement(E,{scope:e.__scopeAccordion,collapsible:s},i.createElement(O,(0,o.Z)({},l,{ref:t}))))}),P=i.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:a=()=>{},...s}=e,[l=[],u]=(0,c.T)({prop:r,defaultProp:n,onChange:a}),d=i.useCallback(e=>u((t=[])=>[...t,e]),[u]),f=i.useCallback(e=>u((t=[])=>t.filter(t=>t!==e)),[u]);return i.createElement(C,{scope:e.__scopeAccordion,value:l,onItemOpen:d,onItemClose:f},i.createElement(E,{scope:e.__scopeAccordion,collapsible:!0},i.createElement(O,(0,o.Z)({},s,{ref:t}))))}),[L,T]=b(m),O=i.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:n,dir:a,orientation:s="vertical",...c}=e,f=i.useRef(null),p=(0,l.e)(f,t),m=y(r),x="ltr"===(0,h.gm)(a),b=(0,u.M)(e.onKeyDown,e=>{var t;if(!g.includes(e.key))return;let r=e.target,n=m().filter(e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)}),i=n.findIndex(e=>e.ref.current===r),o=n.length;if(-1===i)return;e.preventDefault();let a=i,l=o-1,u=()=>{(a=i+1)>l&&(a=0)},c=()=>{(a=i-1)<0&&(a=l)};switch(e.key){case"Home":a=0;break;case"End":a=l;break;case"ArrowRight":"horizontal"===s&&(x?u():c());break;case"ArrowDown":"vertical"===s&&u();break;case"ArrowLeft":"horizontal"===s&&(x?c():u());break;case"ArrowUp":"vertical"===s&&c()}null===(t=n[a%o].ref.current)||void 0===t||t.focus()});return i.createElement(L,{scope:r,disabled:n,direction:a,orientation:s},i.createElement(v.Slot,{scope:r},i.createElement(d.WV.div,(0,o.Z)({},c,{"data-orientation":s,ref:p,onKeyDown:n?void 0:b}))))}),R="AccordionItem",[A,I]=b(R),M=i.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...a}=e,s=T(R,r),l=k(R,r),u=_(r),c=(0,p.M)(),d=n&&l.value.includes(n)||!1,h=s.disabled||e.disabled;return i.createElement(A,{scope:r,open:d,disabled:h,triggerId:c},i.createElement(f.fC,(0,o.Z)({"data-orientation":s.orientation,"data-state":U(d)},u,a,{ref:t,disabled:h,open:d,onOpenChange:e=>{e?l.onItemOpen(n):l.onItemClose(n)}})))}),D=i.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,a=T(m,r),s=I("AccordionHeader",r);return i.createElement(d.WV.h3,(0,o.Z)({"data-orientation":a.orientation,"data-state":U(s.open),"data-disabled":s.disabled?"":void 0},n,{ref:t}))}),F="AccordionTrigger",z=i.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,a=T(m,r),s=I(F,r),l=S(F,r),u=_(r);return i.createElement(v.ItemSlot,{scope:r},i.createElement(f.xz,(0,o.Z)({"aria-disabled":s.open&&!l.collapsible||void 0,"data-orientation":a.orientation,id:s.triggerId},u,n,{ref:t})))}),B=i.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,a=T(m,r),s=I("AccordionContent",r),l=_(r);return i.createElement(f.VY,(0,o.Z)({role:"region","aria-labelledby":s.triggerId,"data-orientation":a.orientation},l,n,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function U(e){return e?"open":"closed"}var V=r(62469),$=r(1233);let H=j,Z=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(M,{ref:t,className:(0,$.cn)("",r),...i})});Z.displayName="AccordionItem";let W=i.forwardRef((e,t)=>{let{withIcon:r=!0,className:i,children:o,...a}=e;return(0,n.jsx)(D,{className:"flex",children:(0,n.jsxs)(z,{ref:t,className:(0,$.cn)("flex flex-1 items-center justify-between p-2 pr-4 h-11 text-pg-200 gap-2 font-pg-medium text-sm transition-all rounded-pg-base  [&[data-state=open]>svg]:rotate-180","focus-visible:brightness-150",i),...a,children:[o,r&&(0,n.jsx)(V.v4q,{className:"ml-auto h-4 w-4 shrink-0 text-pg-300 transition-transform duration-200"})]})})});W.displayName=z.displayName;let q=i.forwardRef((e,t)=>{let{className:r,children:i,...o}=e;return(0,n.jsx)(B,{ref:t,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:(0,n.jsx)("div",{className:(0,$.cn)("bg-pg-900 rounded-pg-base",r),children:i})})});q.displayName=B.displayName},14319:function(e,t,r){"use strict";r.d(t,{C:function(){return l}});var n=r(85893),i=r(67294),o=r(45139),a=r(1233);let s=(0,o.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus-visible:brightness-150",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",pro:"border-transparent bg-pro text-pro-foreground hover:bg-pro/80",turbo:"border-transparent bg-turbo text-turbo-foreground hover:bg-turbo/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground border border-pg-400 text-pg-300 bg-pg-600 hover:bg-pg-600",info:"border-transparent bg-blue-600 hover:bg-blue-600/80 text-pg-50"},size:{"2xs":"px-2 py-0.5 text-2xs",lg:"px-4 py-1 text-sm h-10"}},defaultVariants:{variant:"default"}}),l=i.forwardRef((e,t)=>{let{as:r="div",className:i,variant:o,size:l,type:u="button",...c}=e;return(0,n.jsx)(r,{..."button"===r?{type:u}:{},ref:t,className:(0,a.cn)(s({variant:o,size:l}),i),...c})});l.displayName="Badge"},13346:function(e,t,r){"use strict";r.d(t,{z:function(){return u}});var n=r(85893),i=r(67294),o=r(4222),a=r(45139),s=r(1233);let l=(0,a.j)("inline-flex items-center justify-center whitespace-nowrap rounded-pg-base text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:brightness-150",{variants:{variant:{default:"bg-pg-700 text-pg-00 shadow hover:bg-pg-600 border-transparent",create:"bg-primary text-primary-foreground shadow hover:bg-primary-hover shadow-[inset_0_2px_0px_rgba(0,0,0,0.6)] shadow-primary-hover",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border bg-pg-500 border-pg-400 shadow-sm hover:bg-pg-400 hover:text-pg-100",ghost:"hover:bg-pg-600 hover:text-pg-100",link:"text-pg-200 underline-offset-4 hover:underline text-base",turbo:"bg-turbo text-turbo-foreground shadow-sm hover:bg-turbo/90",fab:"rounded-pg-md bg-pg-700 hover:bg-pg-600 inset-0 shadow-[inset_0_1px_1px_rgba(0,0,0,0.6)] shadow-pg-400/50 text-pg-300",delete:"hover:text-destructive"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-pg-base px-3 text-xs",lg:"h-10 rounded-pg-base px-6",iconSm:"h-6 w-6 rounded-full",icon:"h-10 w-10 rounded-pg-base",iconLG:"h-14 w-14 rounded-pg-md"}},defaultVariants:{variant:"default",size:"default"}}),u=i.forwardRef((e,t)=>{let{className:r,variant:i,size:a,asChild:u=!1,...c}=e,d=u?o.g7:"button";return(0,n.jsx)(d,{className:(0,s.cn)(l({variant:i,size:a,className:r})),ref:t,...c})});u.displayName="Button"},17615:function(e,t,r){"use strict";r.d(t,{$N:function(){return m},GG:function(){return d},Vq:function(){return l},cZ:function(){return p},fK:function(){return h},hg:function(){return u}});var n=r(85893),i=r(67294),o=r(51865),a=r(62469),s=r(1233);let l=o.fC,u=o.xz,c=o.h_,d=o.x8,f=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(o.aV,{ref:t,className:(0,s.cn)("fixed inset-0 z-50 bg-black/50 backdrop-blur-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),...i})});f.displayName=o.aV.displayName;let p=i.forwardRef((e,t)=>{let{className:r,children:i,...l}=e;return(0,n.jsxs)(c,{children:[(0,n.jsx)(f,{}),(0,n.jsxs)(o.VY,{ref:t,className:(0,s.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border 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-pg-md","bg-background border-none",r),...l,children:[i,(0,n.jsxs)(o.x8,{className:(0,s.cn)("absolute right-6 top-6 rounded-pg-md opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-none focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:text-pg-300"),children:[(0,n.jsx)(a.Pxu,{className:"h-5 w-5"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});p.displayName=o.VY.displayName;let h=e=>{let{className:t,...r}=e;return(0,n.jsx)("div",{className:(0,s.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...r})};h.displayName="DialogHeader";let m=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(o.Dx,{ref:t,className:(0,s.cn)("text-lg font-semibold leading-none tracking-tight",r),...i})});m.displayName=o.Dx.displayName,i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(o.dk,{ref:t,className:(0,s.cn)("text-sm text-pg-300",r),...i})}).displayName=o.dk.displayName},35893:function(e,t,r){"use strict";r.d(t,{$F:function(){return d},AW:function(){return m},Ph:function(){return f},TG:function(){return h},VD:function(){return y},Xi:function(){return g},bO:function(){return v},h_:function(){return c},kt:function(){return p}});var n=r(85893),i=r(67294),o=r(2113),a=r(62469),s=r(1233),l=r(8891),u=r.n(l);let c=o.fC,d=e=>(0,n.jsx)(o.xz,{...e,className:(0,s.cn)("focus-visible:brightness-150",e.className)});o.ZA,o.Uv;let f=o.Tr;o.Ee;let p=i.forwardRef((e,t)=>{let{className:r,inset:i,children:l,...u}=e;return(0,n.jsxs)(o.fF,{ref:t,className:(0,s.cn)("flex cursor-default select-none items-center rounded-pg-base px-2 py-2 h-11 text-sm text-pg-200 font-medium outline-none focus:bg-pg-500 focus:text-pg-100 data-[state=open]:bg-pg-500 data-[state=open]:text-pg-100",i&&"pl-8",r),...u,children:[l,(0,n.jsx)(a.XCv,{className:"ml-auto h-4 w-4"})]})});p.displayName=o.fF.displayName;let h=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(o.tu,{ref:t,className:(0,s.cn)("z-[150] min-w-[8rem] overflow-hidden rounded-pg-md border border-solid border-border bg-pg-700 p-1 text-pg-00 shadow-lg 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",r),...i})});h.displayName=o.tu.displayName;let m=i.forwardRef((e,t)=>{let{className:r,sideOffset:i=4,...a}=e;return(0,n.jsx)(o.Uv,{children:(0,n.jsx)(o.VY,{ref:t,sideOffset:i,className:(0,s.cn)("z-[150] min-w-[8rem] overflow-hidden rounded-pg-md border border-solid border-border bg-pg-700 p-1 text-pg-00 shadow-md","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",r),...a})})});m.displayName=o.VY.displayName;let g=i.forwardRef((e,t)=>{let{className:r,inset:i,mixpanelEvent:a,mixpanelKey:l,...c}=e;return(0,n.jsx)(o.ck,{ref:t,className:(0,s.cn)("relative flex cursor-default select-none items-center rounded-pg-base px-2 py-2 h-11 font-pg-medium text-sm text-pg-200 outline-none focus:bg-pg-500 focus:text-pg-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i&&"pl-8",r),onSelect:e=>{a&&u().track(a,{key:l}),c.onSelect?.(e)},...c})});g.displayName=o.ck.displayName;let v=i.forwardRef((e,t)=>{let{className:r,children:i,checked:l,withCheckmark:u=!0,...c}=e;return(0,n.jsxs)(o.oC,{ref:t,className:(0,s.cn)("relative flex cursor-default select-none items-center rounded-pg-base py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-pg-500 focus:text-pg-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),checked:l,...c,children:[u&&(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(o.wU,{children:(0,n.jsx)(a.nQG,{className:"h-4 w-4"})})}),i]})});v.displayName=o.oC.displayName,i.forwardRef((e,t)=>{let{className:r,children:i,...l}=e;return(0,n.jsxs)(o.Rk,{ref:t,className:(0,s.cn)("relative flex cursor-default select-none items-center rounded-pg-base py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-pg-500 focus:text-pg-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...l,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(o.wU,{children:(0,n.jsx)(a.jXb,{className:"h-4 w-4 fill-current"})})}),i]})}).displayName=o.Rk.displayName,i.forwardRef((e,t)=>{let{className:r,inset:i,...a}=e;return(0,n.jsx)(o.__,{ref:t,className:(0,s.cn)("px-2 py-1.5 text-sm font-semibold",i&&"pl-8",r),...a})}).displayName=o.__.displayName;let y=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(o.Z0,{ref:t,className:(0,s.cn)("-mx-1 my-1 h-px bg-muted",r),...i})});y.displayName=o.Z0.displayName},35382:function(e,t,r){"use strict";r.d(t,{S:function(){return d}});var n=r(85893),i=r(67294),o=r(13346),a=r(1233),s=r(373),l=r(97115),u=r(19387),c=r(33554);function d(e){let{children:t,className:r,onDelete:l,value:u,onChange:d,...p}=e,h=(0,i.useRef)(null);function m(e){e.stopPropagation(),h.current?.click()}let[g,v]=(0,i.useState)(null),y=l&&u,x="string"==typeof u;return(0,n.jsxs)(f,{onClick:e=>t?null:m(e),...p,className:(0,a.cn)("flex group items-center justify-center h-24",r),ref:v,disabled:p.disabled,children:[(0,n.jsx)("input",{ref:h,hidden:!0,type:"file",onChange:d,accept:p.accept,disabled:p.disabled}),x?(0,n.jsx)("img",{...p.ImageProps,style:{maxHeight:g?.clientHeight,maxWidth:g?.clientWidth,...p?.ImageProps?.style},className:(0,a.cn)("absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transition-all duration-100",p.ImageProps?.className),src:u,alt:"Image preview"}):(0,n.jsxs)(o.z,{type:"button",className:"relative gap-2",onClick:m,children:[(0,n.jsx)(s.p,{className:"h-4 w-4"}),"Upload Image"]}),t,y?(0,n.jsx)(o.z,{onClick:e=>{e.stopPropagation(),l()},type:"button",size:"icon",className:(0,a.cn)("absolute bottom-2 right-2 group-hover:opacity-100 opacity-0 transition-all duration-100","hover:text-destructive bg-transparent hover:bg-transparent shadow-none"),children:(0,n.jsx)(c.X,{})}):null]})}let f=(0,i.forwardRef)((e,t)=>{let[r,o]=i.useState(!1);return(0,n.jsxs)("div",{...e,onDragOver:t=>{e.disabled||(t.preventDefault(),o(!0),e.onDragOver?.(t))},onDragLeave:t=>{e.disabled||(t.preventDefault(),o(!1),e.onDragLeave?.(t))},onDrop:t=>{e.disabled||(t.preventDefault(),o(!1),e.onMouseLeave?.(t),e.onDrop?.(t))},ref:t,"aria-label":"Dropzone",onClick:e.onClick,className:(0,a.cn)("relative cursor-pointer",e.className),children:[(0,n.jsx)(u.A,{}),r?(0,n.jsxs)("div",{className:"text-pg-200 absolute flex-col gap-1 z-10 inset-0 bg-pg-600/80 bg-opacity-50 flex justify-center items-center pointer-events-none",children:[(0,n.jsx)(l.N,{className:"h-8 w-8"}),(0,n.jsx)("p",{className:"text-sm",children:"Drop image here"})]}):null,e.children]})});f.displayName="Dropzone"},87297:function(e,t,r){"use strict";r.d(t,{h:function(){return a}});var n=r(85893),i=r(67294),o=r(1233);let a=(0,i.forwardRef)((e,t)=>(0,n.jsx)("button",{...e,ref:t,className:(0,o.cn)("bg-gray-95 flex rounded-full items-center justify-center w-10 h-10  text-gray-10 border border-solid border-gray-85","hover:bg-gray-90 hover:border-gray-80","active:scale-105",e.className),type:"button",children:e.children}));a.displayName="IconButton"},12242:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(85893),i=r(67294),o=r(1233);let a=i.forwardRef((e,t)=>{let{className:r,type:i,...a}=e;return(0,n.jsx)("input",{type:i,className:(0,o.cn)("flex h-9 w-full rounded-md px-3 py-1 shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50","border border-pg-600","selection:bg-selection text-md xs:text-base text-pg-100 placeholder:text-pg-300","bg-pg-700 hover:bg-pg-700","focus-visible:brightness-125",r),ref:t,...a})});a.displayName="Input"},17877:function(e,t,r){"use strict";r.d(t,{K:function(){return a},d:function(){return o}});var n=r(85893),i=r(1233);function o(e){return(0,n.jsx)("img",{src:"https://cdn.playground.com/logo/logo-v1.png",...e,className:(0,i.cn)("h-full w-full object-contain",e.className)})}function a(e){return(0,n.jsx)("img",{src:"https://cdn.playground.com/logo/logo-icon-v1.png",...e,className:(0,i.cn)("h-full w-full object-contain",e.className)})}},21506:function(e,t,r){"use strict";r.d(t,{q:function(){return o}});var n=r(85893),i=r(1233);function o(e){return(0,n.jsx)("div",{className:(0,i.cn)({"bg-pg-600 text-pg-200":"default"===e.variant||!e.variant,"bg-yellow-600/10 text-yellow-600":"warning"===e.variant,"bg-green-500/10 text-green-400":"success"===e.variant,"bg-red-500/10 text-red-400":"error"===e.variant,"bg-blue-500/15 text-blue-400":"info"===e.variant},"animate-in zoom-in-95","text-sm p-3 rounded-pg-base",e.className),children:e.children})}},68450:function(e,t,r){"use strict";r.d(t,{J2:function(){return s},xo:function(){return l},xp:function(){return u},yk:function(){return c}});var n=r(85893),i=r(67294),o=r(90021),a=r(1233);let s=o.fC,l=o.xz;o.ee;let u=o.x8,c=i.forwardRef((e,t)=>{let{className:r,align:i="center",sideOffset:s=4,...l}=e;return(0,n.jsx)(o.h_,{children:(0,n.jsx)(o.VY,{ref:t,align:i,sideOffset:s,className:(0,a.cn)("z-50 w-72 rounded-md border border-pg-600 bg-pg-700 p-4 text-pg-200 shadow-md outline-none 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",r),...l})})});c.displayName=o.VY.displayName},13728:function(e,t,r){"use strict";r.d(t,{x:function(){return G}});var n=r(85893),i=r(67294),o=r(87462),a=r(64757),s=r(29115),l=r(25360),u=r(28771),c=r(79698),d=r(78990),f=r(9981),p=r(42614),h=r(36206);let m="ScrollArea",[g,v]=(0,l.b)(m),[y,x]=g(m),b=(0,i.forwardRef)((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:l=600,...c}=e,[f,p]=(0,i.useState)(null),[h,m]=(0,i.useState)(null),[g,v]=(0,i.useState)(null),[x,b]=(0,i.useState)(null),[w,_]=(0,i.useState)(null),[j,C]=(0,i.useState)(0),[k,E]=(0,i.useState)(0),[S,N]=(0,i.useState)(!1),[P,L]=(0,i.useState)(!1),T=(0,u.e)(t,e=>p(e)),O=(0,d.gm)(s);return(0,i.createElement)(y,{scope:r,type:n,dir:O,scrollHideDelay:l,scrollArea:f,viewport:h,onViewportChange:m,content:g,onContentChange:v,scrollbarX:x,onScrollbarXChange:b,scrollbarXEnabled:S,onScrollbarXEnabledChange:N,scrollbarY:w,onScrollbarYChange:_,scrollbarYEnabled:P,onScrollbarYEnabledChange:L,onCornerWidthChange:C,onCornerHeightChange:E},(0,i.createElement)(a.WV.div,(0,o.Z)({dir:O},c,{ref:T,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})))}),w=(0,i.forwardRef)((e,t)=>{let{__scopeScrollArea:r,children:n,...s}=e,l=x("ScrollAreaViewport",r),c=(0,i.useRef)(null),d=(0,u.e)(t,c,l.onViewportChange);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),(0,i.createElement)(a.WV.div,(0,o.Z)({"data-radix-scroll-area-viewport":""},s,{ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style}}),(0,i.createElement)("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),_="ScrollAreaScrollbar",j=(0,i.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,a=x(_,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,u="horizontal"===e.orientation;return(0,i.useEffect)(()=>(u?s(!0):l(!0),()=>{u?s(!1):l(!1)}),[u,s,l]),"hover"===a.type?(0,i.createElement)(C,(0,o.Z)({},n,{ref:t,forceMount:r})):"scroll"===a.type?(0,i.createElement)(k,(0,o.Z)({},n,{ref:t,forceMount:r})):"auto"===a.type?(0,i.createElement)(E,(0,o.Z)({},n,{ref:t,forceMount:r})):"always"===a.type?(0,i.createElement)(S,(0,o.Z)({},n,{ref:t})):null}),C=(0,i.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,a=x(_,e.__scopeScrollArea),[l,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=a.scrollArea,t=0;if(e){let r=()=>{window.clearTimeout(t),u(!0)},n=()=>{t=window.setTimeout(()=>u(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[a.scrollArea,a.scrollHideDelay]),(0,i.createElement)(s.z,{present:r||l},(0,i.createElement)(E,(0,o.Z)({"data-state":l?"visible":"hidden"},n,{ref:t})))}),k=(0,i.forwardRef)((e,t)=>{var r,n;let{forceMount:a,...l}=e,u=x(_,e.__scopeScrollArea),c="horizontal"===e.orientation,d=Z(()=>p("SCROLL_END"),100),[f,p]=(r="hidden",n={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},(0,i.useReducer)((e,t)=>{let r=n[e][t];return null!=r?r:e},r));return(0,i.useEffect)(()=>{if("idle"===f){let e=window.setTimeout(()=>p("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(e)}},[f,u.scrollHideDelay,p]),(0,i.useEffect)(()=>{let e=u.viewport,t=c?"scrollLeft":"scrollTop";if(e){let r=e[t],n=()=>{let n=e[t];r!==n&&(p("SCROLL"),d()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[u.viewport,c,p,d]),(0,i.createElement)(s.z,{present:a||"hidden"!==f},(0,i.createElement)(S,(0,o.Z)({"data-state":"hidden"===f?"hidden":"visible"},l,{ref:t,onPointerEnter:(0,h.M)(e.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:(0,h.M)(e.onPointerLeave,()=>p("POINTER_LEAVE"))})))}),E=(0,i.forwardRef)((e,t)=>{let r=x(_,e.__scopeScrollArea),{forceMount:n,...a}=e,[l,u]=(0,i.useState)(!1),c="horizontal"===e.orientation,d=Z(()=>{if(r.viewport){let e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;u(c?e:t)}},10);return W(r.viewport,d),W(r.content,d),(0,i.createElement)(s.z,{present:n||l},(0,i.createElement)(S,(0,o.Z)({"data-state":l?"visible":"hidden"},a,{ref:t})))}),S=(0,i.forwardRef)((e,t)=>{let{orientation:r="vertical",...n}=e,a=x(_,e.__scopeScrollArea),s=(0,i.useRef)(null),l=(0,i.useRef)(0),[u,c]=(0,i.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=B(u.viewport,u.content),f={...n,sizes:u,onSizesChange:c,hasThumb:!!(d>0&&d<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function p(e,t){return function(e,t,r,n="ltr"){let i=U(r),o=t||i/2,a=r.scrollbar.paddingStart+o,s=r.scrollbar.size-r.scrollbar.paddingEnd-(i-o),l=r.content-r.viewport;return $([a,s],"ltr"===n?[0,l]:[-1*l,0])(e)}(e,l.current,u,t)}return"horizontal"===r?(0,i.createElement)(N,(0,o.Z)({},f,{ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){let e=V(a.viewport.scrollLeft,u,a.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=p(e,a.dir))}})):"vertical"===r?(0,i.createElement)(P,(0,o.Z)({},f,{ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){let e=V(a.viewport.scrollTop,u);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=p(e))}})):null}),N=(0,i.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,...a}=e,s=x(_,e.__scopeScrollArea),[l,c]=(0,i.useState)(),d=(0,i.useRef)(null),f=(0,u.e)(t,d,s.onScrollbarXChange);return(0,i.useEffect)(()=>{d.current&&c(getComputedStyle(d.current))},[d]),(0,i.createElement)(O,(0,o.Z)({"data-orientation":"horizontal"},a,{ref:f,sizes:r,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":U(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(s.viewport){let n=s.viewport.scrollLeft+t.deltaX;e.onWheelScroll(n),n>0&&n<r&&t.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:z(l.paddingLeft),paddingEnd:z(l.paddingRight)}})}}))}),P=(0,i.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,...a}=e,s=x(_,e.__scopeScrollArea),[l,c]=(0,i.useState)(),d=(0,i.useRef)(null),f=(0,u.e)(t,d,s.onScrollbarYChange);return(0,i.useEffect)(()=>{d.current&&c(getComputedStyle(d.current))},[d]),(0,i.createElement)(O,(0,o.Z)({"data-orientation":"vertical"},a,{ref:f,sizes:r,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":U(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(s.viewport){let n=s.viewport.scrollTop+t.deltaY;e.onWheelScroll(n),n>0&&n<r&&t.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:z(l.paddingTop),paddingEnd:z(l.paddingBottom)}})}}))}),[L,T]=g(_),O=(0,i.forwardRef)((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:l,onThumbPointerUp:d,onThumbPointerDown:f,onThumbPositionChange:p,onDragScroll:m,onWheelScroll:g,onResize:v,...y}=e,b=x(_,r),[w,j]=(0,i.useState)(null),C=(0,u.e)(t,e=>j(e)),k=(0,i.useRef)(null),E=(0,i.useRef)(""),S=b.viewport,N=n.content-n.viewport,P=(0,c.W)(g),T=(0,c.W)(p),O=Z(v,10);function R(e){k.current&&m({x:e.clientX-k.current.left,y:e.clientY-k.current.top})}return(0,i.useEffect)(()=>{let e=e=>{let t=e.target;(null==w?void 0:w.contains(t))&&P(e,N)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[S,w,N,P]),(0,i.useEffect)(T,[n,T]),W(w,O),W(b.content,O),(0,i.createElement)(L,{scope:r,scrollbar:w,hasThumb:s,onThumbChange:(0,c.W)(l),onThumbPointerUp:(0,c.W)(d),onThumbPositionChange:T,onThumbPointerDown:(0,c.W)(f)},(0,i.createElement)(a.WV.div,(0,o.Z)({},y,{ref:C,style:{position:"absolute",...y.style},onPointerDown:(0,h.M)(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),k.current=w.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),R(e))}),onPointerMove:(0,h.M)(e.onPointerMove,R),onPointerUp:(0,h.M)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=E.current,b.viewport&&(b.viewport.style.scrollBehavior=""),k.current=null})})))}),R="ScrollAreaThumb",A=(0,i.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,a=T(R,e.__scopeScrollArea);return(0,i.createElement)(s.z,{present:r||a.hasThumb},(0,i.createElement)(I,(0,o.Z)({ref:t},n)))}),I=(0,i.forwardRef)((e,t)=>{let{__scopeScrollArea:r,style:n,...s}=e,l=x(R,r),c=T(R,r),{onThumbPositionChange:d}=c,f=(0,u.e)(t,e=>c.onThumbChange(e)),p=(0,i.useRef)(),m=Z(()=>{p.current&&(p.current(),p.current=void 0)},100);return(0,i.useEffect)(()=>{let e=l.viewport;if(e){let t=()=>{if(m(),!p.current){let t=H(e,d);p.current=t,d()}};return d(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[l.viewport,m,d]),(0,i.createElement)(a.WV.div,(0,o.Z)({"data-state":c.hasThumb?"visible":"hidden"},s,{ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:(0,h.M)(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;c.onThumbPointerDown({x:r,y:n})}),onPointerUp:(0,h.M)(e.onPointerUp,c.onThumbPointerUp)}))}),M="ScrollAreaCorner",D=(0,i.forwardRef)((e,t)=>{let r=x(M,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&n?(0,i.createElement)(F,(0,o.Z)({},e,{ref:t})):null}),F=(0,i.forwardRef)((e,t)=>{let{__scopeScrollArea:r,...n}=e,s=x(M,r),[l,u]=(0,i.useState)(0),[c,d]=(0,i.useState)(0),f=!!(l&&c);return W(s.scrollbarX,()=>{var e;let t=(null===(e=s.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;s.onCornerHeightChange(t),d(t)}),W(s.scrollbarY,()=>{var e;let t=(null===(e=s.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;s.onCornerWidthChange(t),u(t)}),f?(0,i.createElement)(a.WV.div,(0,o.Z)({},n,{ref:t,style:{width:l,height:c,position:"absolute",right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:0,...e.style}})):null});function z(e){return e?parseInt(e,10):0}function B(e,t){let r=e/t;return isNaN(r)?0:r}function U(e){let t=B(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-r)*t,18)}function V(e,t,r="ltr"){let n=U(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=(0,p.u)(e,"ltr"===r?[0,a]:[-1*a,0]);return $([0,a],[0,o-n])(s)}function $(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}let H=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return!function i(){let o={left:e.scrollLeft,top:e.scrollTop},a=r.left!==o.left,s=r.top!==o.top;(a||s)&&t(),r=o,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function Z(e,t){let r=(0,c.W)(e),n=(0,i.useRef)(0);return(0,i.useEffect)(()=>()=>window.clearTimeout(n.current),[]),(0,i.useCallback)(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function W(e,t){let r=(0,c.W)(t);(0,f.b)(()=>{let t=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}var q=r(1233);let G=i.forwardRef((e,t)=>{let{className:r,children:i,ViewportProps:o,...a}=e;return(0,n.jsxs)(b,{ref:t,className:(0,q.cn)("relative overflow-hidden",r),...a,children:[(0,n.jsx)(w,{...o,className:(0,q.cn)("h-full w-full rounded-[inherit]",o?.className),children:i}),(0,n.jsx)(Y,{}),(0,n.jsx)(D,{})]})});G.displayName=b.displayName;let Y=i.forwardRef((e,t)=>{let{className:r,orientation:i="vertical",...o}=e;return(0,n.jsx)(j,{ref:t,orientation:i,className:(0,q.cn)("z-50 flex touch-none select-none transition-colors","vertical"===i&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===i&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",r),...o,children:(0,n.jsx)(A,{className:"relative flex-1 rounded-full bg-border"})})});Y.displayName=j.displayName},25554:function(e,t,r){"use strict";r.d(t,{Bw:function(){return p},Ph:function(){return l},Ql:function(){return h},i4:function(){return c},ki:function(){return u}});var n=r(85893),i=r(67294),o=r(62469),a=r(32036),s=r(1233);let l=a.fC;a.ZA;let u=a.B4,c=i.forwardRef((e,t)=>{let{className:r,children:i,...l}=e;return(0,n.jsxs)(a.xz,{ref:t,className:(0,s.cn)("flex gap-4 bg-pg-700 hover:bg-pg-600 transition-colors duration-100 border-none h-11 w-full items-center justify-between whitespace-nowrap rounded-pg-base border border-pg-500 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","text-sm font-medium","focus:outline-none focus:ring-0 group","focus-visible:brightness-150",r),...l,children:[i,(0,n.jsx)(a.JO,{asChild:!0,className:"shrink-0",children:(0,n.jsx)(o.VAA,{className:"h-4 w-4 opacity-50 ml-auto group-data-[state=open]:rotate-180 transition-transform duration-100"})})]})});c.displayName=a.xz.displayName;let d=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(a.u_,{ref:t,className:(0,s.cn)("flex cursor-default items-center justify-center py-1",r),...i,children:(0,n.jsx)(o.g8U,{})})});d.displayName=a.u_.displayName;let f=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(a.$G,{ref:t,className:(0,s.cn)("flex cursor-default items-center justify-center py-1",r),...i,children:(0,n.jsx)(o.v4q,{})})});f.displayName=a.$G.displayName;let p=i.forwardRef((e,t)=>{let{className:r,children:i,position:o="popper",...l}=e;return(0,n.jsx)(a.h_,{children:(0,n.jsxs)(a.VY,{ref:e=>{e?.addEventListener("touchend",e=>e.preventDefault()),t&&("function"==typeof t?t(e):t.current=e)},className:(0,s.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-pg-base border border-pg-600 bg-pg-700 text-popover-foreground shadow-md 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","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:o,...l,children:[(0,n.jsx)(d,{}),(0,n.jsx)(a.l_,{className:(0,s.cn)("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),(0,n.jsx)(f,{})]})})});p.displayName=a.VY.displayName,i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(a.__,{ref:t,className:(0,s.cn)("px-2 py-1.5 text-sm font-semibold",r),...i})}).displayName=a.__.displayName;let h=i.forwardRef((e,t)=>{let{className:r,children:i,...l}=e;return(0,n.jsxs)(a.ck,{ref:t,className:(0,s.cn)("relative gap-3 flex w-full cursor-default h-11 select-none items-center rounded-pg-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-pg-500 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...l,children:[(0,n.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(a.wU,{children:(0,n.jsx)(o.nQG,{className:"h-4 w-4"})})}),(0,n.jsx)(a.eT,{className:"font-medium text-sm",children:i})]})});h.displayName=a.ck.displayName,i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(a.Z0,{ref:t,className:(0,s.cn)("-mx-1 my-1 h-px bg-muted",r),...i})}).displayName=a.Z0.displayName},30506:function(e,t,r){"use strict";r.d(t,{O:function(){return o}});var n=r(85893),i=r(1233);function o(e){let{className:t,...r}=e;return(0,n.jsx)("div",{className:(0,i.cn)("animate-pulse rounded-md bg-pg-300/10",t),...r})}},69501:function(e,t,r){"use strict";r.d(t,{i:function(){return q}});var n=r(85893),i=r(67294),o=r(87462),a=r(42614),s=r(36206),l=r(28771),u=r(25360),c=r(77342),d=r(78990),f=r(57898),p=r(7546),h=r(64757),m=r(13879);let g=["PageUp","PageDown"],v=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},x="Slider",[b,w,_]=(0,m.B)(x),[j,C]=(0,u.b)(x,[_]),[k,E]=j(x),S=(0,i.forwardRef)((e,t)=>{let{name:r,min:n=0,max:u=100,step:d=1,orientation:f="horizontal",disabled:p=!1,minStepsBetweenThumbs:h=0,defaultValue:m=[n],value:y,onValueChange:x=()=>{},onValueCommit:w=()=>{},inverted:_=!1,...j}=e,[C,E]=(0,i.useState)(null),S=(0,l.e)(t,e=>E(e)),N=(0,i.useRef)(new Set),P=(0,i.useRef)(0),O="horizontal"===f,R=!C||!!C.closest("form"),[A=[],I]=(0,c.T)({prop:y,defaultProp:m,onChange:e=>{var t;null===(t=[...N.current][P.current])||void 0===t||t.focus(),x(e)}}),M=(0,i.useRef)(A);function D(e,t,{commit:r}={commit:!1}){let i=(String(d).split(".")[1]||"").length,o=function(e,t){let r=Math.pow(10,t);return Math.round(e*r)/r}(Math.round((e-n)/d)*d+n,i),s=(0,a.u)(o,[n,u]);I((e=[])=>{var n,i;let o=function(e=[],t,r){let n=[...e];return n[r]=t,n.sort((e,t)=>e-t)}(e,s,t);if(n=o,!(!((i=h*d)>0)||Math.min(...n.slice(0,-1).map((e,t)=>n[t+1]-e))>=i))return e;{P.current=o.indexOf(s);let t=String(o)!==String(e);return t&&r&&w(o),t?o:e}})}return(0,i.createElement)(k,{scope:e.__scopeSlider,disabled:p,min:n,max:u,valueIndexToChangeRef:P,thumbs:N.current,values:A,orientation:f},(0,i.createElement)(b.Provider,{scope:e.__scopeSlider},(0,i.createElement)(b.Slot,{scope:e.__scopeSlider},(0,i.createElement)(O?L:T,(0,o.Z)({"aria-disabled":p,"data-disabled":p?"":void 0},j,{ref:S,onPointerDown:(0,s.M)(j.onPointerDown,()=>{p||(M.current=A)}),min:n,max:u,inverted:_,onSlideStart:p?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let r=e.map(e=>Math.abs(e-t));return r.indexOf(Math.min(...r))}(A,e);D(e,t)},onSlideMove:p?void 0:function(e){D(e,P.current)},onSlideEnd:p?void 0:function(){let e=M.current[P.current];A[P.current]!==e&&w(A)},onHomeKeyDown:()=>!p&&D(n,0,{commit:!0}),onEndKeyDown:()=>!p&&D(u,A.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!p){let r=g.includes(e.key)||e.shiftKey&&v.includes(e.key),n=P.current;D(A[n]+d*(r?10:1)*t,n,{commit:!0})}}})))),R&&A.map((e,t)=>(0,i.createElement)(z,{key:t,name:r?r+(A.length>1?"[]":""):void 0,value:e})))}),[N,P]=j(x,{startEdge:"left",endEdge:"right",size:"width",direction:1}),L=(0,i.forwardRef)((e,t)=>{let{min:r,max:n,dir:a,inverted:s,onSlideStart:u,onSlideMove:c,onSlideEnd:f,onStepKeyDown:p,...h}=e,[m,g]=(0,i.useState)(null),v=(0,l.e)(t,e=>g(e)),x=(0,i.useRef)(),b=(0,d.gm)(a),w="ltr"===b,_=w&&!s||!w&&s;function j(e){let t=x.current||m.getBoundingClientRect(),i=U([0,t.width],_?[r,n]:[n,r]);return x.current=t,i(e-t.left)}return(0,i.createElement)(N,{scope:e.__scopeSlider,startEdge:_?"left":"right",endEdge:_?"right":"left",direction:_?1:-1,size:"width"},(0,i.createElement)(O,(0,o.Z)({dir:b,"data-orientation":"horizontal"},h,{ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=j(e.clientX);null==u||u(t)},onSlideMove:e=>{let t=j(e.clientX);null==c||c(t)},onSlideEnd:()=>{x.current=void 0,null==f||f()},onStepKeyDown:e=>{let t=y[_?"from-left":"from-right"].includes(e.key);null==p||p({event:e,direction:t?-1:1})}})))}),T=(0,i.forwardRef)((e,t)=>{let{min:r,max:n,inverted:a,onSlideStart:s,onSlideMove:u,onSlideEnd:c,onStepKeyDown:d,...f}=e,p=(0,i.useRef)(null),h=(0,l.e)(t,p),m=(0,i.useRef)(),g=!a;function v(e){let t=m.current||p.current.getBoundingClientRect(),i=U([0,t.height],g?[n,r]:[r,n]);return m.current=t,i(e-t.top)}return(0,i.createElement)(N,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1},(0,i.createElement)(O,(0,o.Z)({"data-orientation":"vertical"},f,{ref:h,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=v(e.clientY);null==s||s(t)},onSlideMove:e=>{let t=v(e.clientY);null==u||u(t)},onSlideEnd:()=>{m.current=void 0,null==c||c()},onStepKeyDown:e=>{let t=y[g?"from-bottom":"from-top"].includes(e.key);null==d||d({event:e,direction:t?-1:1})}})))}),O=(0,i.forwardRef)((e,t)=>{let{__scopeSlider:r,onSlideStart:n,onSlideMove:a,onSlideEnd:l,onHomeKeyDown:u,onEndKeyDown:c,onStepKeyDown:d,...f}=e,p=E(x,r);return(0,i.createElement)(h.WV.span,(0,o.Z)({},f,{ref:t,onKeyDown:(0,s.M)(e.onKeyDown,e=>{"Home"===e.key?(u(e),e.preventDefault()):"End"===e.key?(c(e),e.preventDefault()):g.concat(v).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,s.M)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),p.thumbs.has(t)?t.focus():n(e)}),onPointerMove:(0,s.M)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:(0,s.M)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})}))}),R=(0,i.forwardRef)((e,t)=>{let{__scopeSlider:r,...n}=e,a=E("SliderTrack",r);return(0,i.createElement)(h.WV.span,(0,o.Z)({"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation},n,{ref:t}))}),A="SliderRange",I=(0,i.forwardRef)((e,t)=>{let{__scopeSlider:r,...n}=e,a=E(A,r),s=P(A,r),u=(0,i.useRef)(null),c=(0,l.e)(t,u),d=a.values.length,f=a.values.map(e=>B(e,a.min,a.max));return(0,i.createElement)(h.WV.span,(0,o.Z)({"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0},n,{ref:c,style:{...e.style,[s.startEdge]:(d>1?Math.min(...f):0)+"%",[s.endEdge]:100-Math.max(...f)+"%"}}))}),M="SliderThumb",D=(0,i.forwardRef)((e,t)=>{let r=w(e.__scopeSlider),[n,a]=(0,i.useState)(null),s=(0,l.e)(t,e=>a(e)),u=(0,i.useMemo)(()=>n?r().findIndex(e=>e.ref.current===n):-1,[r,n]);return(0,i.createElement)(F,(0,o.Z)({},e,{ref:s,index:u}))}),F=(0,i.forwardRef)((e,t)=>{var r;let{__scopeSlider:n,index:a,...u}=e,c=E(M,n),d=P(M,n),[f,m]=(0,i.useState)(null),g=(0,l.e)(t,e=>m(e)),v=(0,p.t)(f),y=c.values[a],x=void 0===y?0:B(y,c.min,c.max),w=(r=c.values.length)>2?`Value ${a+1} of ${r}`:2===r?["Minimum","Maximum"][a]:void 0,_=null==v?void 0:v[d.size],j=_?function(e,t,r){let n=e/2,i=U([0,50],[0,n]);return(n-i(t)*r)*r}(_,x,d.direction):0;return(0,i.useEffect)(()=>{if(f)return c.thumbs.add(f),()=>{c.thumbs.delete(f)}},[f,c.thumbs]),(0,i.createElement)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${x}% + ${j}px)`}},(0,i.createElement)(b.ItemSlot,{scope:e.__scopeSlider},(0,i.createElement)(h.WV.span,(0,o.Z)({role:"slider","aria-label":e["aria-label"]||w,"aria-valuemin":c.min,"aria-valuenow":y,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0},u,{ref:g,style:void 0===y?{display:"none"}:e.style,onFocus:(0,s.M)(e.onFocus,()=>{c.valueIndexToChangeRef.current=a})}))))}),z=e=>{let{value:t,...r}=e,n=(0,i.useRef)(null),a=(0,f.D)(t);return(0,i.useEffect)(()=>{let e=n.current,r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(a!==t&&r){let n=new Event("input",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[a,t]),(0,i.createElement)("input",(0,o.Z)({style:{display:"none"}},r,{ref:n,defaultValue:t}))};function B(e,t,r){return(0,a.u)(100/(r-t)*(e-t),[0,100])}function U(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}var V=r(45139),$=r(1233);let H=(0,V.j)("relative flex w-full touch-none select-none items-center focus-within:brightness-150",{variants:{variant:{default:"",round:"rounded-full"}},defaultVariants:{variant:"default"}}),Z=(0,V.j)("relative w-full grow overflow-hidden",{variants:{variant:{default:"h-2.5 bg-pg-600 rounded-full",round:"h-1 bg-pg-600 rounded-full"}},defaultVariants:{variant:"default"}}),W=(0,V.j)("block cursor-pointer shadow transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"h-5 w-2 rounded-pg-xs bg-pg-100",round:"h-[14px] w-[14px] rounded-full bg-pg-100"}},defaultVariants:{variant:"default"}}),q=i.forwardRef((e,t)=>{let{className:r,label:i,LabelProps:o,valueLabel:a,editableValueLabel:s=!1,ValueLabelProps:l,variant:u,...c}=e,d=a||0===a;return(0,n.jsxs)("div",{className:"flex items-center gap-2 h-2 w-full",children:[i?(0,n.jsx)("span",{...o,className:(0,$.cn)("py-0.5 text-left rounded-full text-xs shrink-0 text-pg-200",o?.className),children:i}):null,(0,n.jsxs)(S,{ref:t,className:(0,$.cn)(H({variant:u}),r),...c,children:[(0,n.jsx)(R,{className:(0,$.cn)(Z({variant:u})),children:(0,n.jsx)(I,{className:"absolute h-full bg-pg-400"})}),(0,n.jsx)(D,{className:(0,$.cn)(W({variant:u}))})]}),s?(0,n.jsx)(G,{...c}):d?(0,n.jsx)("span",{...l,className:(0,$.cn)("bg-pg-600 h-6 items-center justify-center flex shrink-0 w-12 text-center rounded-pg-base text-xs",l?.className),children:a}):null]})});function G(e){let{value:t,onValueChange:r,min:o,max:a,step:s=1,ValueLabelProps:l}=e,[u,c]=i.useState(t?.[0]);return i.useEffect(()=>{t?.[0]!==u&&c(t?.[0])},[t]),(0,n.jsx)("input",{...l,type:"text",className:(0,$.cn)("bg-pg-600 h-6 items-center justify-center flex shrink-0 w-12 text-center rounded-pg-base text-xs","focus-visible:brightness-150 focus:outline-none selection:bg-selection",l?.className),value:u,onChange:e=>{let t=Number(e.currentTarget.value);""===e.currentTarget.value?c(void 0):isNaN(t)||c(t)},onBlur:e=>{if(!o&&0!==o||!a||!s)return console.warn("Slider is missing min, max, or step props");let t=Number(e.currentTarget.value)||o;t=Math.round((t-o)/s)*s+o;let n=s.toString().split(".")[1]?.length??0;(t=Number(t.toFixed(n)))>a&&(t=a),t<o&&(t=o),c(t),r?.([t])},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()}})}q.displayName=S.displayName},71084:function(e,t,r){"use strict";r.d(t,{r:function(){return j}});var n=r(85893),i=r(67294),o=r(87462),a=r(36206),s=r(28771),l=r(25360),u=r(77342),c=r(57898),d=r(7546),f=r(64757);let p="Switch",[h,m]=(0,l.b)(p),[g,v]=h(p),y=(0,i.forwardRef)((e,t)=>{let{__scopeSwitch:r,name:n,checked:l,defaultChecked:c,required:d,disabled:p,value:h="on",onCheckedChange:m,...v}=e,[y,x]=(0,i.useState)(null),_=(0,s.e)(t,e=>x(e)),j=(0,i.useRef)(!1),C=!y||!!y.closest("form"),[k=!1,E]=(0,u.T)({prop:l,defaultProp:c,onChange:m});return(0,i.createElement)(g,{scope:r,checked:k,disabled:p},(0,i.createElement)(f.WV.button,(0,o.Z)({type:"button",role:"switch","aria-checked":k,"aria-required":d,"data-state":w(k),"data-disabled":p?"":void 0,disabled:p,value:h},v,{ref:_,onClick:(0,a.M)(e.onClick,e=>{E(e=>!e),C&&(j.current=e.isPropagationStopped(),j.current||e.stopPropagation())})})),C&&(0,i.createElement)(b,{control:y,bubbles:!j.current,name:n,value:h,checked:k,required:d,disabled:p,style:{transform:"translateX(-100%)"}}))}),x=(0,i.forwardRef)((e,t)=>{let{__scopeSwitch:r,...n}=e,a=v("SwitchThumb",r);return(0,i.createElement)(f.WV.span,(0,o.Z)({"data-state":w(a.checked),"data-disabled":a.disabled?"":void 0},n,{ref:t}))}),b=e=>{let{control:t,checked:r,bubbles:n=!0,...a}=e,s=(0,i.useRef)(null),l=(0,c.D)(r),u=(0,d.t)(t);return(0,i.useEffect)(()=>{let e=s.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(l!==r&&t){let i=new Event("click",{bubbles:n});t.call(e,r),e.dispatchEvent(i)}},[l,r,n]),(0,i.createElement)("input",(0,o.Z)({type:"checkbox","aria-hidden":!0,defaultChecked:r},a,{tabIndex:-1,ref:s,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function w(e){return e?"checked":"unchecked"}var _=r(1233);let j=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(y,{className:(0,_.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:brightness-125 disabled:cursor-not-allowed disabled:opacity-50",r,'aria-[checked="false"]:bg-pg-400 aria-[checked="true"]:bg-primary'),...i,ref:t,children:(0,n.jsx)(x,{className:(0,_.cn)("pointer-events-none block h-4 w-4 rounded-full bg-pg-200 shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})});j.displayName=y.displayName},40607:function(e,t,r){"use strict";r.d(t,{mQ:function(){return H},nU:function(){return q},dr:function(){return Z},SP:function(){return W}});var n=r(85893),i=r(67294),o=r(87462),a=r(36206),s=r(25360),l=r(13879),u=r(28771),c=r(91276),d=r(64757),f=r(79698),p=r(77342),h=r(78990);let m="rovingFocusGroup.onEntryFocus",g={bubbles:!1,cancelable:!0},v="RovingFocusGroup",[y,x,b]=(0,l.B)(v),[w,_]=(0,s.b)(v,[b]),[j,C]=w(v),k=(0,i.forwardRef)((e,t)=>(0,i.createElement)(y.Provider,{scope:e.__scopeRovingFocusGroup},(0,i.createElement)(y.Slot,{scope:e.__scopeRovingFocusGroup},(0,i.createElement)(E,(0,o.Z)({},e,{ref:t}))))),E=(0,i.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:y,onEntryFocus:b,...w}=e,_=(0,i.useRef)(null),C=(0,u.e)(t,_),k=(0,h.gm)(l),[E=null,S]=(0,p.T)({prop:c,defaultProp:v,onChange:y}),[N,L]=(0,i.useState)(!1),T=(0,f.W)(b),O=x(r),R=(0,i.useRef)(!1),[A,I]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let e=_.current;if(e)return e.addEventListener(m,T),()=>e.removeEventListener(m,T)},[T]),(0,i.createElement)(j,{scope:r,orientation:n,dir:k,loop:s,currentTabStopId:E,onItemFocus:(0,i.useCallback)(e=>S(e),[S]),onItemShiftTab:(0,i.useCallback)(()=>L(!0),[]),onFocusableItemAdd:(0,i.useCallback)(()=>I(e=>e+1),[]),onFocusableItemRemove:(0,i.useCallback)(()=>I(e=>e-1),[])},(0,i.createElement)(d.WV.div,(0,o.Z)({tabIndex:N||0===A?-1:0,"data-orientation":n},w,{ref:C,style:{outline:"none",...e.style},onMouseDown:(0,a.M)(e.onMouseDown,()=>{R.current=!0}),onFocus:(0,a.M)(e.onFocus,e=>{let t=!R.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent(m,g);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=O().filter(e=>e.focusable);P([e.find(e=>e.active),e.find(e=>e.id===E),...e].filter(Boolean).map(e=>e.ref.current))}}R.current=!1}),onBlur:(0,a.M)(e.onBlur,()=>L(!1))})))}),S=(0,i.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:l,...u}=e,f=(0,c.M)(),p=l||f,h=C("RovingFocusGroupItem",r),m=h.currentTabStopId===p,g=x(r),{onFocusableItemAdd:v,onFocusableItemRemove:b}=h;return(0,i.useEffect)(()=>{if(n)return v(),()=>b()},[n,v,b]),(0,i.createElement)(y.ItemSlot,{scope:r,id:p,focusable:n,active:s},(0,i.createElement)(d.WV.span,(0,o.Z)({tabIndex:m?0:-1,"data-orientation":h.orientation},u,{ref:t,onMouseDown:(0,a.M)(e.onMouseDown,e=>{n?h.onItemFocus(p):e.preventDefault()}),onFocus:(0,a.M)(e.onFocus,()=>h.onItemFocus(p)),onKeyDown:(0,a.M)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey){h.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return N[i]}(e,h.orientation,h.dir);if(void 0!==t){e.preventDefault();let i=g().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=h.loop?(r=i,n=o+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(o+1)}setTimeout(()=>P(i))}})})))}),N={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function P(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}var L=r(29115);let T="Tabs",[O,R]=(0,s.b)(T,[_]),A=_(),[I,M]=O(T),D=(0,i.forwardRef)((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:a,defaultValue:s,orientation:l="horizontal",dir:u,activationMode:f="automatic",...m}=e,g=(0,h.gm)(u),[v,y]=(0,p.T)({prop:n,onChange:a,defaultProp:s});return(0,i.createElement)(I,{scope:r,baseId:(0,c.M)(),value:v,onValueChange:y,orientation:l,dir:g,activationMode:f},(0,i.createElement)(d.WV.div,(0,o.Z)({dir:g,"data-orientation":l},m,{ref:t})))}),F=(0,i.forwardRef)((e,t)=>{let{__scopeTabs:r,loop:n=!0,...a}=e,s=M("TabsList",r),l=A(r);return(0,i.createElement)(k,(0,o.Z)({asChild:!0},l,{orientation:s.orientation,dir:s.dir,loop:n}),(0,i.createElement)(d.WV.div,(0,o.Z)({role:"tablist","aria-orientation":s.orientation},a,{ref:t})))}),z=(0,i.forwardRef)((e,t)=>{let{__scopeTabs:r,value:n,disabled:s=!1,...l}=e,u=M("TabsTrigger",r),c=A(r),f=U(u.baseId,n),p=V(u.baseId,n),h=n===u.value;return(0,i.createElement)(S,(0,o.Z)({asChild:!0},c,{focusable:!s,active:h}),(0,i.createElement)(d.WV.button,(0,o.Z)({type:"button",role:"tab","aria-selected":h,"aria-controls":p,"data-state":h?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:f},l,{ref:t,onMouseDown:(0,a.M)(e.onMouseDown,e=>{s||0!==e.button||!1!==e.ctrlKey?e.preventDefault():u.onValueChange(n)}),onKeyDown:(0,a.M)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&u.onValueChange(n)}),onFocus:(0,a.M)(e.onFocus,()=>{let e="manual"!==u.activationMode;h||s||!e||u.onValueChange(n)})})))}),B=(0,i.forwardRef)((e,t)=>{let{__scopeTabs:r,value:n,forceMount:a,children:s,...l}=e,u=M("TabsContent",r),c=U(u.baseId,n),f=V(u.baseId,n),p=n===u.value,h=(0,i.useRef)(p);return(0,i.useEffect)(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,i.createElement)(L.z,{present:a||p},({present:r})=>(0,i.createElement)(d.WV.div,(0,o.Z)({"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":c,hidden:!r,id:f,tabIndex:0},l,{ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0}}),r&&s))});function U(e,t){return`${e}-trigger-${t}`}function V(e,t){return`${e}-content-${t}`}var $=r(1233);let H=D,Z=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(F,{ref:t,className:(0,$.cn)("inline-flex h-11 items-center justify-center rounded-lg bg-muted p-1 text-pg-300",r),...i})});Z.displayName=F.displayName;let W=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(z,{ref:t,className:(0,$.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-2 text-base 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",r),...i})});W.displayName=z.displayName;let q=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(B,{ref:t,className:(0,$.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r),...i})});q.displayName=B.displayName},27860:function(e,t,r){"use strict";r.d(t,{g:function(){return a}});var n=r(85893),i=r(67294),o=r(1233);let a=i.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)("textarea",{className:(0,o.cn)("flex min-h-[60px] w-full rounded-pg-base px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50","selection:bg-selection text-md xs:text-base text-pg-100 placeholder:text-pg-300","border border-pg-600","bg-pg-700 hover:bg-pg-700","focus-visible:brightness-125",r),ref:t,...i})});a.displayName="Textarea"},76581:function(e,t,r){"use strict";r.d(t,{_v:function(){return d},aJ:function(){return c},pn:function(){return l},u:function(){return u}});var n=r(85893),i=r(67294),o=r(12993),a=r(1233),s=r(24581);let l=o.zt,u=o.fC,c=o.xz,d=i.forwardRef((e,t)=>{let{className:r,sideOffset:i=4,...l}=e;return(0,s.s)()?null:(0,n.jsx)(o.h_,{children:(0,n.jsx)(o.VY,{ref:t,sideOffset:i,className:(0,a.cn)("z-50 overflow-hidden rounded-md bg-pg-600 border border-pg-500 px-3 py-1.5 text-xs text-pg-200 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",r),...l})})});d.displayName=o.VY.displayName},19387:function(e,t,r){"use strict";r.d(t,{A:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("div",{...e,className:"bg-center bg-repeat absolute inset-0 opacity-25",style:{backgroundImage:"url('/images/transparent-bg.png')",backgroundSize:"8px"}})}},14622:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(85893);function i(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,n.jsx)("path",{d:"M8.18296 8.58496C9.64493 6.05276 12.8828 5.18516 15.415 6.64713V6.64713C17.9472 8.10909 18.8148 11.347 17.3529 13.8792L15.1699 17.6602L6 12.366L8.18296 8.58496Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M11.6998 17.2151C11.1288 18.2042 9.86411 18.543 8.87508 17.972V17.972C7.88604 17.401 7.54717 16.1363 8.11819 15.1473L8.28708 14.8547L11.8687 16.9226L11.6998 17.2151Z",fill:"currentColor"})]})}r(67294)},41026:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 14v6h6M14 4h6v6M4 20l5.5-5.5m5-5L20 4"})})}},15274:function(e,t,r){"use strict";r.d(t,{t:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{d:"M6 10.5385L12 5L18 10.5385V17.9231H13.5H10.5H6V10.5385Z",fill:"currentColor"})})}r(67294)},97115:function(e,t,r){"use strict";r.d(t,{N:function(){return i}});var n=r(85893);function i(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,n.jsx)("path",{d:"M16 19L10.5341 11.1739C10.1361 10.604 9.29246 10.604 8.89444 11.1739L6.57143 14.5L5.18016 16.492C5.06289 16.66 5 16.8598 5 17.0646V19H16Z",fill:"currentColor",className:"brightness-125"}),(0,n.jsx)("path",{d:"M19 18V9V6C19 5.44772 18.5523 5 18 5H11H6C5.44772 5 5 5.44772 5 6V18C5 18.5523 5.44772 19 6 19H18C18.5523 19 19 18.5523 19 18Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M13.7268 12.902L8.5 19H9.99998H18C18.5523 19 19 18.5523 19 18V17.4444L15.2569 12.9157C14.8616 12.4375 14.1306 12.4309 13.7268 12.902Z",fill:"currentColor"})]})}r(67294)},373:function(e,t,r){"use strict";r.d(t,{p:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",d:"M7 12h10M12 7v10"})})}r(67294)},13998:function(e,t,r){"use strict";r.d(t,{e:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1353 6.72597L12.0902 5L9.04511 6.72597L6.02782 8.50012L6 12.0002L6.02782 15.5004L9.04511 17.2745L12.0902 19.0005L15.1353 17.2745L18.1526 15.5004L18.1804 12.0002L18.1526 8.50012L15.1353 6.72597ZM12.0902 14.1003C13.2501 14.1003 14.1903 13.1601 14.1903 12.0002C14.1903 10.8404 13.2501 9.90017 12.0902 9.90017C10.9304 9.90017 9.99014 10.8404 9.99014 12.0002C9.99014 13.1601 10.9304 14.1003 12.0902 14.1003Z",fill:"currentColor"})})}r(67294)},33554:function(e,t,r){"use strict";r.d(t,{X:function(){return i}});var n=r(85893);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{d:"M6 7.66448H18M16.6669 7.66668V17.0001C16.6669 17.3537 16.5264 17.6928 16.2763 17.9429C16.0263 18.1929 15.6871 18.3334 15.3335 18.3334H8.66681C8.31319 18.3334 7.97405 18.1929 7.724 17.9429C7.47395 17.6928 7.33347 17.3537 7.33347 17.0001V7.66668M9.33348 7.66668V6.33333C9.33348 5.97972 9.47395 5.64057 9.72401 5.39053C9.97405 5.14047 10.3132 5 10.6668 5H13.3335C13.6871 5 14.0263 5.14047 14.2763 5.39053C14.5264 5.64057 14.6669 5.97972 14.6669 6.33333V7.66668M10.6665 11V15M13.333 11V15",stroke:"currentColor",strokeWidth:"1.32",strokeLinecap:"round",strokeLinejoin:"round"})})}r(67294)},1233:function(e,t,r){"use strict";r.d(t,{cn:function(){return F}});var n=r(86010);let i=/^\[(.+)\]$/;function o(e,t){let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r}let a=/\s+/;function s(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=function e(t){let r;if("string"==typeof t)return t;let n="";for(let i=0;i<t.length;i++)t[i]&&(r=e(t[i]))&&(n&&(n+=" "),n+=r);return n}(e))&&(n&&(n+=" "),n+=t);return n}function l(e){let t=t=>t[e]||[];return t.isThemeGetter=!0,t}let u=/^\[(?:([a-z-]+):)?(.+)\]$/i,c=/^\d+\/\d+$/,d=new Set(["px","full","screen"]),f=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,p=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,h=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,m=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function v(e){return x(e)||d.has(e)||c.test(e)}function y(e){return O(e,"length",R)}function x(e){return!!e&&!Number.isNaN(Number(e))}function b(e){return O(e,"number",x)}function w(e){return!!e&&Number.isInteger(Number(e))}function _(e){return e.endsWith("%")&&x(e.slice(0,-1))}function j(e){return u.test(e)}function C(e){return f.test(e)}let k=new Set(["length","size","percentage"]);function E(e){return O(e,k,A)}function S(e){return O(e,"position",A)}let N=new Set(["image","url"]);function P(e){return O(e,N,M)}function L(e){return O(e,"",I)}function T(){return!0}function O(e,t,r){let n=u.exec(e);return!!n&&(n[1]?"string"==typeof t?n[1]===t:t.has(n[1]):r(n[2]))}function R(e){return p.test(e)&&!h.test(e)}function A(){return!1}function I(e){return m.test(e)}function M(e){return g.test(e)}let D=function(e,...t){let r,n,l;let u=function(a){var s;return n=(r={cache:function(e){if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,n=new Map;function i(i,o){r.set(i,o),++t>e&&(t=0,n=r,r=new Map)}return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):i(e,t)}}}((s=t.reduce((e,t)=>t(e),e())).cacheSize),splitModifiers:function(e){let t=e.separator,r=1===t.length,n=t[0],i=t.length;return function(e){let o;let a=[],s=0,l=0;for(let u=0;u<e.length;u++){let c=e[u];if(0===s){if(c===n&&(r||e.slice(u,u+i)===t)){a.push(e.slice(l,u)),l=u+i;continue}if("/"===c){o=u;continue}}"["===c?s++:"]"===c&&s--}let u=0===a.length?e:e.substring(l),c=u.startsWith("!"),d=c?u.substring(1):u;return{modifiers:a,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:o&&o>l?o-l:void 0}}}(s),...function(e){let t=function(e){var t;let{theme:r,prefix:n}=e,i={nextPart:new Map,validators:[]};return(t=Object.entries(e.classGroups),n?t.map(([e,t])=>[e,t.map(e=>"string"==typeof e?n+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,t])=>[n+e,t])):e)]):t).forEach(([e,t])=>{(function e(t,r,n,i){t.forEach(t=>{if("string"==typeof t){(""===t?r:o(r,t)).classGroupId=n;return}if("function"==typeof t){if(t.isThemeGetter){e(t(i),r,n,i);return}r.validators.push({validator:t,classGroupId:n});return}Object.entries(t).forEach(([t,a])=>{e(a,o(r,t),n,i)})})})(t,i,e,r)}),i}(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:function(e){let r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),function e(t,r){if(0===t.length)return r.classGroupId;let n=t[0],i=r.nextPart.get(n),o=i?e(t.slice(1),i):void 0;if(o)return o;if(0===r.validators.length)return;let a=t.join("-");return r.validators.find(({validator:e})=>e(a))?.classGroupId}(r,t)||function(e){if(i.test(e)){let t=i.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}(e)},getConflictingClassGroupIds:function(e,t){let i=r[e]||[];return t&&n[e]?[...i,...n[e]]:i}}}(s)}).cache.get,l=r.cache.set,u=c,c(a)};function c(e){let t=n(e);if(t)return t;let i=function(e,t){let{splitModifiers:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=new Set;return e.trim().split(a).map(e=>{let{modifiers:t,hasImportantModifier:i,baseClassName:o,maybePostfixModifierPosition:a}=r(e),s=n(a?o.substring(0,a):o),l=!!a;if(!s){if(!a||!(s=n(o)))return{isTailwindClass:!1,originalClassName:e};l=!1}let u=(function(e){if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t})(t).join(":");return{isTailwindClass:!0,modifierId:i?u+"!":u,classGroupId:s,originalClassName:e,hasPostfixModifier:l}}).reverse().filter(e=>{if(!e.isTailwindClass)return!0;let{modifierId:t,classGroupId:r,hasPostfixModifier:n}=e,a=t+r;return!o.has(a)&&(o.add(a),i(r,n).forEach(e=>o.add(t+e)),!0)}).reverse().map(e=>e.originalClassName).join(" ")}(e,r);return l(e,i),i}return function(){return u(s.apply(null,arguments))}}(function(){let e=l("colors"),t=l("spacing"),r=l("blur"),n=l("brightness"),i=l("borderColor"),o=l("borderRadius"),a=l("borderSpacing"),s=l("borderWidth"),u=l("contrast"),c=l("grayscale"),d=l("hueRotate"),f=l("invert"),p=l("gap"),h=l("gradientColorStops"),m=l("gradientColorStopPositions"),g=l("inset"),k=l("margin"),N=l("opacity"),O=l("padding"),R=l("saturate"),A=l("scale"),I=l("sepia"),M=l("skew"),D=l("space"),F=l("translate"),z=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",j,t],V=()=>[j,t],$=()=>["",v,y],H=()=>["auto",x,j],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],G=()=>["start","end","center","between","around","evenly","stretch"],Y=()=>["","0",j],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[x,b],J=()=>[x,j];return{cacheSize:500,separator:":",theme:{colors:[T],spacing:[v,y],blur:["none","",C,j],brightness:X(),borderColor:[e],borderRadius:["none","","full",C,j],borderSpacing:V(),borderWidth:$(),contrast:X(),grayscale:Y(),hueRotate:J(),invert:Y(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[_,y],inset:U(),margin:U(),opacity:X(),padding:V(),saturate:X(),scale:X(),sepia:Y(),skew:J(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[C]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),j]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",w,j]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:Y()}],shrink:[{shrink:Y()}],order:[{order:["first","last","none",w,j]}],"grid-cols":[{"grid-cols":[T]}],"col-start-end":[{col:["auto",{span:["full",w,j]},j]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[T]}],"row-start-end":[{row:["auto",{span:[w,j]},j]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[C]},C]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",C,y]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",b]}],"font-family":[{font:[T]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",x,b]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",v,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",v,y]}],"underline-offset":[{"underline-offset":["auto",v,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),S]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",E]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},P]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:W()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[v,j]}],"outline-w":[{outline:[v,y]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[v,y]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",C,L]}],"shadow-color":[{shadow:[T]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":q()}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",C,j]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[R]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[w,j]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[v,y,b]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function F(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return D((0,n.W)(t))}},5655:function(e,t,r){"use strict";r.d(t,{y:function(){return l}});var n=r(85893),i=r(11923),o=r(59820),a=r(42796),s=r(67294);function l(e){let{apiType:t}=e,r=(0,s.useId)(),{data:l}=(0,o.ZP)(["/api/user/limits?type="+t,r],e=>(0,i.S)(e[0]));if(!l?.limit)return null;let u=l.current+1,c={upscale:"subtle upscales","gen-upscale":"creative upscales","restore-face":"face restorations","expand-prompt":"prompt expansions"}[t];return(0,n.jsx)(a._,{mixpanelKey:`${c} remaining`,sideOffset:12,side:"top",label:(0,n.jsxs)("span",{children:[(0,n.jsxs)("span",{className:"font-semibold",children:[u," out of ",l.limit]})," ",c," have been used this month. Upgrade for unlimited ",c,"."]}),arrow:!1,alignCta:"end",children:(0,n.jsxs)("p",{className:"text-gray-50 bg-gray-80 text-sm font-pg-medium px-2 rounded-full py-0.5",children:[u," of ",l.limit]})})}},62080:function(e,t,r){"use strict";r.d(t,{iu:function(){return v},dQ:function(){return g},Pf:function(){return h},WI:function(){return m},XO:function(){return f},hH:function(){return p}});var n=r(85893),i=r(67294),o=r(92323),a=r(51806);function s(e){let{image:t}=e;return(0,n.jsx)(a.Z,{image:t,apiPath:"upscale",title:"Upscaling...",eventName:"Upscale image"})}function l(e){let{image:t}=e;return(0,n.jsx)(a.Z,{image:t,apiPath:"gen-upscale",title:"Upscaling...",eventName:"Upscale image - v2"})}function u(e){let{image:t}=e;return(0,n.jsx)(a.Z,{image:t,apiPath:"restore-face",title:"Applying face restoration...",eventName:"Face Restoration"})}var c=r(42897),d=r(47435);function f(e){let{setModalContent:t}=(0,o.d)();return(0,i.useCallback)(()=>{t((0,n.jsx)(s,{image:e}),{showCloseButton:!1,useBlurredBackground:!0})},[e,t])}function p(e){let{setModalContent:t}=(0,o.d)();return(0,i.useCallback)(()=>{t((0,n.jsx)(l,{image:e}),{showCloseButton:!1,useBlurredBackground:!0})},[e,t])}function h(e){let{setModalContent:t}=(0,o.d)();return(0,i.useCallback)(()=>{t((0,n.jsx)(u,{image:e}),{showCloseButton:!1,useBlurredBackground:!0})},[e,t])}let m=e=>(0,i.useCallback)(async t=>{e({variants:!1,override:{prompt:t.prompt,width:t.width||void 0,height:t.height||void 0,modelType:t.source||void 0,sampler:t.sampler||void 0,seed:t.seed||void 0,mode:c.yB.Upscale,init_image_id:t.id,init_image:await (0,d.d4)(t.url),num_images:1}})},[e]),g=e=>(0,i.useCallback)(async t=>{e({variants:!1,override:{prompt:t.prompt,width:t.width||void 0,height:t.height||void 0,modelType:t.source||void 0,sampler:t.sampler||void 0,seed:t.seed||void 0,mode:c.yB.GenUpscale,init_image:await (0,d.d4)(t.url),num_images:1}})},[e]),v=e=>(e?.width||1024)*(e?.height||1024)>1048576},71013:function(e,t,r){"use strict";r.d(t,{Y:function(){return d}});var n=r(85893),i=r(41664),o=r.n(i),a=r(67294),s=r(86076),l=r(33299),u=r(44746);function c(e){let{closeModal:t,title:r,children:i,showUpgradeCTA:s=!0}=e,l=(0,a.useCallback)(()=>{t()},[t]);return(0,n.jsx)("div",{className:"bg-gray-90 p-8 max-w-[520px]",children:(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("h1",{className:"text-white text-lg font-semibold",children:r}),(0,n.jsx)("p",{className:"pb-4 text-gray-25 text-sm",children:i}),(0,n.jsxs)("div",{className:"flex justify-end gap-4",children:[(0,n.jsx)("button",{onClick:l,className:"marketing-button secondary",children:s?"Cancel":"Ok"}),s&&(0,n.jsx)(o(),{href:"/pricing",target:"_blank",className:"marketing-button primary",children:"See pricing"})]})]})})}function d(e){let{closeModal:t,type:r}=e,i=(0,l.useSession)(),o=0;"upscale"===r?o=(0,s._N)("upscalesPerMonthLimit",i.data):"gen-upscale"===r?o=(0,s._N)("creativeUpscalesPerMonthLimit",i.data):"restore-face"===r?o=(0,s._N)("faceRestoresPerMonthLimit",i.data):console.error("Unknown limit type",r);let a=(0,u.WI)(),d=(0,u.s4)(),f={upscale:{plural_noun:"subtle upscales",verb:"upscale images 4x",valueProp:"with no limits"},"gen-upscale":{plural_noun:"creative upscales",verb:"creatively upscale images",valueProp:"more"},"restore-face":{plural_noun:"face restorations",verb:"use face restoration",valueProp:"with no limits"}},p=d?null:a?"Turbo":"Pro";return(0,n.jsxs)(c,{closeModal:t,showUpgradeCTA:!!p,title:p?`Upgrade to the ${p} plan`:`You're out of ${f[r].plural_noun}`,children:["You are out of your ",o," ",f[r].plural_noun??"enhancements"," for the past 30 days.",p&&(0,n.jsxs)(n.Fragment,{children:["Upgrade to a ",p," plan to ",f[r].verb??"enhance"," ",f[r].valueProp??"with no limits","."]})]})}},43857:function(e,t,r){"use strict";r.r(t),r.d(t,{UserUsage:function(){return f},UserUsageDialog:function(){return p},useUserUsageDialog:function(){return m}});var n=r(85893);r(67294);var i=r(11350),o=r(44746),a=r(17615),s=r(37182),l=r(11163),u=r.n(l),c=r(1233),d=r(13346);function f(){let e=(0,o.s4)();return(0,n.jsxs)("div",{className:(0,c.cn)("h-auto flex flex-col overflow-hidden rounded-pg-md bg-background"),children:[(0,n.jsx)("header",{className:(0,c.cn)("flex px-8 py-5 border-b fixed w-full pointer-events-none border-border"),children:(0,n.jsx)("h1",{className:"title-primary",children:"Usage"})}),(0,n.jsx)("div",{className:"text-white flex flex-col w-[90vw] md:flex-row md:w-[520px] pt-16 overflow-y-auto",children:(0,n.jsx)("div",{className:"p-8 w-full flex flex-col text-sm overflow-auto",children:(0,n.jsx)(i.pp,{})})}),e?null:(0,n.jsxs)("div",{className:"flex justify-end gap-4 py-5 px-8 border-t border-border",children:[(0,n.jsx)(a.GG,{asChild:!0,children:(0,n.jsx)(d.z,{size:"lg",children:"Cancel"})}),(0,n.jsx)(a.GG,{asChild:!0,children:(0,n.jsx)(d.z,{size:"lg",variant:"create",onClick:async()=>{u().push("/pricing")},children:(0,n.jsx)(s.H,{})})})]})]})}function p(e){let{asChild:t=!0,...r}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(a.Vq,{...r,children:[(0,n.jsx)(a.hg,{asChild:t,...r,children:r.children}),(0,n.jsx)(a.cZ,{className:"p-0",children:(0,n.jsx)(f,{})})]})})}let h=(0,r(64529).Ue)()(e=>({open:!1,setOpen:t=>e(e=>({...e,open:t}))}));function m(){let{open:e,setOpen:t}=h();return{isOpen:e,open:()=>t(!0),close:()=>t(!1),setOpen:e=>t(e)}}},11350:function(e,t,r){"use strict";r.d(t,{pp:function(){return es},ZP:function(){return el},Av:function(){return ee},HG:function(){return et}});var n=r(85893),i=r(38372),o=r(18794),a=r(59345),s=r(33299),l=r(41664),u=r.n(l),c=r(67294),d=r(53778),f=r.n(d),p=r(77719),h=r(48247),m=r(31630),g=r(92323),v=r(11444),y=r(96897),x=r(11163),b=r(9669),w=r.n(b),_=r(26085),j=r(31941);let C=["Using another service","Low image quality","No longer need it","Too many bugs","Can't afford it right now","Missing a key feature","Free plan is sufficient","Too slow to generate image","Safety filters are bothersome","Other"];function k(e){let{subscriptionId:t}=e,r=(0,g.d)(),i=(0,x.useRouter)(),[o,a]=(0,c.useState)(null),[s,l]=(0,c.useState)(null),u=(0,c.useRef)(null);return(0,n.jsxs)(v.Z,{header:(0,n.jsx)("span",{className:"text-[18px]",children:"Cancellation Reason"}),disabled:!o,error:s,primary:{async onClick(){l(null);let e=await (0,y.wX)(()=>w().delete(`/api/payments/subscriptions/${t}`,{data:{cancellationReason:o,additionalFeedback:u.current?.value}}));if((0,y.dZ)(e)){console.error(e.error),l(e.error?.response?.data?.error||e.error.message);return}return r.closeModal(),i.reload(),e},label:"Cancel subscription",class:"playground-button large primary"},children:[(0,n.jsx)("label",{className:f().label,children:"What's the primary reason you're cancelling your plan today?"}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-4 mt-[16px] mb-[32px]",children:C.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center mr-4",children:[(0,n.jsx)("input",{id:e,value:e,type:"radio",name:"cancellation-reason-radio-group",className:"hidden",checked:o===e,onChange:t=>{u.current&&u.current.focus(),t.target.value,a(e)}}),(0,n.jsxs)("label",{htmlFor:e,className:"flex items-center gap-2 text-base font-medium text-gray-10 hover:cursor-pointer",children:[o===e?(0,n.jsx)(_.Z,{size:20}):(0,n.jsx)(j.Z,{size:20}),e]})]},`cr-${t}`))}),(0,n.jsx)("label",{className:f().label,children:"Additional Feedback"}),(0,n.jsx)("textarea",{ref:u,className:"w-full mt-2 rounded-lg text-sm border border-1 p-3 bg-transparent text-gray-10 placeholder-gray-50 border-gray-50 resize-none hover:border-gray-60 focus:outline-none",rows:4,placeholder:"If there is any other feedback you would like to share, please let us know."})]})}var E=r(92890),S=r(33268),N=r(91170),P=r(24011),L=r(54029),T=r(64529),O=r(782);function R(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M4.75 7.75a2 2 0 012-2h10.5a2 2 0 012 2v8.5a2 2 0 01-2 2H6.75a2 2 0 01-2-2v-8.5zM5 10.25h14M7.75 14.25h2.5M15.75 14.25h.5"})})}var A=r(78358),I=r(49325),M=r(46704),D=function(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M6.25 8.75h-.5a1 1 0 00-1 1v5.5a1 1 0 001 1h.5a1 1 0 001-1v-5.5a1 1 0 00-1-1zM12.25 4.75h-.5a1 1 0 00-1 1v9.5a1 1 0 001 1h.5a1 1 0 001-1v-9.5a1 1 0 00-1-1zM4.75 19.25h14.5M18.25 8.75h-.5a1 1 0 00-1 1v5.5a1 1 0 001 1h.5a1 1 0 001-1v-5.5a1 1 0 00-1-1z"})})},F=r(40302),z=r(86076),B=r(22653),U=r(94670),V=r(2733);let $=e=>{let{title:t,current:r,max:i}=e,o=null===r?0:Math.min(r/i*100,100);return(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2 w-full",children:[(0,n.jsx)("div",{className:"flex w-[1/2] text-base font-medium text-gray-10",children:t}),(0,n.jsxs)("div",{className:"flex items-center w-[1/2] flex-row",children:[(0,n.jsx)("div",{className:"flex w-[calc(100%-120px)] bg-gray-75 rounded-full h-[5px] mr-2",children:(0,n.jsx)("div",{className:"bg-purple-primary h-[5px] rounded-full",style:{width:`${o}%`}})}),(0,n.jsxs)("div",{className:"text-base text-gray-50 font-medium",children:[(0,n.jsx)("span",{className:"text-gray-10",children:(0,V.x)(r||0)})," / ",i===1/0?"Unlimited":(0,V.x)(i)]})]})]})};U.u,B.Z;var H=e=>{let{usage:t}=e,r=(0,s.useSession)(),i=(0,o.cd)();return(0,n.jsxs)("div",{className:"flex flex-col gap-[32px]",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-[10px]",children:[(0,n.jsx)("div",{className:"text-gray-50 text-[12px] font-bold uppercase",children:"Last 24 Hours"}),(0,n.jsx)($,{title:"Images generated",current:t.numImagesInLastDay,max:(0,z.Pp)(r.data)})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-[10px]",children:[(0,n.jsx)("div",{className:"text-gray-50 text-[12px] font-bold uppercase",children:"Current Month"}),(0,n.jsx)($,{title:"Prompt expansions",current:t.promptExpansionsThisMonth||0,max:(0,z._N)("promptExpansionsPerMonthLimit",r.data)}),(0,n.jsx)($,{title:"Creative upscales",current:t.creativeUpscalesThisMonth,max:(0,z._N)("creativeUpscalesPerMonthLimit",r.data)}),(0,n.jsx)($,{title:"Subtle upscales",current:t.upscalesThisMonth,max:(0,z._N)("upscalesPerMonthLimit",r.data)}),(0,n.jsx)($,{title:"Face restorations",current:t.faceRestorationsThisMonth||0,max:(0,z._N)("faceRestoresPerMonthLimit",r.data)}),i&&(0,n.jsx)($,{title:"Photorealism images",current:t.photorealismGensThisMonth||0,max:(0,z._N)("photorealismGensPerMonthLimit",r.data)})]})]})},Z=r(627),W=r(158),q=r(44746),G=r(25554),Y=r(71084),K=r(95012);let X=(0,P.L)("label","flex justify-between gap-12"),J=(0,P.L)("span","select-none"),Q=(0,P.L)("div","space-y-0.5"),ee=(0,T.Ue)()((0,O.tJ)(e=>({shouldReposition:!0,setShouldReposition:t=>{e(()=>({shouldReposition:t}))}}),{name:"pai-canvas-automatically-reposition-gf"})),et=(0,T.Ue)()((0,O.tJ)(e=>({shouldGenUpscaleForPreviewRender:!1,setShouldGenUpscaleForPreviewRender:t=>{e(()=>({shouldGenUpscaleForPreviewRender:t}))}}),{name:"pai-canvas-gen-upscale-preview-render"}));function er(){let[e,t]=(0,E.Iw)("show-feedback-button",!0),[r,i]=(0,E.Iw)("show-tutorial-tips",!0),{shouldReposition:a,setShouldReposition:s}=ee(),{shouldGenUpscaleForPreviewRender:l,setShouldGenUpscaleForPreviewRender:c}=et(),d=(0,o.z0)();return(0,o.l6)(),(0,n.jsxs)("div",{className:"flex flex-col gap-y-6",children:[(0,n.jsxs)(Q,{children:[(0,n.jsx)("label",{className:f().label,children:"Feedback widget"}),(0,n.jsxs)(X,{children:[(0,n.jsx)(J,{children:"A way to give us feedback in the product"}),(0,n.jsx)(M.Z,{className:"[&>span]:bg-[#39324E] [&>span[data-checked]]:bg-[#76ADFF] [&>span]:p-1",size:"sm",isChecked:!!e,onChange:e=>{t(e.target.checked)}})]})]}),(0,n.jsxs)(Q,{children:[(0,n.jsx)("label",{className:f().label,children:"Tutorial tips"}),(0,n.jsxs)(X,{children:[(0,n.jsx)(J,{children:"Links to videos to teach you about Playground"}),(0,n.jsx)(M.Z,{className:"[&>span]:bg-[#39324E] [&>span[data-checked]]:bg-[#76ADFF] [&>span]:p-1",size:"sm",isChecked:!!r,onChange:e=>{i(e.target.checked)}})]})]}),(0,n.jsxs)(Q,{children:[(0,n.jsx)("label",{className:f().label,children:"Generation Frame"}),(0,n.jsxs)(X,{children:[(0,n.jsx)(J,{children:"Automatically move the generation frame after an image is created"}),(0,n.jsx)(M.Z,{className:"[&>span]:bg-[#39324E] [&>span[data-checked]]:bg-[#76ADFF] [&>span]:p-1",size:"sm",isChecked:!!a,onChange:e=>{s(e.target.checked)}})]})]}),d&&(0,n.jsxs)(Q,{children:[(0,n.jsx)("label",{className:f().label,children:"Generative Upscale"}),(0,n.jsxs)(X,{children:[(0,n.jsx)(J,{children:"Use generative upscaling when Preview Render is enabled"}),(0,n.jsx)(M.Z,{className:"[&>span]:bg-[#39324E] [&>span[data-checked]]:bg-[#76ADFF] [&>span]:p-1",size:"sm",isChecked:!!l,onChange:e=>{c(e.target.checked)}})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:f().label,children:"On-device storage"}),(0,n.jsxs)("div",{className:"flex justify-between items-center gap-4",children:[(0,n.jsx)("p",{children:"Reset data stored on this device"}),(0,n.jsx)(u(),{target:"_blank",href:"/pricing",legacyBehavior:!0,children:(0,n.jsx)("button",{className:"text-button danger text-right",type:"button",onClick:()=>{confirm("Are you sure you want to do this? Some of your settings will reset.")&&(localStorage.clear(),window.location.reload())},children:"Reset"})})]})]}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(ea,{})})]})}function en(){let e=(0,s.useSession)(),t=(0,i.Z)(),r=(0,o.z0)(),l=t?.role==="ADMIN",u=(0,g.d)(),[d,p]=(0,c.useState)(!1),[y,x]=(0,c.useState)(t?.displayName||""),b=e.data?.user?.id;(0,c.useEffect)(()=>{x(t?.displayName||"")},[t?.displayName]);let w=(0,m.T1)(),[_,j]=(0,c.useState)(!1),C=async e=>{p(!0);let t=new URL("/api/user",window.location.origin);t.searchParams.set("id",b);let r=await fetch(t.toString(),{method:"PATCH",body:JSON.stringify({displayName:e})});if((0,a.U)(),!r.ok){let{error:e}=await r.json()??{};console.error(e),w(e||"An unknown error occurred")}j(!0),setTimeout(()=>{j(!1)},2e3),p(!1)},k=(0,L.nf)(),[E,S]=(0,L.Yx)();return(0,n.jsxs)("div",{className:"flex flex-col gap-y-9",children:[(0,n.jsx)("form",{className:`${f().form}`,onSubmit:e=>{e.preventDefault(),C(y)},children:(0,n.jsxs)("div",{className:"flex flex-col w-full",children:[(0,n.jsx)("label",{htmlFor:"name",children:"Display Name"}),(0,n.jsxs)("div",{className:"flex justify-between relative",children:[(0,n.jsx)("input",{type:"text",className:"text-xl font-semibold",value:y,name:"name",id:"name",placeholder:"Display Name",onChange:e=>{x(e.currentTarget.value)}}),_?(0,n.jsxs)("button",{disabled:!0,className:"text-gray-50 flex gap-2 items-center justify-center",children:[(0,n.jsx)(h.Z,{width:16,height:16}),"Saved"]}):(0,n.jsx)("button",{disabled:y===t.displayName||d,className:"text-button",onClick:()=>{d||C(y)},children:"Save"})]})]})}),(0,n.jsxs)("div",{className:"flex justify-between gap-14",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:f().label,children:"Delete Account"}),(0,n.jsx)("p",{className:"font-pg-medium",children:"Delete account and remove all images"})]}),(0,n.jsx)("button",{onClick:()=>{u.setModalContent((0,n.jsx)(v.O,{}),{transitionModal:!0,useBlurredBackground:!0,removeBorder:!0})},className:"text-button danger w-[120px] text-right",children:"Delete Account"})]}),"none"!==k&&(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:f().label,children:"Early Features"}),(0,n.jsx)("div",{className:"space-y-5",children:(0,n.jsxs)("label",{className:"flex justify-between gap-12",children:[(0,n.jsxs)("span",{className:"select-none",children:["Gated features that are only visible to ",k," users"]}),(0,n.jsx)(M.Z,{className:"[&>span]:bg-[#39324E] [&>span[data-checked]]:bg-[#76ADFF] [&>span]:p-1",size:"sm",isChecked:"on"===E,onChange:t=>{S(t.target.checked?"on":"off"),e.update()}})]})}),(0,n.jsx)("p",{className:"text-gray-50 text-xs mt-1",children:"As a beta user, please be sure not to publish any videos/blogs/posts that demos an unreleased feature."})]}),r&&l&&(0,n.jsx)(ei,{})]})}function ei(){let[e,t]=(0,K.z)(),[r,i]=(0,K.V)();return(0,n.jsxs)("div",{className:"border-2 border-orange-400 rounded-pg-md p-4 flex flex-col gap-2 bg-orange-500/50",children:[(0,n.jsx)("h3",{className:"font-bold",children:"Set Plan Manually"}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("p",{children:"Set subscription plan manually for debugging purposes - only applies on the frontend, so queue times etc not impacted"}),(0,n.jsx)(Y.r,{checked:e,onCheckedChange:t})]}),(0,n.jsxs)(G.Ph,{disabled:!e,value:r,onValueChange:i,children:[(0,n.jsx)(G.i4,{children:r??"None"}),(0,n.jsxs)(G.Bw,{className:"z-[1000]",children:[(0,n.jsx)(G.Ql,{value:"FREE",children:"Free"}),(0,n.jsx)(G.Ql,{value:"PRO",children:"Pro"}),(0,n.jsx)(G.Ql,{value:"TURBO",children:"Turbo"})]})]})]})}function eo(){let e=(0,s.useSession)(),t=e.data?.user?.subscriptions,r=(0,g.d)(),i=e.data?.user.email,o=(0,x.useRouter)(),a=e=>{let t=(0,A.Ht)(e.stripePriceId);return t?[t.name,`$${t.price} ${"monthly"===t.term?"per month":"per year"}`]:["Free"]},l=(0,q.kM)();return(0,n.jsxs)("div",{className:"flex flex-col",children:[!t||!t.length&&(0,n.jsxs)("div",{className:"flex justify-between gap-4 mb-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:f().label,children:"Current subscription"}),(0,n.jsx)("div",{className:"flex items-center gap-1",children:(0,n.jsx)("span",{className:"font-pg-medium",children:"Free plan"})})]}),(0,n.jsx)("button",{type:"button",className:"text-button text-right",onClick:()=>{window.location.assign("/pricing")},children:"Upgrade"})]}),(0,n.jsxs)("div",{className:"flex flex-col",children:[t&&t?.length>0&&(0,n.jsx)(n.Fragment,{children:t.map((e,t)=>{let i=A.wv(e.stripePriceId)?.name==="Pro Design";return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex justify-between gap-4 mb-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:f().label,children:"Current subscription"}),(0,n.jsx)("div",{className:"flex items-center gap-1",children:a(e).map((e,t)=>(0,n.jsxs)(c.Fragment,{children:[0!==t&&(0,n.jsx)("div",{className:"separator text-gray-50",children:"|"}),(0,n.jsx)("span",{className:"font-pg-medium",children:e})]},`detail-${t}`))})]}),(0,n.jsx)("button",{type:"button",className:"text-button text-right",onClick:async()=>{if(l)return alert("You must manage your subscription on the mobile app.");if(i)return r.closeModal(),o.push("/design/account");let e=await (0,F.A)();window.location.assign(e)},children:"Manage"})]}),e.currentPeriodEnd&&!i&&(0,n.jsxs)("div",{className:"flex justify-between gap-4 mb-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:f().label,children:e.cancelAtPeriodEnd?"Cancels on":(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:"Renews "}),(0,n.jsx)("span",{className:"hidden sm:inline",children:"automatically "}),(0,n.jsx)("span",{children:"on"})]})}),(0,n.jsx)("p",{className:"font-pg-medium",children:(0,F.t)(e.currentPeriodEnd)})]}),e.cancelAtPeriodEnd?(0,n.jsx)("button",{type:"button",className:"text-button text-right",onClick:async()=>{let e=await (0,F.A)();window.location.assign(e)},children:"Renew subscription"}):(0,n.jsx)("button",{type:"button",className:"text-button danger text-right",onClick:()=>l?alert("You must cancel your plan on the mobile app."):r.setModalContent((0,n.jsx)(k,{subscriptionId:e.id}),{transitionModal:!0,useBlurredBackground:!0,removeBorder:!0}),children:"Cancel subscription"})]})]},`subscription-section-${t}`)})}),(0,n.jsx)("div",{className:"flex justify-between gap-4 mb-6",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:f().label,children:"Email"}),(0,n.jsx)("p",{className:"font-pg-medium",children:i})]})})]})]})}function ea(){let e=(0,s.useSession)(),t=(0,o.z0)(),[r,i]=(0,c.useState)(!1),a=I.t5.useUserHasPermission("accounts:manage");return t?(0,n.jsxs)("details",{className:"max-w-full",children:[(0,n.jsxs)("summary",{className:"max-w-full",children:["View Preferences (Internal only)",a&&(0,n.jsx)("button",{type:"button",onClick:async()=>{i(!0),await (0,E.a7)(),i(!1)},disabled:r,className:"text-button danger float-right",children:"Reset"})]}),(0,n.jsxs)("pre",{className:"bg-gray-90 mt-2 p-4 rounded-md overflow-x-auto max-w-md mb-4",children:["// You may need to reload to get accurate data\n",JSON.stringify(e.data.user.db.preferences,null,2)]})]}):null}function es(){let{isLoading:e,error:t,data:r}=(0,W.H)();return e?(0,n.jsx)(Z.ZP,{smaller:!0,className:"w-full mt-8 align-middle text-center"}):t||!r?(0,n.jsx)("div",{children:"There was an error fetching your usage."}):(0,n.jsx)(H,{usage:r})}var el=function(e){let{tab:t}=e,[r,i]=(0,c.useState)("account"),o=(0,s.useSession)();(0,c.useEffect)(()=>{t&&"string"==typeof t&&i(t)},[t]);let a=[{name:"Account",value:"account",icon:p.M,component:en,ref:(0,c.useRef)(null)},{name:"Preferences",value:"preferences",icon:N.Z,component:er,ref:(0,c.useRef)(null)},{name:"Billing",value:"billing",icon:R,component:eo,ref:(0,c.useRef)(null)},{name:"Usage",value:"usage",icon:D,component:es,ref:(0,c.useRef)(null)}];if("unauthenticated"===o.status)return(0,n.jsx)(S.f,{redirectTo:"/create"});let l=a.find(e=>e.value===r).component;return(0,n.jsxs)("div",{className:"bg-gray-95 h-[90vh] md:h-[500px] flex flex-col overflow-auto",children:[(0,n.jsx)("header",{className:"py-4 px-6 border-b border-gray-90 fixed w-full h-16 pointer-events-none",children:(0,n.jsx)("h1",{className:"title-primary",children:"Settings"})}),(0,n.jsxs)("div",{className:"text-white flex flex-col w-[90vw] md:flex-row md:w-[689px] h-full pt-16 overflow-y-auto",children:[(0,n.jsx)("nav",{className:"flex flex-col w-full md:w-48 border-r p-3 border-gray-90  justify-between flex-none overflow-x-scroll xs:overflow-auto",children:(0,n.jsx)("div",{className:"flex md:flex-col mr-0 gap-1",children:a.filter(e=>void 0===e.hide||!e.hide).map(e=>(0,n.jsxs)("button",{ref:e.ref,className:`${r===e.value?"selected":""} sidebar-link w-full md:w-auto h-[45px] md:h-auto justify-center md:justify-start`,onClick:()=>{e.ref.current&&e.ref.current.scrollIntoView({behavior:"smooth"}),i(e.value)},type:"button",children:[(0,n.jsx)(e.icon,{}),e.name]},e.value))})}),(0,n.jsx)("div",{className:"p-8 w-full flex flex-col text-sm overflow-auto",children:(0,n.jsx)(l,{})})]})]})}},40302:function(e,t,r){"use strict";r.d(t,{A:function(){return o},t:function(){return a}});var n=r(9669),i=r.n(n);async function o(){let{data:{url:e}}=await i().post("/api/payments/create-portal-link");return e}function a(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}},72438:function(e,t,r){"use strict";r.d(t,{p:function(){return a}});var n=r(85893);r(67294);var i=r(63778),o=r(30506);function a(e){let{data:t,isLoading:r}=(0,i.Mw)({id:e.imageId},{revalidateIfStale:!0,revalidateOnReconnect:!0,revalidateOnFocus:!0,revalidateOnMount:!0});return r?(0,n.jsx)(o.O,{className:"h-4 w-44"}):(0,n.jsx)("span",{className:"w-44",children:t?.ImageMetadata?.daily_theme_id?"Remove from Daily Theme":"Submit to Daily Theme"})}},14490:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(59820);function i(e){return(0,n.ZP)("/api/daily-theme",e=>fetch(e).then(e=>e.json()),{refereshInterval:3e5,...e})}},58195:function(e,t,r){"use strict";r.d(t,{h:function(){return T}});var n=r(85893),i=r(92323),o=r(63778),a=r(38372),s=r(14490),l=r(75362),u=r(67294),c=r(31630),d=r(11444),f=r(8891),p=r.n(f),h=r(1233),m=r(41664),g=r.n(m),v=r(62469),y=r(59820);function x(){let e="/api/daily-theme/submitted";return{...(0,y.ZP)(e,e=>fetch(e).then(e=>e.json())),queryKey:e}}var b=r(87297),w=r(32478);function _(e){return(0,n.jsxs)("div",{className:(0,h.cn)(["flex flex-col justify-between relative w-full h-full max-w-xl","lg:min-h-[600px] md:max-h-[calc(100vh_-_8rem)]"]),children:[(0,n.jsx)(S,{}),(0,n.jsx)(k,{...e}),(0,n.jsx)(N,{...e}),(0,n.jsx)(j,{}),(0,n.jsx)(C,{...e})]})}function j(){let e=x();return e.data?.submitted?(0,n.jsx)("div",{className:"py-4 px-3",children:(0,n.jsxs)("div",{className:"bg-gray-85 rounded-md flex gap-[10px] p-3",children:[(0,n.jsx)(v.LPM,{className:"h-4 w-4 mt-1 text-[#F7BE00]"}),(0,n.jsxs)("p",{className:"text-gray-25 text-[13px]",children:[(0,n.jsx)(g(),{href:`/post/${e?.data?.data?.imageId}`,target:"_blank",className:"text-gray-5 underline",children:"An image"})," ","has already been submitted to daily theme. ",(0,n.jsx)("br",{}),"Submitting a new one will replace it."]})]})}):null}function C(e){let t=x(),r=(0,o.Mw)({id:e?.image?.id}),[i,a]=(0,u.useState)(!1),{mutate:s}=(0,y.kY)();async function l(){await Promise.all([s(r.queryKey),s(t.queryKey)])}return(0,n.jsxs)("div",{className:(0,h.cn)("flex justify-end gap-4 py-6 px-6 ",t.data?.submitted&&"border-t border-t-gray-85"),children:[(0,n.jsx)("button",{type:"button",disabled:i,onClick:()=>e.onCancel(),className:"marketing-button  secondary",children:"Cancel"}),(0,n.jsx)("button",{disabled:i,type:"button",onClick:async()=>{p().track("Submit to Daily Theme",{dailyThemeId:e.dailyTheme.id}),a(!0),await e.onSubmit(),a(!1),l()},className:"playground-button large primary",children:i?"Submitting...":"Submit"})]})}function k(e){return(0,n.jsxs)("div",{className:"pb-6 pt-1 px-6 sm:inline-flex block items-center gap-2",children:[(0,n.jsx)("p",{className:"text-gray-25 text-sm",children:"The image will be submitted to daily theme"}),(0,n.jsx)(E,{...e})]})}function E(e){return(0,n.jsxs)(g(),{href:"/daily-theme",target:"_blank",className:(0,h.cn)("text-gray-400 playground-button w-fit","!inline-flex h-7 !pt-1 !pb-1"),children:[(0,n.jsx)("img",{alt:`daily theme - ${e.dailyTheme.title}`,src:e.dailyTheme.imageUrl,className:"object-cover h-4 w-4 rounded-xs shrink-0"}),e.dailyTheme.title]})}function S(){return(0,n.jsx)("div",{className:"pt-6 pb-1 flex flex-col gap-4 px-6",children:(0,n.jsx)("h2",{className:"text-gray-5 font-medium text-lg",children:"Submit Image"})})}function N(e){return(0,n.jsx)("div",{className:"h-full w-full aspect-square overflow-hidden flex-1",children:(0,n.jsx)("img",{alt:e.image?.prompt,src:e.image?.url,className:(0,h.cn)("w-full h-full object-contain relative")})})}function P(e){return(0,n.jsx)("div",{className:(0,h.cn)(["flex flex-col justify-between relative w-full max-w-xl","lg:min-h-[600px] md:max-h-[calc(100vh_-_8rem)] w-full lg:w-[600px]"]),children:(0,n.jsxs)("div",{className:"aspect-square p-24 flex flex-col items-center justify-center text-center",children:[(0,n.jsx)(v.NhS,{className:"h-6 w-6 text-[#4EEBC6] mb-4"}),(0,n.jsx)("p",{className:"text-lg items-center text-gray-5 font-pg-medium mb-2",children:"Image submitted to"}),(0,n.jsx)(E,{...e}),(0,n.jsx)(b.h,{type:"button",className:"absolute top-4 right-4 border-none",onClick:()=>e.onCancel(),children:(0,n.jsx)(w.Z,{})})]})})}function L(e){return(0,n.jsx)(d.Z,{error:null,header:"Remove image from daily theme",disabled:!1,primary:{onClick:async()=>(p().track("Cancel submission to Daily Theme",{dailyThemeId:e.dailyTheme.id}),e.onSubmit()),label:e.isSubmitting?"Removing...":"Remove"},secondary:{onClick:()=>{e.onCancel()},label:"Cancel"},children:(0,n.jsx)("p",{className:"text-[13px] text-base font-pg-medium text-gray-50 max-w-md",children:"Are you sure you want to remove the image from today's daily theme?"})})}function T(e){let t=(0,a.Z)(),r=e.imageId,d=(0,o.Mw)({id:r}),{setModalContent:f,closeModal:p}=(0,i.d)(),h=(0,l.Z)("/api/images/submit-to-daily-theme",async(e,t)=>{let{arg:r}=t;return fetch(e,{method:"PUT",body:JSON.stringify({...r})})}),m=(0,s.L)(),g=(0,u.useMemo)(()=>d?.data?.ImageMetadata?.daily_theme_id===m?.data?.id,[m?.data,d?.data?.ImageMetadata?.daily_theme_id]),v=(0,u.useMemo)(()=>t?.id===d?.data?.userId,[d?.data?.userId,t?.id]),y=(0,c.T1)();return{isSubmittedToDailyTheme:g,isCurrentUserImage:v,submitToDailyTheme:async()=>{if(!m.data||!d.data)return;let e=m?.data.id;"string"==typeof e&&"string"==typeof r&&(g?f((0,n.jsx)(L,{dailyTheme:m.data,onCancel:()=>p(),onSubmit:async()=>{await h.trigger({imageId:r,dailyThemeId:e}).then(async e=>{e?.ok?(y("Image removed from daily theme"),p()):y(await e?.text()||"An error has occured")})}}),{showCloseButton:!1}):f((0,n.jsx)(_,{dailyTheme:m.data,image:d.data,onCancel:()=>p(),onSubmit:async()=>{await h.trigger({imageId:r,dailyThemeId:e}).then(async e=>{e?.ok?!m.data||f((0,n.jsx)(P,{onCancel:()=>p(),dailyTheme:m.data}),{showCloseButton:!1}):y(await e?.text()||"An error has occured")})}}),{showCloseButton:!1}))}}}},93125:function(e,t,r){"use strict";r.d(t,{u:function(){return f}});var n=r(31630),i=r(8891),o=r.n(i),a=r(11163),s=r(75362),l=r(1604),u=r(26018),c=r(71864),d=r(97233);function f(){let e=(0,a.useRouter)(),t=(0,n.T1)(),{setUpgradeDialogMeta:r}=(0,c.mr)(),i=(0,u.V)(r),[f,p]=(0,d.Q)();return(0,s.Z)("/api/design/new",async(n,a)=>{try{o().track("Create My Own submitted",{width:a.arg.width,height:a.arg.height});let t=await fetch("/api/design/files/new",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(a.arg)});if(!t.ok){if(402===t.status)return r({open:!0,context:"create-your-own"});return i(t)}let n=await t.json(),s=l.z.object({fileId:l.z.string()}).safeParse(n);if(s.data?.fileId)return e.replace(`/design/${s.data?.fileId}`)}catch(e){console.error(e),t("Failed to create design")}})}},26018:function(e,t,r){"use strict";r.d(t,{V:function(){return d}});var n=r(22220),i=r(31630),o=r(83307),a=r(67294),s=r(1604),l=r(44746),u=r(8891),c=r.n(u);function d(e){let t=(0,l.sA)(),r=(0,i.T1)();return(0,a.useCallback)(async i=>{if(!i.ok){let a=s.z.object({error:o.wH.omit({meta:!0})}).catch(e=>(console.log(e),{error:(0,n.N)("UNKNOWN_ERROR")})),l=await i.json(),u=a.safeParse(l);return u.success&&u.data.error.errorTitle?"RATE_LIMITED"===u.data.error.errorCode?(c().track("Ran out of design generations",{isPaidPlan:t}),t)?r(u.data.error.errorMessage??u.data.error.errorTitle):e({open:!0,context:"edits"}):(r(u.data.error.errorTitle),!0):r((0,n.N)("UNKNOWN_ERROR").errorTitle)}return!1},[r,t,e])}},83532:function(e,t,r){"use strict";r.d(t,{Yj:function(){return w},fE:function(){return x},K7:function(){return b}});var n=r(11923),i=r(67294),o=r(49870),a=r(1604),s=r(70385);a.z.object({templateId:a.z.string(),presetSlug:a.z.string().default("original"),replaceFileId:a.z.string().optional()});let l=a.z.object({prompts:a.z.record(a.z.string())}),u=a.z.string().regex(/^RGB\(\d{1,3}, \d{1,3}, \d{1,3}\)$/),c=a.z.object({version:a.z.literal("1").default("1"),nodes:a.z.array(a.z.object({id:a.z.string(),type:a.z.enum(["text"]),x:a.z.number(),y:a.z.number(),fontSize:a.z.number(),font:a.z.string(),text:a.z.string()})),background:a.z.object({url:a.z.string(),prompt_id:a.z.string(),edit_message:a.z.string().optional(),applied_preset_slug:a.z.string().optional(),palette:a.z.array(u).optional(),action:a.z.enum(["try-again","make-changes","apply-preset","resize","choose-color-palette"]).optional()})}),d=a.z.object({id:a.z.string(),createdAt:a.z.coerce.date(),width:a.z.number(),height:a.z.number(),name:a.z.string().optional().nullish(),seed:a.z.number().optional().nullish(),content:c,parentVersionId:a.z.string().optional().nullish()}),f=d.extend({secretContent:l}),p=a.z.object({id:a.z.string(),name:a.z.string(),type:a.z.enum(["MAJOR","MINOR"])}),h=a.z.object({id:a.z.string(),userDeleted:a.z.boolean().optional().nullish(),templateId:a.z.string().optional().nullish(),Template:a.z.object({title:a.z.string().optional().nullish(),tags:a.z.array(a.z.object({tag:p,tagId:a.z.string()})).optional().nullish(),type:a.z.nativeEnum(s.TemplateType).catch("BASIC")}).optional().nullish(),userId:a.z.string(),name:a.z.string(),createdAt:a.z.coerce.date(),DesignFileVersion:a.z.array(d),activeDesignFileVersionId:a.z.string().optional().nullish()});h.extend({DesignFileVersion:a.z.array(f)}),a.z.object({imageId:a.z.string(),userId:a.z.string()}),a.z.object({custom:a.z.string().optional(),tagId:a.z.string().optional(),subject:a.z.string().optional(),image:a.z.string().optional(),width:a.z.number().int().default(1024),height:a.z.number().int().default(1024)}),a.z.object({name:a.z.string().optional(),activeDesignFileVersionId:a.z.string().optional(),templateId:a.z.string().optional(),userDeleted:a.z.boolean().optional()});var m=r(26018),g=r(11163),v=r(60505);let y=()=>sessionStorage.setItem("designMadeChanges","true");function x(e){return(0,o.Z)(e?`/api/design/files/${e}`:null,(0,n.W)(h.merge(a.z.object({permissions:a.z.object({read:a.z.boolean(),write:a.z.boolean()})}))))}let b=()=>(0,i.useCallback)(async(e,t,r)=>{if(!e&&!r)throw Error("No template?!");if(!e){let e=await fetch("/api/design/files/new",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:r})}),{fileId:t,versionId:n}=await e.json();return{fileId:t,versionId:n}}return{fileId:e,versionId:t}},[]),w=(e,t)=>{let{data:r,error:n,mutate:o}=x(e),a=(0,g.useRouter)(),s=a.query.templateSlug,l=r?.templateId??(s?(0,v.OR)(s):void 0),u=b(),c=(0,m.V)(t),d=(0,i.useCallback)(async t=>{let r=await fetch("/api/design/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestType:"tryAgain",designId:e,designVersion:t})});if(!await c(r))return y(),await o(),r},[e,o,c]),f=(0,i.useCallback)(async(t,r)=>{let{fileId:n,versionId:i}=await u(e,r,l),s=await fetch("/api/design/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestType:"makeChanges",designId:n,designVersion:i,prompt:t})});if(!await c(s))return y(),e?await o():a.push(`/design/${n}`,void 0,{shallow:!0}),s},[u,o,c,l,e,a]),p=(0,i.useCallback)(async(t,r)=>{let{fileId:n,versionId:i}=await u(e,r,l),s=await fetch("/api/design/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestType:"applyPreset",designId:n,designVersion:i,presetSlug:t})});if(!await c(s))return y(),e?await o():a.push(`/design/${n}`,void 0,{shallow:!0}),s},[u,o,c,l,e,a]),h=(0,i.useCallback)(async(t,r,n)=>{let{fileId:i,versionId:s}=await u(e,t,l);console.log("Resize",r,n,i,s);let d=await fetch("/api/design/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestType:"resize",designId:i,designVersion:s,width:r,height:n})});if(!await c(d))return y(),e?await o():a.push(`/design/${i}`,void 0,{shallow:!0}),d},[u,o,c,l,e,a]),w=(0,i.useCallback)(async(t,r)=>{let{fileId:n,versionId:i}=await u(e,t,l),s=await fetch("/api/design/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestType:"chooseColorPalette",designId:n,designVersion:i,palette:r})});if(!await c(s))return y(),e?await o():a.push(`/design/${n}`,void 0,{shallow:!0}),s},[u,o,c,l,e,a]);return(0,i.useMemo)(()=>({designFile:r,error:n,mutate:o,makeChanges:f,resize:h,applyPreset:p,tryAgain:d,chooseColorPalette:w}),[p,d,r,n,f,o,h,w])}},9454:function(e,t,r){"use strict";r.d(t,{ER:function(){return to},Os:function(){return ti},QY:function(){return ts}});var n=r(85893),i=r(67294),o=r(41664),a=r.n(o),s=["light","dark"],l="(prefers-color-scheme: dark)",u="undefined"==typeof window,c=i.createContext(void 0),d=e=>i.useContext(c)?e.children:i.createElement(p,{...e}),f=["light","dark"],p=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:n=!0,storageKey:o="theme",themes:a=f,defaultTheme:u=r?"system":"light",attribute:d="data-theme",value:p,children:y,nonce:x})=>{let[b,w]=i.useState(()=>m(o,u)),[_,j]=i.useState(()=>m(o)),C=p?Object.values(p):a,k=i.useCallback(e=>{let i=e;if(!i)return;"system"===e&&r&&(i=v());let o=p?p[i]:i,a=t?g():null,l=document.documentElement;if("class"===d?(l.classList.remove(...C),o&&l.classList.add(o)):o?l.setAttribute(d,o):l.removeAttribute(d),n){let e=s.includes(u)?u:null,t=s.includes(i)?i:e;l.style.colorScheme=t}null==a||a()},[]),E=i.useCallback(e=>{let t="function"==typeof e?e(e):e;w(t);try{localStorage.setItem(o,t)}catch(e){}},[e]),S=i.useCallback(t=>{j(v(t)),"system"===b&&r&&!e&&k("system")},[b,e]);i.useEffect(()=>{let e=window.matchMedia(l);return e.addListener(S),S(e),()=>e.removeListener(S)},[S]),i.useEffect(()=>{let e=e=>{e.key===o&&E(e.newValue||u)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[E]),i.useEffect(()=>{k(null!=e?e:b)},[e,b]);let N=i.useMemo(()=>({theme:b,setTheme:E,forcedTheme:e,resolvedTheme:"system"===b?_:b,themes:r?[...a,"system"]:a,systemTheme:r?_:void 0}),[b,E,e,_,r,a]);return i.createElement(c.Provider,{value:N},i.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:r,enableColorScheme:n,storageKey:o,themes:a,defaultTheme:u,attribute:d,value:p,children:y,attrs:C,nonce:x}),y)},h=i.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:a,value:u,attrs:c,nonce:d})=>{let f="system"===a,p="class"===r?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=o?(s.includes(a)?a:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(e,t=!1,n=!0)=>{let i=u?u[e]:e,a=t?e+"|| ''":`'${i}'`,l="";return o&&n&&!t&&s.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===r?t||i?l+=`c.add(${a})`:l+="null":i&&(l+=`d[s](n,${a})`),l},g=e?`!function(){${p}${m(e)}}()`:n?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${f})){var t='${l}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}${f?"":"else{"+m(a,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}else{${m(a,!1,!1)};}${h}}catch(t){}}();`;return i.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:g}})}),m=(e,t)=>{let r;if(!u){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},g=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},v=e=>(e||(e=window.matchMedia(l)),e.matches?"dark":"light"),y=r(48105),x=r(28447),b=r(1233),w=r(30299),_=r.n(w),j=r(11163),C=r.n(j),k=r(57755);function E(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,n.jsx)("path",{d:"M13.5045 15C14.8826 15 15.9998 16.1172 15.9998 17.4953C15.9998 20.2919 12.4304 19.9905 10.4995 19.9905C11.9897 17.4953 10.7079 15 13.5045 15Z",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14 14.5C16.2658 11.781 16.4781 11.5263 18.891 10.3857C19.3845 10.1524 19.9712 10.2569 20.3571 10.6429V10.6429C20.7431 11.0288 20.8476 11.6155 20.6143 12.109C19.4737 14.5219 19.219 14.7342 16.5 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M17.9531 6C16.3666 4.75527 14.2825 4 12 4C7.02944 4 3 7.58172 3 12C3 14.7737 4.58803 17.2177 7 18.6528",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,n.jsx)("circle",{cx:"7.41176",cy:"13.0883",r:"1.41176",fill:"currentColor"}),(0,n.jsx)("circle",{cx:"8.35317",cy:"9.32351",r:"1.41176",fill:"currentColor"}),(0,n.jsx)("circle",{cx:"12.1178",cy:"7.91176",r:"1.41176",fill:"currentColor"})]})}var S=r(71864);function N(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",...e,children:(0,n.jsx)("path",{d:"M23 16.6679C23 20.4951 20.4871 23 16.3268 23H14.0372C13.3485 23 12.8552 22.4785 12.8552 21.836C12.8552 21.1935 13.3485 20.6813 14.0372 20.6813H16.2151C19.0817 20.6813 20.7104 18.9586 20.7104 16.5934C20.7104 14.2375 19.0817 12.5706 16.2151 12.5706H10.6494L8.5181 12.4775L10.0538 13.7625L12.2316 15.8764C12.4364 16.0905 12.576 16.342 12.576 16.6958C12.576 17.3383 12.1293 17.8132 11.4498 17.8132C11.152 17.8132 10.8449 17.6829 10.6122 17.4501L5.35367 12.2726C5.1303 12.0491 5 11.7232 5 11.4066C5 11.09 5.1303 10.7734 5.35367 10.5499L10.6122 5.36317C10.8449 5.13037 11.152 5 11.4498 5C12.1293 5 12.576 5.47491 12.576 6.11743C12.576 6.47129 12.4364 6.72271 12.2316 6.93689L10.0538 9.06001L8.5181 10.3451L10.6494 10.2519H16.2244C20.4405 10.2519 23 12.8686 23 16.6679Z",fill:"currentColor"})})}function P(e){return(0,n.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{d:"M5 16.6679C5 12.8686 7.55946 10.2519 11.7756 10.2519H17.3506L19.4819 10.3451L17.9462 9.06001L15.7684 6.93689C15.5543 6.72271 15.4147 6.47129 15.4147 6.11743C15.4147 5.47491 15.8707 5 16.5502 5C16.8387 5 17.1551 5.13037 17.3878 5.36317L22.6463 10.5499C22.8697 10.7734 23 11.09 23 11.4066C23 11.7232 22.8697 12.0491 22.6463 12.2726L17.3878 17.4501C17.1551 17.6829 16.8387 17.8132 16.5502 17.8132C15.8707 17.8132 15.4147 17.3383 15.4147 16.6958C15.4147 16.342 15.5543 16.0905 15.7684 15.8764L17.9462 13.7625L19.4819 12.4775L17.3506 12.5706H11.7756C8.9183 12.5706 7.28956 14.2375 7.28956 16.5934C7.28956 18.9586 8.9183 20.6813 11.7756 20.6813H13.9628C14.6515 20.6813 15.1448 21.1935 15.1448 21.836C15.1448 22.4785 14.6515 23 13.9628 23H11.6639C7.51293 23 5 20.4951 5 16.6679Z",fill:"currentColor"})})}var L=r(64372),T=r(10397),O=r(35362);function R(e){return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(y.z,{onClick:()=>C().push("/design"),...e,children:e.children??"Explore Templates"})})}var A=r(38372),I=r(70385),M=r(50886),D=r(13583),F=r(11923),z=r(33657),B=r(59820),U=r(75362),V=r(1604),$=r(627),H=r(31630),Z=r(18794),W=r(59480),q=r(82449),G=r(69198),Y=r(62469),K=r(19393),X=r(32036);function J(e){return(0,n.jsxs)("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("ellipse",{cx:"12",cy:"12",rx:"3",ry:"9",stroke:"#7C766F",strokeWidth:"2"}),(0,n.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"#7C766F",strokeWidth:"2"}),(0,n.jsx)("path",{d:"M3 12H21",stroke:"#7C766F",strokeWidth:"2"})]})}var Q=r(75287),ee=r(8891),et=r.n(ee);let er=V.z.object({acl:V.z.array(V.z.object({id:V.z.string(),email:V.z.string().nullable(),status:V.z.nativeEnum(I.InviteStatus),User:V.z.object({email:V.z.string(),displayName:V.z.string().nullable(),image:V.z.string().nullable(),id:V.z.string()}).nullable()})),accessType:V.z.nativeEnum(I.DesignFileAccess)});function en(e){let{data:t}=(0,B.ZP)(e?`/api/design/files/${e}/share`:null,(0,F.W)(er));return t}function ei(e){let t=(0,H.T1)();return(0,U.Z)(e?`/api/design/files/${e}/share`:null,async(e,r)=>{let{arg:n}=r,i=await fetch(e,{method:{share:"POST",revoke:"DELETE",change_access:"POST"}[n.type],body:JSON.stringify({action:n.type,...n}),headers:{"Content-Type":"application/json"}});if(!i.ok){t("Failed to share file");return}return i.json()})}function eo(e){let{designFile:t}=(0,S.mr)(),r=en(t?.id),o=ei(t?.id),a=(0,Z.LL)(),s=t?.userId,l=t?.permissions.write,[u,c]=(0,i.useState)(""),[d,f]=(0,i.useState)(!1);return t?r&&r.acl?a?(0,n.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),await o.trigger({type:"share",email:u}),c("")},children:[(0,n.jsxs)("header",{className:"flex gap-1 items-center justify-between p-2 pb-3 pr-0 font-semibold text-lg",children:[(0,n.jsx)("h2",{children:"People who can view"}),(0,n.jsxs)(y.z,{variant:"ghost",className:"!text-[16px] flex gap-1 text-fg-tertiary",type:"button",onClick:()=>{et().track("Copied design file link",{accessType:r.accessType,designFileId:t?.id}),navigator.clipboard.writeText(window.location.href),f(!0),setTimeout(()=>{f(!1)},2e3)},children:[d?(0,n.jsx)(Y.nQG,{width:20,height:20}):(0,n.jsx)(K.T,{className:"w-5 h-5"})," ",(0,n.jsx)("span",{className:"text-fg-secondary",children:d?"Link copied":"Copy link"})]})]}),l&&(0,n.jsxs)("label",{className:"flex items-center gap-1 bg-bg-secondary rounded-full p-1.5 pl-2 focus-within:ring-[3px] ring-action-primary",children:[(0,n.jsx)("input",{type:"email",className:`bg-transparent
             w-full p-1
            outline-none placeholder:text-pg-ds-600 px-3 text-lg`,value:u,required:!0,autoFocus:!0,onChange:e=>c(e.target.value),placeholder:"Email address"}),(0,n.jsx)("button",{type:"submit",className:"bg-action-primary text-white p-2 rounded-full hover:bg-action-primary/90 disabled:bg-bg-tertiary disabled:text-fg-quaternary",disabled:!u,children:o.isMutating?(0,n.jsx)($.s8,{className:"text-white fill-white",width:20,height:20}):(0,n.jsx)(z.Z,{size:20})})]}),(0,n.jsx)(ea,{}),(0,n.jsx)("ul",{className:"w-full overflow-auto space-y-6 px-2 py-2",children:r.acl.map(e=>(0,n.jsxs)("li",{className:"rounded-full flex justify-between w-full text-fg-secondary font-medium",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsxs)(M.qE,{className:"h-6 w-6",children:[(0,n.jsx)(M.F$,{className:"bg-white",src:e.User?.image??""}),(0,n.jsx)(M.Q5,{className:"text-xs",children:(0,D.Q)(e.User??e.email??"")})]}),(0,n.jsxs)("p",{className:"truncate",children:[e.User?.displayName??e.email," ","USER_PENDING"===e.status?(0,n.jsx)("span",{className:"text-fg-tertiary",children:"(pending)"}):""]})]}),(0,n.jsx)("div",{className:"justify-self-end h-[24px]",children:s===e.User?.id?(0,n.jsx)("span",{className:"text-[14px] text-fg-secondary",children:"Owner"}):l?(0,n.jsx)("button",{type:"button",onClick:()=>{let t=e.email??e.User?.email;(0,q.assert)(t,"email DNE"),o.trigger({type:"revoke",email:t})},className:"hover:text-dark-pink text-fg-tertiary",children:(0,n.jsx)(W.X,{})}):null})]},e.id))})]}):null:(0,n.jsx)(G.T,{}):(0,n.jsx)(G.T,{variant:"saving-design"})}function ea(){let{designFile:e}=(0,S.mr)(),t=en(e?.id),r=ei(e?.id),i={[I.DesignFileAccess.PUBLIC]:(0,n.jsx)(J,{}),[I.DesignFileAccess.PRIVATE]:(0,n.jsx)(Q.m,{className:"text-[#7C766F]"})}[t?.accessType??""];return(0,n.jsxs)("div",{className:"flex gap-[9px] pl-[9px] px-2 py-2 pb-2.5 mt-2 items-center",children:[r.isMutating?(0,n.jsx)("div",{className:"p-1 px-[3px]",children:(0,n.jsx)($.s8,{width:16,height:16,className:"fill-fg-tertiary"})}):i,(0,n.jsxs)(X.fC,{value:t?.accessType,onValueChange:async e=>{void 0!==e&&await r.trigger({type:"change_access",change_to:e})},disabled:r.isMutating,children:[(0,n.jsxs)(X.xz,{className:"flex gap-1 text-[16px] items-center font-medium text-fg-secondary w-full justify-between",children:[(0,n.jsx)(X.B4,{placeholder:"Access..."}),(0,n.jsx)(X.JO,{className:"text-fg-tertiary",children:(0,n.jsx)(Y.v4q,{width:24,height:24})})]}),(0,n.jsx)(X.h_,{children:(0,n.jsx)(X.VY,{className:"z-50 bg-white p-1 rounded-design-sm shadow-design-md",children:(0,n.jsxs)(X.l_,{children:[(0,n.jsx)(X.ck,{className:"hover:bg-pg-ds-100 p-1.5 px-2 rounded-lg text-pg-ds-850 font-medium flex cursor-pointer",value:I.DesignFileAccess.PRIVATE,children:(0,n.jsx)(X.eT,{children:"Only people added can access"})}),(0,n.jsx)(X.ck,{className:"hover:bg-pg-ds-100 p-1.5 px-2 rounded-lg text-pg-ds-850 font-medium flex cursor-pointer",value:I.DesignFileAccess.PUBLIC,children:(0,n.jsx)(X.eT,{children:"Anyone with the link"})})]})})})]})]})}var es=r(90021),el=r(63518),eu=r(83532);function ec(){let e=(0,A.Z)(),[t,r]=(0,i.useState)(!1),{template:o,designFile:a}=(0,S.mr)();en(a?.id),(0,el.Z)("design:share:open",()=>r(!0));let s=(0,eu.K7)(),l=(0,j.useRouter)(),u=(0,i.useCallback)(async e=>{if(r(e),e&&!a){let{fileId:e}=await s(null,null,o?.id);l.push(`/design/${e}`,void 0,{shallow:!0})}},[a,s,o?.id,l,r]);return e?(0,n.jsxs)(es.fC,{open:t,onOpenChange:u,children:[(0,n.jsx)(es.xz,{asChild:!0,children:(0,n.jsx)(y.z,{variant:"action-primary",type:"button",className:"font-semibold z-50",children:"Share"})}),(0,n.jsx)(es.h_,{children:(0,n.jsx)(es.VY,{align:"end",className:"rounded-design-md outline-none p-[14px] w-[360px] bg-bg-primary z-50",style:{boxShadow:"0px 4px 16px 0px rgba(0, 0, 0, 0.20)"},sideOffset:5,children:(0,n.jsx)(eo,{})})})]}):null}function ed(e){let{reverse:t,...r}=e;return(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:t?"M3 8.5C3 7.94772 3.44772 7.5 4 7.5H20C20.5523 7.5 21 7.94772 21 8.5C21 9.05228 20.5523 9.5 20 9.5H4C3.44772 9.5 3 9.05228 3 8.5ZM9 15.5C9 14.9477 9.44772 14.5 10 14.5H20C20.5523 14.5 21 14.9477 21 15.5C21 16.0523 20.5523 16.5 20 16.5H10C9.44772 16.5 9 16.0523 9 15.5Z":"M3 8.5C3 7.94772 3.44772 7.5 4 7.5H20C20.5523 7.5 21 7.94772 21 8.5C21 9.05228 20.5523 9.5 20 9.5H4C3.44772 9.5 3 9.05228 3 8.5ZM3 15.5C3 14.9477 3.44772 14.5 4 14.5H14C14.5523 14.5 15 14.9477 15 15.5C15 16.0523 14.5523 16.5 14 16.5H4C3.44772 16.5 3 16.0523 3 15.5Z",fill:"currentColor"})})}var ef=r(44746),ep=r(49296),eh=r(85903),em=r.n(eh),eg=r(77832),ev=r(21498);function ey(e){let{open:t,setOpen:r}=e;(0,ef.kM)();let o=(0,i.useRef)(null),a=(0,j.useRouter)(),{designFile:s,designVersion:l}=(0,S.mr)();return(0,ep.p)(o,e=>{"HTML"!==e.target.tagName&&r(!1)}),(0,eg.K)("Escape",()=>r(!1)),(0,i.useEffect)(()=>{let e=sessionStorage.getItem("designMadeChanges"),t=s?.id,r=l?.content?.background?.url,n=!1;function i(){!n&&t&&e&&setTimeout(()=>{(0,ev._A)(t,r)},1e3)}return a.events.on("routeChangeStart",i),()=>{n=!0,a.events.off("routeChangeStart",i)}},[s?.id,l?.content?.background?.url,a.events]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.z,{onClick:()=>r(!0),size:"icon",variant:"ghost",children:(0,n.jsx)(ed,{})}),(0,n.jsx)("div",{ref:o,className:`fixed top-0 left-0 bottom-0 w-[224px] z-50 backdrop-blur-2xl max-md:bg-white/75 transition-transform ${t?"max-md:shadow-2xl":"-translate-x-[224px]"} ${em().DropdownMenu}`,children:(0,n.jsx)(ti,{onMenuClick:()=>r(!1)})})]})}var ex=r(69306),eb=r(98511),ew=r(77922);function e_(){let{designVersion:e,template:t,showExploreSidebar:r,setShowExploreSidebar:o,upgradeDialogMeta:a,setUpgradeDialogMeta:s}=(0,S.mr)(),[l,u]=(0,i.useState)(""),[c,d]=(0,i.useState)(e?.name??t?.title),[f,p]=(0,i.useState)(t),h=(0,ex.OV)("lg"),m=(0,i.useRef)(!1);(0,i.useEffect)(()=>{m.current||(m.current=!0,h?o(!1):o(!0))},[h,o]),(0,i.useEffect)(()=>{r&&c||d(e?.name??t?.title)},[r,e?.name,t?.title,c]),(0,i.useEffect)(()=>{r&&f||p(t),r&&h&&t?.id!==f?.id&&o(!1)},[r,t,f,h,o]);let g=(0,i.useMemo)(()=>l||c,[c,l]),v=(0,Z.L0)();(0,eb.useSearchQuery)(g,void 0,void 0,[]);let x=(0,i.useMemo)(()=>e=>e.id!==f?.id,[f?.id]);return v&&g?(0,n.jsxs)(es.fC,{open:r,onOpenChange:e=>{a.open||o(e)},children:[(0,n.jsx)(es.xz,{asChild:!0,children:(0,n.jsx)(y.z,{variant:"ghost",type:"button",className:(0,b.cn)("flex gap-2 font-semibold z-50 text-fg-primary",r?"bg-bg-tertiary":""),children:"Explore"})}),(0,n.jsx)(es.VY,{align:"end",className:"p-2 z-50 w-[100vw] max-w-[480px]",sideOffset:0,style:{height:"var(--radix-popover-content-available-height)"},onEscapeKeyDown:e=>{a.open&&s({open:!1})},onOpenAutoFocus:e=>{h&&e.preventDefault()},children:(0,n.jsxs)("div",{className:"flex flex-col gap-2 max-h-full rounded-design-md outline-none p-[14px] w-full bg-bg-primary",style:{boxShadow:"0px 4px 16px 0px rgba(0, 0, 0, 0.20)"},children:[(0,n.jsx)(ew.Z,{value:l,onChange:e=>u(e.target.value)}),(0,n.jsx)("div",{className:"overflow-y-auto flex-shrink",children:(0,n.jsx)(eb.DesignSearchResults,{filter:x,initialData:[],query:g,showCategory:!1,columnsCount:2,context:"explore-template",extraMixpanelProps:{fromExplore:!0}})})]})})]}):null}function ej(e){let{template:t,designFile:r,url:o,versionPointer:a,setVersionPointer:s,loading:l}=(0,S.mr)(),u=(0,i.useMemo)(()=>l||a===Number(r?.DesignFileVersion?.length??0)-1||!r,[l,a,r]),c=(0,i.useMemo)(()=>l||0===a||!r,[l,a,r]),d=(0,i.useCallback)(()=>{u||s(e=>Math.min(e+1,Number(r?.DesignFileVersion?.length??0)-1))},[s,r?.DesignFileVersion?.length,u]),f=(0,i.useCallback)(()=>{c||s(e=>Math.max(0,e-1))},[s,c]),p=(0,i.useCallback)(e=>{"ArrowLeft"===e.key&&d(),"ArrowRight"===e.key&&f(),e.metaKey&&!e.shiftKey&&"z"===e.key&&d(),e.metaKey&&e.shiftKey&&"z"===e.key&&f()},[d,f]);(0,O.i)(p);let h=(0,Z.LL)(),m=t?.tags?.find(e=>"MAJOR"===e.tag.type)?.tag?.slug,g=e.history?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.z,{onClick:()=>s(e=>Math.min(e+1,Number(r?.DesignFileVersion?.length??0)-1)),disabled:u,children:(0,n.jsx)(N,{})}),(0,n.jsx)(y.z,{onClick:()=>s(e=>Math.max(0,e-1)),disabled:c,children:(0,n.jsx)(P,{})})]}):null,v=(0,Z.LL)(),x=(0,ex.OV)("md")&&v,[b,w]=(0,i.useState)(!1);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("header",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full h-[var(--design-create-header-height)] px-4 py-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ey,{open:b,setOpen:w}),(0,n.jsx)("div",{className:b?"hidden":"block",children:(0,n.jsx)(e_,{})})]}):(0,n.jsxs)(n.Fragment,{children:[e.back&&(0,n.jsx)(T.D,{href:m?`/design/c/${m}`:"/design"}),(0,n.jsx)(e_,{})]}),e.explore&&(0,n.jsx)(R,{})]}),(0,n.jsx)("div",{className:"col-start-2 row-start-1 col-span-1 row-span-1 justify-self-center",children:!x&&g}),(0,n.jsxs)("div",{className:"col-start-3 row-start-1 col-span-1 row-span-1 justify-self-end flex gap-2",children:[h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(L.ZP,{},o),(0,n.jsx)(ec,{})]}),!h&&e.export&&(0,n.jsx)(L.ZP,{},o)]}),x&&(0,n.jsx)("div",{className:"flex justify-center col-span-3 pt-2",children:g})]})})}var eC=r(90644),ek=r(5266),eE=r(33299);let eS=["/design/new","/design/[id]","/design/[fileSlug]"],eN=["/design/template/[templateSlug]"],eP=["/design","/design/my-designs","/design/shared","/design/c/[parentId]","/design/c/[parentId]/[tagId]","/design/pricing","/design/account"];var eL=r(66751),eT=r(22227),eO=r(40714),eR=r(78358),eA=r(67251),eI=r.n(eA),eM=function(){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none",viewBox:"0 0 30 30",children:[(0,n.jsx)("rect",{width:"30",height:"30",fill:"url(#paint0_linear_929_2876)",rx:"15"}),(0,n.jsx)("rect",{width:"30",height:"30",fill:"#E8AC38",fillOpacity:"0.25",rx:"15"}),(0,n.jsxs)("g",{fillRule:"evenodd",clipRule:"evenodd",filter:"url(#filter0_diiii_929_2876)",children:[(0,n.jsx)("path",{fill:"#fff",d:"M16.954 7.767l-.483 4.292h4.035c.732 0 1.196.517 1.378.991.185.482.168 1.1-.194 1.61l-.004.005-6.307 8.707a1.46 1.46 0 01-.91.603 1.417 1.417 0 01-1.011-.19c-.56-.342-.859-1.018-.723-1.731l.777-4.837H9.494c-.732 0-1.196-.517-1.378-.991a1.722 1.722 0 01.194-1.61l.01-.013 6.136-7.924c.379-.522 1.069-.877 1.76-.557.663.307.85 1.02.738 1.645z"}),(0,n.jsx)("path",{fill:"url(#paint1_linear_929_2876)",fillOpacity:"0.25",d:"M16.954 7.767l-.483 4.292h4.035c.732 0 1.196.517 1.378.991.185.482.168 1.1-.194 1.61l-.004.005-6.307 8.707a1.46 1.46 0 01-.91.603 1.417 1.417 0 01-1.011-.19c-.56-.342-.859-1.018-.723-1.731l.777-4.837H9.494c-.732 0-1.196-.517-1.378-.991a1.722 1.722 0 01.194-1.61l.01-.013 6.136-7.924c.379-.522 1.069-.877 1.76-.557.663.307.85 1.02.738 1.645z"})]}),(0,n.jsxs)("defs",{children:[(0,n.jsxs)("filter",{id:"filter0_diiii_929_2876",width:"22",height:"26",x:"4",y:"3",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[(0,n.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dy:"1"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.13743 0 0 0 0 0.107034 0 0 0 0 0.486979 0 0 0 0.75 0"}),(0,n.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_929_2876"}),(0,n.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_929_2876",result:"shape"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"-0.6",dy:"-0.45"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.876807 0 0 0 0 0.654693 0 0 0 0 0.0835421 0 0 0 0.7 0"}),(0,n.jsx)("feBlend",{in2:"shape",result:"effect2_innerShadow_929_2876"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"-0.5",dy:"1.8"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.97725 0 0 0 0 0.8375 0 0 0 0 1 0 0 0 1 0"}),(0,n.jsx)("feBlend",{in2:"effect2_innerShadow_929_2876",result:"effect3_innerShadow_929_2876"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"0.8",dy:"-0.554"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"0.5"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.15721 0 0 0 0 0.443759 0 0 0 0 1 0 0 0 0.66 0"}),(0,n.jsx)("feBlend",{in2:"effect3_innerShadow_929_2876",result:"effect4_innerShadow_929_2876"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dy:"0.5"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"0.2"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"}),(0,n.jsx)("feBlend",{in2:"effect4_innerShadow_929_2876",result:"effect5_innerShadow_929_2876"})]}),(0,n.jsxs)("linearGradient",{id:"paint0_linear_929_2876",x1:"15",x2:"15",y1:"0",y2:"30",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#5E5BD7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#35312D"})]}),(0,n.jsxs)("linearGradient",{id:"paint1_linear_929_2876",x1:"10.917",x2:"19.585",y1:"4.313",y2:"25.916",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#FD91FF",stopOpacity:"0.7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#D7CDB1",stopOpacity:"0.8"})]})]})]})},eD=function(){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none",viewBox:"0 0 30 30",children:[(0,n.jsx)("rect",{width:"30",height:"30",fill:"url(#paint0_linear_929_2882)",rx:"15"}),(0,n.jsx)("rect",{width:"30",height:"30",fill:"#E8AC38",fillOpacity:"0.25",rx:"15"}),(0,n.jsxs)("g",{fillRule:"evenodd",clipRule:"evenodd",filter:"url(#filter0_diiii_929_2882)",children:[(0,n.jsx)("path",{fill:"#fff",d:"M15.828 15.507l5.516-2.968v5.698c0 .301-.158.579-.414.73l-5.102 2.993v-6.453zm.414-9.169a2.45 2.45 0 00-2.484 0L8.242 9.576A2.534 2.534 0 007 11.763v6.474c0 .903.474 1.736 1.242 2.187l5.516 3.238a2.45 2.45 0 002.484 0l5.516-3.238A2.533 2.533 0 0023 18.237v-6.474c0-.902-.474-1.736-1.242-2.187l-5.516-3.238zm-6.835 4.498l5.179-3.04a.817.817 0 01.426-.112v6.357l-5.605-3.205z"}),(0,n.jsx)("path",{fill:"url(#paint1_linear_929_2882)",fillOpacity:"0.25",d:"M15.828 15.507l5.516-2.968v5.698c0 .301-.158.579-.414.73l-5.102 2.993v-6.453zm.414-9.169a2.45 2.45 0 00-2.484 0L8.242 9.576A2.534 2.534 0 007 11.763v6.474c0 .903.474 1.736 1.242 2.187l5.516 3.238a2.45 2.45 0 002.484 0l5.516-3.238A2.533 2.533 0 0023 18.237v-6.474c0-.902-.474-1.736-1.242-2.187l-5.516-3.238zm-6.835 4.498l5.179-3.04a.817.817 0 01.426-.112v6.357l-5.605-3.205z"})]}),(0,n.jsxs)("defs",{children:[(0,n.jsxs)("filter",{id:"filter0_diiii_929_2882",width:"24",height:"26",x:"3",y:"3",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[(0,n.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dy:"1"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.13743 0 0 0 0 0.107034 0 0 0 0 0.486979 0 0 0 0.75 0"}),(0,n.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_929_2882"}),(0,n.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_929_2882",result:"shape"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"-0.6",dy:"-0.45"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.876807 0 0 0 0 0.654693 0 0 0 0 0.0835421 0 0 0 0.7 0"}),(0,n.jsx)("feBlend",{in2:"shape",result:"effect2_innerShadow_929_2882"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"-0.5",dy:"1.8"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.97725 0 0 0 0 0.8375 0 0 0 0 1 0 0 0 1 0"}),(0,n.jsx)("feBlend",{in2:"effect2_innerShadow_929_2882",result:"effect3_innerShadow_929_2882"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"0.8",dy:"-0.554"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"0.5"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.15721 0 0 0 0 0.443759 0 0 0 0 1 0 0 0 0.66 0"}),(0,n.jsx)("feBlend",{in2:"effect3_innerShadow_929_2882",result:"effect4_innerShadow_929_2882"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dy:"0.5"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"0.2"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"}),(0,n.jsx)("feBlend",{in2:"effect4_innerShadow_929_2882",result:"effect5_innerShadow_929_2882"})]}),(0,n.jsxs)("linearGradient",{id:"paint0_linear_929_2882",x1:"15",x2:"15",y1:"0",y2:"30",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#5E5BD7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#35312D"})]}),(0,n.jsxs)("linearGradient",{id:"paint1_linear_929_2882",x1:"10.333",x2:"18.173",y1:"4.313",y2:"26.642",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#FD91FF",stopOpacity:"0.7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#D7CDB1",stopOpacity:"0.8"})]})]})]})},eF=function(){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",viewBox:"0 0 28 28",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_1756_12150)",children:[(0,n.jsx)("rect",{width:"28",height:"28",fill:"url(#paint0_linear_1756_12150)",rx:"14"}),(0,n.jsx)("rect",{width:"28",height:"28",fill:"#E8AC38",fillOpacity:"0.25",rx:"14"}),(0,n.jsxs)("g",{fillRule:"evenodd",clipRule:"evenodd",filter:"url(#filter0_diiii_1756_12150)",children:[(0,n.jsx)("path",{fill:"#fff",d:"M13.973 4.616a.75.75 0 01.75.75v1.78a5.29 5.29 0 011.876.494c.716.346 1.273.828 1.67 1.446.27.418.451.88.544 1.388.075.412-.27.757-.69.757h-1.161c-.387 0-.69-.307-.854-.658a1.614 1.614 0 00-.477-.594c-.38-.298-.898-.447-1.551-.447-.444 0-.819.067-1.125.2-.305.129-.54.309-.703.54-.16.23-.239.493-.239.786-.008.244.04.458.145.64.108.182.257.34.446.473.188.129.406.242.653.34.247.093.51.173.791.24l1.156.293c.561.133 1.077.31 1.546.533.469.222.875.495 1.218.82.344.324.61.706.798 1.146.193.44.291.944.295 1.512-.004.835-.205 1.56-.603 2.172-.393.609-.963 1.082-1.708 1.42-.582.261-1.258.42-2.027.476V22.9a.75.75 0 01-1.5 0v-1.753l.001-.04a6.135 6.135 0 01-1.87-.466c-.767-.338-1.366-.837-1.797-1.5-.312-.485-.515-1.055-.61-1.708-.061-.416.283-.763.704-.763h1.162c.396 0 .706.315.838.688.06.168.139.32.236.458.222.302.518.53.886.686.373.151.794.227 1.263.227.46 0 .86-.072 1.2-.214.343-.142.609-.34.797-.593.189-.253.283-.544.283-.873 0-.306-.086-.564-.257-.772-.168-.21-.415-.387-.742-.534a7.235 7.235 0 00-1.187-.4l-1.4-.373c-1.085-.28-1.942-.717-2.57-1.312-.628-.595-.94-1.397-.936-2.406-.004-.826.203-1.548.622-2.165.423-.618 1.003-1.1 1.74-1.446.5-.235 1.046-.39 1.64-.466a.812.812 0 01-.003-.054V5.366a.75.75 0 01.75-.75z"}),(0,n.jsx)("path",{fill:"url(#paint1_linear_1756_12150)",fillOpacity:"0.25",d:"M13.973 4.616a.75.75 0 01.75.75v1.78a5.29 5.29 0 011.876.494c.716.346 1.273.828 1.67 1.446.27.418.451.88.544 1.388.075.412-.27.757-.69.757h-1.161c-.387 0-.69-.307-.854-.658a1.614 1.614 0 00-.477-.594c-.38-.298-.898-.447-1.551-.447-.444 0-.819.067-1.125.2-.305.129-.54.309-.703.54-.16.23-.239.493-.239.786-.008.244.04.458.145.64.108.182.257.34.446.473.188.129.406.242.653.34.247.093.51.173.791.24l1.156.293c.561.133 1.077.31 1.546.533.469.222.875.495 1.218.82.344.324.61.706.798 1.146.193.44.291.944.295 1.512-.004.835-.205 1.56-.603 2.172-.393.609-.963 1.082-1.708 1.42-.582.261-1.258.42-2.027.476V22.9a.75.75 0 01-1.5 0v-1.753l.001-.04a6.135 6.135 0 01-1.87-.466c-.767-.338-1.366-.837-1.797-1.5-.312-.485-.515-1.055-.61-1.708-.061-.416.283-.763.704-.763h1.162c.396 0 .706.315.838.688.06.168.139.32.236.458.222.302.518.53.886.686.373.151.794.227 1.263.227.46 0 .86-.072 1.2-.214.343-.142.609-.34.797-.593.189-.253.283-.544.283-.873 0-.306-.086-.564-.257-.772-.168-.21-.415-.387-.742-.534a7.235 7.235 0 00-1.187-.4l-1.4-.373c-1.085-.28-1.942-.717-2.57-1.312-.628-.595-.94-1.397-.936-2.406-.004-.826.203-1.548.622-2.165.423-.618 1.003-1.1 1.74-1.446.5-.235 1.046-.39 1.64-.466a.812.812 0 01-.003-.054V5.366a.75.75 0 01.75-.75z"})]})]}),(0,n.jsxs)("defs",{children:[(0,n.jsxs)("filter",{id:"filter0_diiii_1756_12150",width:"18.122",height:"27.033",x:"4.939",y:"1.616",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[(0,n.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dy:"1"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.13743 0 0 0 0 0.107034 0 0 0 0 0.486979 0 0 0 0.75 0"}),(0,n.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1756_12150"}),(0,n.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1756_12150",result:"shape"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"-0.6",dy:"-0.45"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.876807 0 0 0 0 0.654693 0 0 0 0 0.0835421 0 0 0 0.7 0"}),(0,n.jsx)("feBlend",{in2:"shape",result:"effect2_innerShadow_1756_12150"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"-0.5",dy:"1.8"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.97725 0 0 0 0 0.8375 0 0 0 0 1 0 0 0 1 0"}),(0,n.jsx)("feBlend",{in2:"effect2_innerShadow_1756_12150",result:"effect3_innerShadow_1756_12150"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"0.8",dy:"-0.554"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"0.5"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.15721 0 0 0 0 0.443759 0 0 0 0 1 0 0 0 0.66 0"}),(0,n.jsx)("feBlend",{in2:"effect3_innerShadow_1756_12150",result:"effect4_innerShadow_1756_12150"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dy:"0.5"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"0.2"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"}),(0,n.jsx)("feBlend",{in2:"effect4_innerShadow_1756_12150",result:"effect5_innerShadow_1756_12150"})]}),(0,n.jsxs)("linearGradient",{id:"paint0_linear_1756_12150",x1:"14",x2:"14",y1:"0",y2:"28",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#5E5BD7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#35312D"})]}),(0,n.jsxs)("linearGradient",{id:"paint1_linear_1756_12150",x1:"11.525",x2:"21.46",y1:"4.499",y2:"21.195",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#FD91FF",stopOpacity:"0.7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#D7CDB1",stopOpacity:"0.8"})]}),(0,n.jsx)("clipPath",{id:"clip0_1756_12150",children:(0,n.jsx)("rect",{width:"28",height:"28",fill:"#fff",rx:"14"})})]})]})},ez=function(){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none",viewBox:"0 0 30 30",children:[(0,n.jsx)("rect",{width:"30",height:"30",fill:"url(#paint0_linear_929_2888)",rx:"15"}),(0,n.jsx)("rect",{width:"30",height:"30",fill:"#E8AC38",fillOpacity:"0.25",rx:"15"}),(0,n.jsxs)("g",{filter:"url(#filter0_diiii_929_2888)",children:[(0,n.jsx)("path",{fill:"#fff",d:"M15 9.917c0 1.61-1.254 2.916-2.8 2.916-1.546 0-2.8-1.306-2.8-2.916C9.4 8.306 10.654 7 12.2 7 13.746 7 15 8.306 15 9.917z"}),(0,n.jsx)("path",{fill:"url(#paint1_linear_929_2888)",fillOpacity:"0.25",d:"M15 9.917c0 1.61-1.254 2.916-2.8 2.916-1.546 0-2.8-1.306-2.8-2.916C9.4 8.306 10.654 7 12.2 7 13.746 7 15 8.306 15 9.917z"}),(0,n.jsx)("path",{fill:"#fff",d:"M17.056 13.667l-2.234 3.364-2.222-2.114a1.562 1.562 0 00-2.56 0S7 18.119 7 19.5C7 20.88 8.075 22 9.4 22h11.2c1.325 0 2.4-1.12 2.4-2.5s-3.2-5.833-3.2-5.833a1.568 1.568 0 00-2.744 0z"}),(0,n.jsx)("path",{fill:"url(#paint2_linear_929_2888)",fillOpacity:"0.25",d:"M17.056 13.667l-2.234 3.364-2.222-2.114a1.562 1.562 0 00-2.56 0S7 18.119 7 19.5C7 20.88 8.075 22 9.4 22h11.2c1.325 0 2.4-1.12 2.4-2.5s-3.2-5.833-3.2-5.833a1.568 1.568 0 00-2.744 0z"})]}),(0,n.jsxs)("defs",{children:[(0,n.jsxs)("filter",{id:"filter0_diiii_929_2888",width:"24",height:"23",x:"3",y:"4",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[(0,n.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dy:"1"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.13743 0 0 0 0 0.107034 0 0 0 0 0.486979 0 0 0 0.75 0"}),(0,n.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_929_2888"}),(0,n.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_929_2888",result:"shape"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"-0.6",dy:"-0.45"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.876807 0 0 0 0 0.654693 0 0 0 0 0.0835421 0 0 0 0.7 0"}),(0,n.jsx)("feBlend",{in2:"shape",result:"effect2_innerShadow_929_2888"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"-0.5",dy:"1.8"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.97725 0 0 0 0 0.8375 0 0 0 0 1 0 0 0 1 0"}),(0,n.jsx)("feBlend",{in2:"effect2_innerShadow_929_2888",result:"effect3_innerShadow_929_2888"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dx:"0.8",dy:"-0.554"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"0.5"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 0.15721 0 0 0 0 0.443759 0 0 0 0 1 0 0 0 0.66 0"}),(0,n.jsx)("feBlend",{in2:"effect3_innerShadow_929_2888",result:"effect4_innerShadow_929_2888"}),(0,n.jsx)("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,n.jsx)("feOffset",{dy:"0.5"}),(0,n.jsx)("feGaussianBlur",{stdDeviation:"0.2"}),(0,n.jsx)("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),(0,n.jsx)("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"}),(0,n.jsx)("feBlend",{in2:"effect4_innerShadow_929_2888",result:"effect5_innerShadow_929_2888"})]}),(0,n.jsxs)("linearGradient",{id:"paint0_linear_929_2888",x1:"15",x2:"15",y1:"0",y2:"30",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#5E5BD7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#35312D"})]}),(0,n.jsxs)("linearGradient",{id:"paint1_linear_929_2888",x1:"10.333",x2:"15.966",y1:"5.594",y2:"24.847",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#FD91FF",stopOpacity:"0.7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#D7CDB1",stopOpacity:"0.8"})]}),(0,n.jsxs)("linearGradient",{id:"paint2_linear_929_2888",x1:"10.333",x2:"15.966",y1:"5.594",y2:"24.847",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#FD91FF",stopOpacity:"0.7"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#D7CDB1",stopOpacity:"0.8"})]})]})]})},eB=r(51879);let eU=e=>{let{Icon:t,title:r,description:i}=e;return(0,n.jsxs)("div",{className:"flex gap-2 md:gap-3 items-start",children:[(0,n.jsx)("div",{className:"shrink-0",children:(0,n.jsx)(t,{})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("h3",{className:"font-semibold text-base md:text-lg text-fg-primary leading-[26px]",children:r}),(0,n.jsx)("p",{className:"text-sm md:text-base text-fg-secondary",children:i})]})]})},eV=e=>{let{selectedTerm:t}=e,r=eR.Q5?.numDesignImagesPer3HoursLimit??eB.Sq.PRO_DESIGN.numDesignImagesPer3HoursLimit,i="annual"===t?r:eB.Sq.PRO_DESIGN.numDesignImagesPer3HoursLimit;return(0,n.jsxs)("div",{className:"flex flex-col gap-4 px-0 py-4 md:p-4",children:[(0,n.jsx)(eU,{Icon:eM,title:"Up to 6x more, faster images",description:`Generate up to ${i} images every 3 hours`}),(0,n.jsx)(eU,{Icon:eD,title:"Unlimited access to premium designs",description:"Access to the full library of high quality templates"}),(0,n.jsx)(eU,{Icon:ez,title:"Enhanced image editing",description:"Upscale image and remove backgrounds with ease"}),(0,n.jsx)(eU,{Icon:eF,title:"Use images commercially",description:"A world-wide, royalty free license"})]})};var e$=r(86010);function eH(e){return e.checked?(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",fill:"none",viewBox:"0 0 25 24",...e,children:[(0,n.jsx)("rect",{width:"17",height:"17",x:"4",y:"3.5",stroke:"#1C1B1A",strokeWidth:"3",rx:"8.5"}),(0,n.jsx)("circle",{cx:"12.5",cy:"12",r:"4.5",fill:"#1C1B1A"})]}):(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:(0,n.jsx)("rect",{width:"17",height:"17",x:"3.5",y:"3.5",stroke:"#CCC5BD",strokeWidth:"3",rx:"8.5",style:{mixBlendMode:"luminosity"}})})}function eZ(e){let{plan:t,price:r,subtext:i,discount:o,isSelected:a,onSelect:s}=e;return(0,n.jsxs)("label",{onClick:s,className:(0,e$.Z)("cursor-pointer flex flex-col items-start px-4 py-2 sm:py-3 rounded-design-md border-[3px] bg-bg-primary text-fg-primary w-full",a?"border-black shadow-lg":"border-transparent","transition duration-200 ease-in-out"),children:[(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2 mb-1",children:[(0,n.jsxs)("div",{className:"flex flex-row items-center gap-[6px]",children:[(0,n.jsx)("div",{className:"font-semibold text-sm sm:text-design-base",children:t}),o&&(0,n.jsx)("div",{className:"text-xs md:text-design-sm font-bold text-fg-inverse-primary px-[4px] py-[2px] bg-action-primary rounded-design-xs",children:o})]}),(0,n.jsx)("div",{className:"flex-grow"}),(0,n.jsx)(eH,{checked:a,onClick:s}),(0,n.jsx)("input",{type:"radio",name:"pricing",checked:a,onChange:s,className:"hidden"})]}),(0,n.jsx)("div",{className:"text-sm sm:text-design-base font-medium",children:r}),i&&(0,n.jsx)("div",{className:"text-sm sm:text-design-base font-medium text-fg-secondary",children:i})]})}function eW(e){let{term:t,setTerm:r}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-4 z-20 w-full",children:[(0,n.jsxs)("div",{className:"flex flex-row gap-2 md:gap-4",children:[(0,n.jsx)(eZ,{plan:"Annual",price:"$144 / year",subtext:"$12 / month",discount:"-20%",isSelected:"annual"===t,onSelect:()=>r("annual")}),(0,n.jsx)(eZ,{plan:"Monthly",price:"$15 / month",isSelected:"monthly"===t,onSelect:()=>r("monthly")})]}),(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(eZ,{plan:"Day Pass",price:"$8 one-time purchase",isSelected:"daypass"===t,onSelect:()=>r("daypass")})})]})}function eq(e,t){if("daypass"===e)return"Upgrade for 24 hours";switch(t){case"remove-background":return"Upgrade to remove background";case"upscale":return"Upgrade to upscale";case"template":case"explore-template":return"Upgrade to use premium template";case"edits":return"Upgrade to make more edits";case"create-your-own":return"Upgrade to create your own";case"make-a-copy":return"Upgrade to make a copy";case"custom-color-palette":return"Upgrade to use custom color palette";case"download":return"Upgrade to download";default:return"Upgrade to Pro"}}function eG(){let{upgradeDialogMeta:e,setUpgradeDialogMeta:t,setLoginDialogMeta:r}=(0,S.mr)(),o=e.url||"/images/sign_in_grid_new_1x.png",[a,s]=(0,i.useState)("annual"),{redirectToCheckout:l,loading:u}=(0,eO.z)(),c=(0,ef.rP)(),d=(0,j.useRouter)(),f=!!(0,A.Z)(),p={daypass:eR.QI.PRO_DESIGN.prices.find(e=>"daypass"===e.term)?.priceId,annual:eR.QI.PRO_DESIGN.prices.find(e=>"annual"===e.term)?.priceId,monthly:eR.QI.PRO_DESIGN.prices.find(e=>"monthly"===e.term)?.priceId};return((0,i.useEffect)(()=>{e.open&&et().track("View Design Subscription Modal",{cta:eq(a,e.context),source:function(e){switch(e){case"remove-background":case"upscale":return"Export Actions";case"template":case"explore-template":return"Premium Template Blocker";case"edits":return"Rate Limited on Edit View";case"create-your-own":return"Rate Limited on Create Your Own";case"make-a-copy":return"Rate Limited on Make a Copy";case"custom-color-palette":return"Custom Color Palette";case"download":return"Download Design";default:return}}(e.context),url:e.url,context:e.context})},[e]),p.annual&&p.monthly)?c?null:(0,n.jsx)(eL.Vq,{open:e.open,onOpenChange:e=>{e||t({open:!1})},children:(0,n.jsxs)(eL.cZ,{hideCloseButton:!0,className:"bg-bg-primary p-0 rounded-none w-full h-full max-w-full bg-blend-luminosity overflow-y-auto",children:[(0,n.jsxs)(y.z,{onClick:()=>{t({open:!1})},className:(0,b.cn)("flex absolute left-4 top-4 rounded-full h-10 w-10 items-center justify-center focus:outline-none focus:ring-none focus:ring-offset-2 disabled:pointer-events-none","p-0 bg-bg-inverse-primary/70 ring-offset-background hover:opacity-100 hover:bg-bg-inverse-primary"),children:[(0,n.jsx)(Y.Pxu,{className:"h-5 w-5 text-white"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]}),(0,n.jsx)("div",{className:"absolute top-0 left-0 w-full h-full blur-3xl bg-cover bg-no-repeat bg-center z-0 pointer-events-none duration-1000 ease-linear transition-[background-image]",style:{backgroundImage:`url(${o})`,opacity:.3}}),(0,n.jsxs)("div",{className:(0,b.cn)("flex flex-col items-center justify-center gap-8","p-4 sm:p-6 md:p-12 pt-12","flex flex-col justify-center gap-2 sm:gap-4 md:gap-8 h-full"),children:[(0,n.jsx)("div",{className:"text-center max-w-sm md:max-w-4xl",children:(0,n.jsxs)("h2",{className:"font-bold text-design-2xl",children:["Unlock Your Creative Potential ",(0,n.jsx)("span",{className:eI().gradient,children:"with Pro"}),(0,n.jsx)("span",{className:"inline-flex items-center ml-2",children:(0,n.jsx)(eT.I,{})})]})}),(0,n.jsxs)("div",{className:"w-full max-w-sm md:max-w-4xl flex flex-col sm:flex-row gap-8",children:[(0,n.jsx)("div",{className:"flex-1 hidden md:flex flex-col gap-8",children:(0,n.jsx)("div",{className:"rounded-design-xl overflow-hidden max-w-full max-h-[50vh]",children:(0,n.jsx)("img",{src:o,alt:"Upgrade to Playground Pro to use this premium template",className:(0,e$.Z)("relative w-auto h-auto z-20 max-w-full max-h-full object-contain top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",e.url&&"rounded-design-xl")})})}),(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(eV,{selectedTerm:a}),(0,n.jsxs)("div",{className:"flex flex-col gap-8 w-full max-w-md mx-auto",children:[(0,n.jsx)(eW,{term:a,setTerm:s}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)(y.z,{variant:"action-secondary",className:"z-20 w-full text-base md:text-md",disabled:u,size:"lg",onClick:()=>{if(!f){t({open:!1}),r({open:!0});return}let e=new URLSearchParams(window.location.search);return e.append("source_survey","1"),l({priceId:p[a],successUrl:window.location.pathname+`?${e.toString()}`,cancelUrl:d.asPath})},children:u?(0,n.jsx)($.s8,{}):eq(a,e.context)}),(0,n.jsx)(eY,{})]})]})]})]})]})]})}):(console.error("Could not find priceId for annual or monthly plans"),null)}let eY=()=>(0,n.jsxs)("span",{className:"text-[10px] sm:text-design-xs text-center",children:["By purchasing, you agree to our"," ",(0,n.jsx)(a(),{href:"/terms",className:"hover:underline",target:"_blank",children:"Terms & Conditions"})," ","and"," ",(0,n.jsx)(a(),{href:"/privacy",className:"hover:underline",target:"_blank",children:"Privacy Policy"}),"."]});var eK=r(23078),eX=()=>{let{loginDialogMeta:e,setLoginDialogMeta:t}=(0,S.mr)(),{open:r,redirectUrl:i}=e;return(0,n.jsx)(eK.default,{open:r,redirectUrl:i,onOpenChange:e=>{e||t({open:!1})}})},eJ=r(97233),eQ=r(30013),e0=r(13346),e1=r(21506),e2=r(85686),e5=r(32478);function e4(){let e=function(){let e=(0,A.Z)(),{data:t,error:r}=(0,B.ZP)(e?"/api/announcements":null,(0,F.W)(V.z.object({title:V.z.string()}).or(V.z.null())));return t}(),[t,r]=(0,i.useState)(!0);return e?(0,n.jsx)("div",{className:"fixed top-0 left-0 right-0 bg-white",children:(0,n.jsxs)(e1.q,{variant:"error",className:(0,b.cn)("w-full flex justify-center !rounded-none max-lg:pr-8 items-center !bg-red-500/20 text-red-500 gap-3 text-sm py-3 lg:py-2 transition-transform z-30 min-h-[41px]",t?"translate-y-0 relative":"absolute -translate-y-full"),children:[(0,n.jsxs)("p",{className:"font-pg-medium inline-flex gap-1",children:[(0,n.jsx)(e2.Z,{}),e?.title||(0,n.jsxs)(n.Fragment,{children:["Playground is having site reliability issues.",(0,n.jsx)("span",{className:"max-xl:hidden",children:" Our team is aware and working to resolve it."})]})]}),(0,n.jsx)(e0.z,{type:"button",size:"iconSm",onClick:()=>{r(!1)},className:"absolute right-2 p-0.5 shrink-0 text-black bg-transparent hover:bg-transparent shadow-none",children:(0,n.jsx)(e5.Z,{height:16,width:16})})]})}):null}function e3(e){let{children:t}=e;return(0,A.Z)()?(0,n.jsx)(n.Fragment,{children:t}):null}var e6=r(45697),e8=r.n(e6);function e7(){return(e7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var e9=(0,i.forwardRef)(function(e,t){var r=e.color,n=e.size,o=void 0===n?24:n,a=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["color","size"]);return i.createElement("svg",e7({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:void 0===r?"currentColor":r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),i.createElement("path",{d:"M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),i.createElement("circle",{cx:"8.5",cy:"7",r:"4"}),i.createElement("line",{x1:"20",y1:"8",x2:"20",y2:"14"}),i.createElement("line",{x1:"23",y1:"11",x2:"17",y2:"11"}))});e9.propTypes={color:e8().string,size:e8().oneOfType([e8().string,e8().number])},e9.displayName="UserPlus";let te="Which account? (optional)",tt=[["Google Search"],["Instagram or Facebook",te],["TikTok",te],["YouTube",te],["From a friend"],["Other","Please share more detail"]];function tr(e){let{onAnswer:t,open:r,setIsOpen:o}=e,[a,s]=(0,i.useState)(!1),[l,u]=(0,i.useState)(null),[c,d]=(0,i.useState)(""),f=(0,i.useMemo)(()=>tt.find(e=>e[0]===l)?.[1],[l]);return(0,n.jsx)(eL.Vq,{open:r,onOpenChange:o,children:(0,n.jsxs)(eL.cZ,{className:"w-[min(450px,99vw)] bg-white",children:[(0,n.jsx)("header",{children:(0,n.jsx)("h1",{className:"text-fg-primary text-lg text-center font-semibold mb-2 max-md:mt-10",children:"How did you hear about Playground?"})}),(0,n.jsxs)("form",{className:"reasons",onSubmit:async e=>{e.preventDefault(),s(!0),(0,q.assert)(l,"reason is required"),await t({additionalInformation:c,source:l}),s(!1),o(!1)},children:[(0,n.jsx)("ul",{className:"grid md:grid-cols-2 gap-2 gap-y-4 text-gray-500",children:tt.map(e=>{let[t]=e;return(0,n.jsxs)("label",{className:"gap-2 flex",children:[(0,n.jsx)("input",{type:"radio",name:"reason",value:t,className:"form-radio text-fg-tertiary",style:{accentColor:"black",mixBlendMode:"multiply"},onChange:e=>u(e.target.value),checked:t===l}),t]},t)})}),f&&(0,n.jsx)("textarea",{value:c,onChange:e=>{d(e.target.value)},autoFocus:!0,placeholder:f,className:"w-full bg-bg-primary rounded-design-base text-fg-secondary outline-none p-2 mt-3 px-2"}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsxs)(y.z,{disabled:!l||a,variant:"action-primary",size:"lg",className:"mt-4 gap-1",type:"submit",children:[a&&(0,n.jsx)($.s8,{}),"Submit"]})})]})]})})}function tn(){let e=(0,j.useRouter)(),t=void 0!==e.query.source_survey;return(0,n.jsx)(tr,{open:t,setIsOpen:t=>{let r={...e.query};t?r.source_survey="":delete r.source_survey,e.push({query:r},void 0,{shallow:!0})},onAnswer:async e=>{et().track("How did you hear about us answered",{...e}),et().people.set({heard_about_playground_from:e})}})}function ti(e){let{onMenuClick:t}=e,{pathname:r}=(0,j.useRouter)(),i=(0,Z.LL)(),o=!!t;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e4,{}),(0,n.jsxs)("div",{className:"py-3 px-2 flex flex-col justify-between h-full",children:[(0,n.jsxs)("div",{className:"gap-3 flex flex-col",children:[(0,n.jsxs)("header",{className:"flex justify-between items-center pr-4",children:[(0,n.jsx)(a(),{href:"/design",children:o?(0,n.jsx)(y.z,{variant:"ghost",className:"flex items-center gap-2 h-12 py-2 px-4",children:(0,n.jsx)(x.Yz,{className:"mt-1"})}):(0,n.jsx)(x.ds,{})}),o&&(0,n.jsx)(y.z,{type:"button",onClick:t,variant:"ghost",size:"icon",children:(0,n.jsx)(ed,{reverse:!0})})]}),(0,n.jsxs)("ul",{className:"flex flex-col gap-1",children:[(0,n.jsx)("li",{children:(0,n.jsx)(y.z,{asChild:!0,variant:["/design","/design/c/[parentId]","/design/c/[parentId]/[tagId]"].includes(r)?"secondary":"ghost",className:"w-full text-left gap-2 justify-start",size:"lg",children:(0,n.jsxs)(a(),{href:"/design",children:[(0,n.jsx)(E,{}),"Create"]})})}),(0,n.jsxs)(e3,{children:[(0,n.jsx)("li",{children:(0,n.jsx)(y.z,{asChild:!0,variant:"/design/my-designs"===r?"secondary":"ghost",className:(0,b.cn)("w-full text-left gap-2 justify-start"),size:"lg",children:(0,n.jsxs)(a(),{href:"/design/my-designs",children:[(0,n.jsx)(k.P,{}),"My Designs"]})})}),i&&(0,n.jsx)("li",{children:(0,n.jsx)(y.z,{asChild:!0,variant:"/design/shared"===r?"secondary":"ghost",className:(0,b.cn)("w-full text-left gap-2 justify-start"),size:"lg",children:(0,n.jsxs)(a(),{href:"/design/shared",children:[(0,n.jsx)(e9,{className:"translate-x-0.5 p-0.5",size:24}),"Shared With Me"]})})})]})]})]}),(0,n.jsx)("div",{className:"gap-3 flex flex-col",children:(0,n.jsx)(eC.K,{})})]})]})}function to(e){let{children:t,hideSidebar:r,...i}=e,o=function(e){let{pathname:t}=(0,j.useRouter)();return!e&&eP.includes(t)}(r),a=function(){let{pathname:e}=(0,j.useRouter)(),t=(0,Z.SC)(),r=(0,eE.useSession)();return eS.includes(e)||t&&r?.data?.user&&eN.includes(e)}(),s=function(){let{pathname:e}=(0,j.useRouter)();return"/design/new"===e}(),l=(0,ek.iP)();return(0,n.jsx)(ts,{children:(0,n.jsx)(tl,{event:"Design Client Error Boundary",fallback:(0,n.jsx)(eQ.Z,{error:500}),children:a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ta,{mountValue:"none",unmountValue:"auto"}),(0,n.jsx)(eG,{}),(0,n.jsx)(eX,{}),(0,n.jsx)(tn,{}),(0,n.jsxs)("div",{className:"h-screen w-screen",style:{height:l.height},children:[(0,n.jsx)(ej,{back:!0,export:!s,history:!s}),(0,n.jsx)(ev.Cb,{}),t]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ta,{mountValue:"auto",unmountValue:"none"}),(0,n.jsx)(eG,{}),(0,n.jsx)(eX,{}),(0,n.jsx)(eJ.L,{}),(0,n.jsx)(tn,{}),(0,n.jsx)("div",{className:"flex md:hidden",children:t}),(0,n.jsxs)("div",{className:(0,b.cn)("hidden md:flex",_().className),children:[o&&(0,n.jsx)("div",{className:"h-screen sticky top-0 shrink-0 w-design-sidebar",children:(0,n.jsx)(ti,{})}),(0,n.jsx)("div",{className:(0,b.cn)("w-full",o&&"max-w-[calc(100vw_-_var(--design-sidebar-width))]"),children:t})]}),(0,n.jsx)(ev.Cb,{})]})})})}function ta(e){return(0,i.useEffect)(()=>(document.documentElement.style.overscrollBehavior=e.mountValue,()=>{document.documentElement.style.overscrollBehavior=e.unmountValue}),[e]),null}function ts(e){return(0,i.useEffect)(()=>()=>{document.documentElement.removeAttribute("data-pg-theme")},[]),(0,n.jsx)(d,{forcedTheme:"design",defaultTheme:"design",enableSystem:!1,attribute:"data-pg-theme",children:e.children})}class tl extends i.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){et().track(this.props.event,{error:e.message,stack:t.componentStack})}render(){return this.state.hasError?this.props.fallback:this.props.children}}},49405:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(85893),i=r(94670);function o(e){let{large:t}=e;return(0,n.jsx)(i.u,{label:"Only visible to admins",color:"white",placement:"top",children:(0,n.jsx)("div",{className:`${t?"w-2 h-2":"w-1 h-1"} rounded-full bg-orange-500`})})}},98942:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(85893),i=r(62469),o=r(48105),a=r(67294);function s(e){let{fetchContent:t,children:r,render:s,...l}=e,[u,c]=(0,a.useState)(!1),d=async()=>{let e=await t();e&&setTimeout(()=>{navigator.clipboard.writeText(e).then(()=>{c(!0),setTimeout(()=>{c(!1)},1e3)})},0)};return(0,n.jsxs)(o.z,{className:"text-xs underline hover:bg-transparent",onClick:d,...l,children:[s?s(u):r??(0,n.jsx)(n.Fragment,{children:"Copy to clipboard"}),(0,n.jsx)("span",{className:`${u?"opacity-100":"opacity-0"} transition-opacity`,children:(0,n.jsx)(i.nQG,{})})]})}},10397:function(e,t,r){"use strict";r.d(t,{D:function(){return u}});var n=r(85893),i=r(48105),o=r(11163),a=r(67294),s=r(21498),l=r(71864);function u(e){let{designVersion:t,designFile:r}=(0,l.mr)(),u=(0,o.useRouter)(),c=(0,a.useCallback)(()=>{let n=r?.id,i=t?.content?.background?.url;if(window.history?.length&&window.history.length>2){let t=document.referrer,r=window.location.hostname;t&&new URL(t).hostname===r?u.back():u.push(e.href||"/design")}else u.push(e.href||"/design");try{let e=sessionStorage.getItem("designMadeChanges");n&&e&&setTimeout(()=>{(0,s._A)(n,i)},1e3)}catch(e){}},[u,e.href,r,t]);return(0,n.jsx)(i.z,{onClick:c,...e,children:e.children??"Back"})}},2220:function(e,t,r){"use strict";r.d(t,{pd:function(){return ei},_C:function(){return eu}});var n=r(85893),i=r(67294),o=r(20835),a=r(48105),s=r(11163),l=r(76607),u=r(3567),c=r(44871),d=r(75362),f=r(1233),p=r(41664),h=r.n(p),m=r(65481),g=r(72197),v=r(8891),y=r.n(v),x=r(38858),b=r.n(x),w=r(22227),_=r(44746),j=r(12993),C=r(24581);let k=j.zt,E=j.fC,S=j.xz,N=i.forwardRef((e,t)=>{let{className:r,sideOffset:i=4,...o}=e;return(0,C.s)()?null:(0,n.jsx)(j.h_,{children:(0,n.jsx)(j.VY,{ref:t,sideOffset:i,className:(0,f.cn)("z-50 overflow-hidden bg-bg-inverse-secondary px-3 py-1.5 rounded-design-base text-design-sm font-pg-medium text-fg-inverse-primary text-center","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",r),...o})})});function P(e){let{children:t,sideOffset:r=5,alignOffset:i=0,delayDuration:o=50,open:a,side:s="left",arrow:l=!0,maxWidth:u=180}=e;return(0,n.jsx)(k,{delayDuration:o,children:(0,n.jsxs)(E,{open:a,children:[(0,n.jsx)(S,{asChild:!0,children:t}),(0,n.jsxs)(N,{side:s,align:"center",sideOffset:r,alignOffset:i,children:[(0,n.jsx)("div",{className:"flex flex-col",style:{maxWidth:u},children:"Upgrade to Pro to use this premium template"}),l&&(0,n.jsx)("span",{className:"text-bg-inverse-secondary",style:{position:"absolute",transformOrigin:"100% 0px",...{left:{right:"0px",top:"calc(50% - 6px)",transform:"translateY(50%) rotate(-90deg) translateX(50%)"},right:{left:"0px",top:"calc(50% - 6px)",transform:"translateY(50%) rotate(90deg) translateX(-50%)"},top:{bottom:"-3px",left:"calc(50% - 6px)",transform:"translateX(-50%) translateY(50%)"},bottom:{top:"0px",left:"calc(50% - 6px)",transform:"translateX(-50%) translateY(-50%)"}}[s]},children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"7",fill:"none",viewBox:"0 0 10 7",children:(0,n.jsx)("path",{fill:"currentColor",d:"M1.853 3.335L0 0h10L8.147 3.335c-1.226 2.207-1.839 3.31-2.725 3.502a2 2 0 01-.844 0c-.886-.192-1.5-1.295-2.725-3.502z"})})})]})]})})}N.displayName=j.VY.displayName;var L=r(69198),T=r(60505),O=r(38372),R=r(57755),A=r(627),I=r(71864),M=r(21426),D=r(14126),F=r(31630),z=r(51879),B=r(5266),U=r(43222),V=r(72223),$=r(59820),H=r(11320),Z=r(96269),W=r.n(Z),q=r(28447);let G="I’m having trouble finding what I want.";function Y(){let[e,t]=(0,i.useState)("idle"),[r,o]=(0,i.useState)(""),s=(0,i.useRef)(null),l=(0,H.Z)(s,{threshold:1}),u=l?.isIntersecting||(l?.boundingClientRect.top??0)<0;return(0,n.jsxs)("div",{ref:s,style:{backgroundImage:"complete"===e?void 0:'url("https://cdn.playground.com/cms-media/megaphone.png")'},className:`aspect-[1/1.5] bg-cover bg-no-repeat rounded-design-base bg-top flex flex-col items-center pt-6
        ${"complete"===e?"justify-center bg-[#62D1B7]":"justify-between"}
        ${"tell-us-more"===e?"":"px-3 pb-3"}
        `,children:[["idle","tell-us-more"].includes(e)&&(0,n.jsxs)("p",{className:"text-[16px] text-fg-primary font-semibold text-center",children:[(0,n.jsx)(q.K7,{className:"inline-block mr-2 -translate-y-0.5"}),"Give us feedback"]}),"idle"===e&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("ul",{className:"space-y-2",children:[["\uD83D\uDE23",G],["\uD83D\uDD0E","I’m still exploring what’s available."]].map((e,r)=>{let[i,o]=e;return(0,n.jsxs)("button",{type:"button",onClick:()=>{if(y().track("Content feedback submitted",{choice:o}),o===G)return t("tell-us-more");t("complete")},className:`flex justify-around gap-2 items-center text-fg-primary bg-[#ADEBDA] transition-[opacity,transform] hover:bg-bg-primary w-full md:py-4 py-2 px-2 md:px-4 lg:px-8 text-base rounded-design-md font-semibold
                ${W().DesignGridSurveyItem} ${u?W().isIntersecting:""}
                `,style:{textWrap:"balance",transitionDelay:`${.1*r}s`},children:[(0,n.jsx)("span",{className:"self-start justify-self-start pt-1.5 items-center h-full text-xl justify-center",children:i}),o]},o)})})}),"complete"===e&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"text-fg-primary font-semibold text-center mb-2 text-[16px]",children:"❤️ Thank you"}),(0,n.jsxs)("p",{className:"text-center text-base text-fg-secondary",children:[" ","Your feedback helps us make Playground better."]})]}),"tell-us-more"===e&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"bg-bg-primary/80 backdrop-blur-md w-full p-3 rounded-t-design-md shadow-design-md rounded-b-design-base",children:[(0,n.jsx)("textarea",{className:"w-full h-24 p-3 mb-2 rounded-design-base outline-none",placeholder:"What templates are you looking for?",autoFocus:!0,value:r,onChange:e=>o(e.target.value)}),(0,n.jsx)(a.z,{type:"button",onClick:()=>{y().track("Content request submitted",{additionalFeedback:r}),t("complete"),fetch("/api/feedback",{method:"POST",body:JSON.stringify({feedback:`${G} — ${r}`,source:"design category page"})})},variant:"action-secondary",size:"lg",className:"rounded-full w-full",children:"Submit"})]})})]})}var K=r(77922),X=r(69306),J=r(11007),Q=r(49296);let ee="trending",et=i.createContext(null);function er(e){let t=function(e){let{query:t}=(0,s.useRouter)(),r=[{id:"trending",name:"Trending",slug:"trending"},{id:"new",name:"New",slug:"new"},...e?.tags?.map(e=>({id:e.id,name:e.name,slug:T.bS(e)}))].filter(Boolean),n=r.find(e=>e.slug===t?.tagId),o=i.useMemo(()=>{let t=e.tag;return[t?.id??"",n?.id??""].filter(Boolean)},[n?.id,e.tag]),a=function(e){let t=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return void 0!==t})),r=new URLSearchParams;return Object.entries(t).forEach(e=>{let[t,n]=e;Array.isArray(n)?n.forEach(e=>r.append(t,e)):"string"==typeof n||"number"==typeof n?r.append(t,n.toString()):"boolean"==typeof n&&r.append(t,n?"true":"false"),(!n&&"boolean"!=typeof n||Array.isArray(n)&&0===n.filter(Boolean).length)&&r.delete(t)}),r.toString()}({take:t.take?parseInt(t.take):void 0,visibility:"ga",orderBy:"new"===t.tagId?"createdAt:desc":(t.tagId,"trending:weekly"),tags:Array.isArray(o)?o:"string"==typeof o?[o]:[],includeAllPresets:!1,take:40}),u=(0,i.useCallback)((e,t)=>t&&!t.length?null:0===e?`/api/templates?${a}`:`/api/templates?${a}&cursor=${t[t.length-1].id}`,[a]),{data:c,error:d,size:f,setSize:p,isValidating:h,isLoading:m}=(0,l.ZP)(u,async e=>{let t=await fetch(e);if(!t.ok)throw Error("Failed to fetch");return t.json()},{revalidateOnFocus:!1,revalidateFirstPage:!1}),g=i.useMemo(()=>(c?c.flat():[])?.filter((e,t,r)=>r?.findIndex(t=>t?.id===e?.id)===t),[c]),v=c&&c[c.length-1]?.length<40,y=i.useCallback(()=>{v||m||p(f+1)},[v,m,p,f]);return{...e,childTag:n,childId:t.tagId,templates:g,getNextBatch:y,isLoading:m,isValidating:h,isReachingEnd:v,error:d,allTags:r}}(e);return(0,n.jsx)(et.Provider,{value:t,children:e.children})}function en(){let e=i.useContext(et);if(!e)throw Error("useCategory must be used within a CategoryProvider");return e}function ei(e){return(0,n.jsxs)(er,{...e,children:[(0,n.jsx)(M.k,{}),(0,n.jsxs)("main",{className:"flex flex-col gap-3 w-full",children:[(0,n.jsx)(eo,{}),(0,n.jsx)(es,{}),(0,n.jsx)(el,{})]})]})}function eo(){let{tag:e,childTag:t}=en(),r=`${t?t?.name+" ":""}${e.name}`,[o,l]=(0,i.useState)(""),u=(0,s.useRouter)(),c=(0,X.OV)("sm"),d=(0,n.jsx)(K.Z,{variant:"small",autoFocus:c,value:o,onChange:e=>l(e.target.value),onSubmit:e=>{let t=new URLSearchParams,r=e??o;t.set("q",r),t.set("f","category"),u.push(`/design?${t.toString()}`)}});return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(m.R,{children:[(0,n.jsx)(D.Z,{imageUrl:`${z._n}/api/og/design/c/${(0,T.bS)(e)}/opengraph-image`,title:`${r} Templates - Playground`,description:`Discover thousands of customizable ${r} templates. Perfect for creating unique logos, t-shirts, posters, and more for Etsy, Printify, Stickermule, and beyond!`}),(0,n.jsx)(a.z,{asChild:!0,variant:"ghost",size:"icon",children:(0,n.jsx)(h(),{href:"/design",children:(0,n.jsx)(g.Y,{className:"h-8 w-8 text-fg-primary"})})}),(0,n.jsxs)(m.K,{className:"md:mr-auto lg:text-center max-sm:flex max-sm:gap-2 items-center",children:[(0,n.jsx)(ea,{children:d}),r," Templates"]}),!c&&(0,n.jsx)("div",{className:"flex max-w-[350px] flex-grow",children:d})]})})}function ea(e){let{children:t}=e,[r,o]=(0,i.useState)(!1),s=(0,i.useRef)(null);return(0,Q.p)(s,()=>o(!1)),(0,n.jsxs)("div",{className:"sm:hidden",children:[(0,n.jsx)(a.z,{onClick:()=>o(!0),variant:"ghost",className:"p-0",children:(0,n.jsx)(J.W,{className:(0,f.cn)("text-design-md mx-1","text-fg-secondary","w-8 h-8 min-w-[2rem] min-h-[2rem] p-1")})}),r&&(0,n.jsx)("div",{ref:s,className:"fixed top-0 left-0 right-0 p-3 bg-white z-50 rounded-b-[12px]",style:{boxShadow:"0px 2px 12px 0px rgba(0, 0, 0, 0.08)"},children:(0,n.jsx)("div",{className:"flex gap-2 justify-between items-center",children:t})})]})}function es(){let{query:e}=(0,s.useRouter)(),{allTags:t,tag:r}=en();return(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)("ul",{className:"flex gap-1.5 px-3 overflow-x-auto no-scrollbar whitespace-nowrap",children:t.map(t=>{let i=e.tagId===t.slug||t.slug===ee&&!e.tagId,o=t.id===ee?`/design/c/${e?.parentId}`:`/design/c/${e?.parentId}/${t.slug}`;return(0,n.jsx)("li",{children:(0,n.jsx)(a.z,{asChild:!0,variant:"ghost",className:(0,f.cn)("h-10 px-4 py-2 flex items-center gap-2 rounded-design-xl font-[500] shrink-0",i?"bg-bg-inverse-secondary text-fg-inverse-primary hover:bg-bg-inverse-secondary hover:text-fg-inverse-primary":"bg-bg-secondary text-fg-secondary hover:bg-bg-secondary hover:text-fg-secondary"),onClick:()=>{y().track("Tag selected",{id:t.id,name:t.name,category:r.name,categoryId:r.id})},children:(0,n.jsx)(h(),{replace:!0,href:o,type:"button",children:t.name})})},t.id)})})})}function el(){let{templates:e,getNextBatch:t,isLoading:r,isValidating:s,parentId:l,isReachingEnd:d}=en(),f=(0,i.useRef)(null),p=(0,c.Y)(f,{rootMargin:"0px 0px 800px 0px"});(0,i.useEffect)(()=>{!p||d||r||s||t()},[p,d,r,s,t]);let h=(0,i.useMemo)(()=>{if(!e)return[];let t=[...e];return t.length>100&&t.splice(100,0,{grid_type:"promotional-unit",id:1}),t},[e]);return(0,n.jsx)("div",{className:"min-h-[80vh]",children:(0,n.jsxs)(o.I,{fallback:(0,n.jsx)(L.T,{}),children:[r?(0,n.jsx)(L.T,{}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"px-4 pt-8 min-h-[80vh]",children:(0,n.jsx)(B.ZP,{columnsCountBreakPoints:u.F,children:(0,n.jsx)(U.R,{gutter:"4px",autoPlace:!0,children:h?.map(e=>{if("grid_type"in e)return"promotional-unit"===e.grid_type?n.jsx(Y,{"data-aspect-ratio":1/1.5},e.id):null;let t=e.TemplatePresets.find(e=>"original"===e.presetConfigSlug);return i.createElement(eu,{...e,key:e.id,shouldTile:"clyyxuijt004h5vp0tdc6rsb4"===l,"data-aspect-ratio":(t?.width??1)/(t?.height??1)})})})})})}),(0,n.jsx)("div",{className:"flex justify-center py-8",children:d?(0,n.jsx)("p",{className:"text-fg-quaternary text-sm",children:"You have reached the end of the page"}):r?null:(0,n.jsx)(a.z,{ref:f,variant:"ghost",onClick:()=>t(),disabled:s,size:"lg",children:s?"Loading...":"Load more"})})]})})}function eu(e){let{shouldTile:t,showCategory:r,showCount:o=!0,extraMixpanelProps:l,context:u,...c}=e,{setUpgradeDialogMeta:p,designFile:m,designVersion:g,templateSwitchShouldCreateNewVersion:v,setTemplateSwitchShouldCreateNewVersion:x,showExploreSidebar:j,versionPointer:C}=(0,I.mr)(),k=g?.id,E=c.TemplatePresets?.find(e=>"original"===e.presetConfigSlug),S=(0,_.rP)(),N=(0,s.useRouter)(),L=(0,O.Z)(),M=!!L?.id,D=(0,F.T1)(),z=(0,d.Z)("/api/design/files/new",async(e,t)=>{let{arg:r}=t;return await fetch("/api/design/files/new",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:r.templateId})}).then(async e=>e.ok?e.json():await e.text().then(e=>{throw Error(e)}))},{onSuccess:e=>{N.push(`/design/${e.fileId}`),(0,$.JG)(`/api/design/files/${e.fileId}`)},onError:e=>{D("Something went wrong")}}),B=(0,d.Z)("/api/design/generate",async(e,t)=>{let{arg:r}=t;return await fetch("/api/design/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestType:"newFromTemplate",templateId:r.templateId,designId:m?.id,designVersion:k,replaceVersion:r.replaceVersion})}).then(async e=>e.ok?e.json():await e.text().then(e=>{throw Error(e)}))},{onSuccess:e=>{x(!1),(0,$.JG)(`/api/design/files/${m?.id}`),v||(0,$.JG)(`/api/design/versions/${k}`)},onError:e=>{D("Something went wrong")}}),U=c.userId===L?.id&&M&&!!c.userId,H=L?.role==="ADMIN",Z=o&&(U||H),W=o&&H&&c.usedInPeriod&&c.usedInPeriod>0,[q,G]=(0,i.useState)(!1),Y="PREMIUM"===c.type||q,K=c.tags.find(e=>"MAJOR"===e.tag.type)?.tag.name;if(!E)return console.error(`Template ${c.id} does not have a preset with slug 'original'`),null;let X=(0,n.jsxs)(n.Fragment,{children:[Y&&(0,n.jsxs)("div",{className:(0,f.cn)("flex transition absolute top-3 right-3 z-20 items-center text-fg-tertiary text-design-sm font-pg-medium rounded-full group","group-hover:bg-bg-tertiary group-hover:backdrop-blur-sm","w-7 px-1 group-hover:px-2 py-1 group-hover:w-16 transition-all overflow-hidden"),children:[(0,n.jsx)(w.I,{className:"h-5 w-5 shrink-0"}),(0,n.jsx)("span",{className:"w-0 overflow-hidden group-hover:overflow-visible transition group-hover:w-auto group-hover:ml-1 translate-x-3 group-hover:translate-x-0 opacity-0 group-hover:opacity-80",children:"Pro"})]}),!Y&&H&&(0,n.jsxs)("button",{type:"button",tabIndex:-1,className:(0,f.cn)("flex transition absolute top-3 right-3 z-20 items-center text-fg-tertiary text-design-sm font-pg-medium rounded-full group","group-hover:bg-bg-tertiary group-hover:backdrop-blur-sm","w-7 px-1 group-hover:px-2 py-1 group-hover:w-[104px] transition-all overflow-hidden hover:!bg-bg-primary"),onClick:async e=>{e?.preventDefault(),e?.stopPropagation(),await fetch(`/api/templates/${c.id}/type`,{method:"PUT",body:JSON.stringify({type:"PREMIUM"})}),G(!0)},children:[(0,n.jsx)(w.I,{className:"h-5 w-5 shrink-0 grayscale"}),(0,n.jsx)("span",{className:"w-0 overflow-hidden group-hover:overflow-visible transition group-hover:w-auto group-hover:ml-1 translate-x-3 group-hover:translate-x-0 opacity-0 group-hover:opacity-80",children:"Make Pro"})]}),t?(0,n.jsx)("div",{style:{backgroundImage:`url("${E.url_jpeg??E.url}")`,backgroundRepeat:"repeat",backgroundPosition:"center",backgroundSize:"contain",aspectRatio:E.width/E.height,"--image-w":`${E.width}px`,"--image-h":`${E.height}px`},className:(0,f.cn)(`w-full ${b().AnimatedTile} transform transition-transform duration-150 ease-in-out`,S||!Y?"hover:scale-105":"hover:scale-[1.02] hover:opacity-70")}):(0,n.jsx)("img",{src:E.url_jpeg??E.url,alt:c.title,height:E.height,width:E.width,className:(0,f.cn)("transform transition-transform duration-300 ease-in-out",S||!Y?"hover:scale-105":"hover:scale-[1.02] hover:opacity-70")}),(0,n.jsxs)("div",{className:"absolute bottom-4 right-4 flex flex-row gap-1",children:[r&&K&&(0,n.jsx)("div",{className:"bg-bg-tertiary mix-blend-luminosity backdrop-blur-sm text-fg-tertiary text-design-sm font-pg-medium px-[8px] py-[4px] rounded-full",children:K}),Z&&(0,n.jsxs)("div",{className:"flex gap-1 items-center bg-bg-tertiary mix-blend-luminosity backdrop-blur-sm text-fg-tertiary text-design-sm font-pg-medium px-[8px] py-[4px] rounded-full",children:[(0,n.jsx)(R.P,{className:"h-4 w-4"}),c.used.toLocaleString("en",{notation:"compact",maximumFractionDigits:1})]}),W?(0,n.jsxs)("div",{className:"flex gap-1 items-center bg-bg-tertiary mix-blend-luminosity backdrop-blur-sm text-fg-tertiary text-design-sm font-pg-medium px-[8px] py-[4px] rounded-full",children:[(0,n.jsx)(V.H,{className:"h-4 w-4"}),c?.usedInPeriod?.toLocaleString("en",{notation:"compact",maximumFractionDigits:1})]}):null]}),(0,n.jsx)("div",{className:(0,f.cn)("flex justify-center items-center","absolute inset-0 z-10 bg-black/50 transition-all duration-150 pointer-events-none",z.isMutating||B.isMutating?"opacity-100 backdrop-blur-lg":"opacity-0"),children:(0,n.jsx)(A.s8,{})})]}),J=S||!Y,Q=(0,n.jsx)(a.z,{"data-testid":`design-template-${c.id}`,variant:"ghost",asChild:!0,className:(0,f.cn)("rounded-design-md group overflow-hidden h-auto w-auto p-0 relative"),onClick:e=>{if(y().track("Template selected",{...c,templateId:c.id,...l||{}}),L){if(!J){e.preventDefault(),p({open:!0,url:E.url_jpeg??E.url,context:u??"template"});return}e.ctrlKey||e.metaKey||!m||(e.preventDefault(),B.trigger({templateId:c.id,replaceVersion:!v}))}},children:(0,n.jsx)(h(),{href:`/design/template/${(0,T.zS)(c)}`,children:X})},c.id);return J?Q:(0,n.jsx)(P,{side:"top",children:Q},c.id)}},64372:function(e,t,r){"use strict";r.d(t,{ZP:function(){return G},Ru:function(){return V}});var n=r(85893),i=r(67294),o=r(66751),a=r(48105),s=r(86047),l=r(19393),u=r(31630),c=r(73800),d=r(627),f=r(47435),p=r(1604);function h(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:[(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.344 3h3.312c1.077 0 1.966 0 2.681.077.747.081 1.421.256 2.014.687a4 4 0 01.885.885c.431.593.606 1.268.687 2.014C20 7.378 20 8.267 20 9.344v5.312c0 1.077 0 1.966-.077 2.681-.081.747-.256 1.421-.687 2.014-.247.34-.545.638-.885.885-.593.431-1.267.606-2.014.687-.715.077-1.604.077-2.681.077h-3.312c-1.077 0-1.966 0-2.681-.077-.746-.081-1.421-.256-2.014-.687a4 4 0 01-.885-.885c-.431-.593-.606-1.267-.687-2.014C4 16.622 4 15.733 4 14.656V9.344c0-1.077 0-1.966.077-2.681.081-.746.256-1.421.687-2.014a4 4 0 01.885-.885c.593-.431 1.268-.606 2.014-.687C8.378 3 9.267 3 10.344 3zM7.878 5.066c-.576.062-.858.174-1.054.316a2 2 0 00-.442.442c-.142.196-.254.478-.316 1.054C6 7.473 6 8.253 6 9.4v5.2c0 1.147.001 1.927.066 2.522.062.576.174.858.316 1.054.123.17.273.319.442.442.196.142.478.254 1.054.316C8.473 19 9.253 19 10.4 19h3.2c1.147 0 1.927-.001 2.522-.066.576-.062.858-.174 1.054-.316.17-.123.319-.273.442-.442.142-.196.254-.478.316-1.054C18 16.527 18 15.747 18 14.6V9.4c0-1.147-.001-1.927-.066-2.522-.062-.576-.174-.858-.316-1.054a1.998 1.998 0 00-.442-.442c-.196-.142-.478-.254-1.054-.316C15.527 5 14.747 5 13.6 5h-3.2c-1.147 0-1.927.001-2.522.066z",clipRule:"evenodd"}),(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9 4.5H6v3h3v3H6v3h3v3H6v3h3v-3h3v3h3v-3h3v-3h-3v-3h3v-3h-3v-3h-3v3H9v-3zm3 6h3v-3h-3v3zm0 3H9v-3h3v3zm0 0h3v3h-3v-3z",clipRule:"evenodd"})]})}function m(e){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M12 4C12.1559 4 12.304 4.03056 12.4443 4.09169C12.5794 4.14772 12.7094 4.23941 12.8341 4.36676L18.7038 10.2426C18.9013 10.4413 19 10.6832 19 10.9685C19 11.1519 18.9532 11.3225 18.8597 11.4804C18.7661 11.6383 18.6414 11.7657 18.4855 11.8625C18.3296 11.9542 18.1529 12 17.9555 12C17.6696 12 17.415 11.893 17.1915 11.6791L12 6.44508L6.80846 11.6791C6.5902 11.893 6.33556 12 6.04454 12C5.85226 12 5.67817 11.9542 5.52227 11.8625C5.36117 11.7657 5.23385 11.6383 5.14031 11.4804C5.04677 11.3225 5 11.1519 5 10.9685C5 10.6832 5.09874 10.4413 5.29621 10.2426L11.1659 4.36676C11.2906 4.24451 11.4206 4.15282 11.5557 4.09169C11.6908 4.03056 11.8389 4 12 4Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M12 10C12.1559 10 12.304 10.0306 12.4443 10.0917C12.5794 10.1477 12.7094 10.2394 12.8341 10.3668L18.7038 16.2426C18.9013 16.4413 19 16.6832 19 16.9685C19 17.1519 18.9532 17.3225 18.8597 17.4804C18.7661 17.6383 18.6414 17.7657 18.4855 17.8625C18.3296 17.9542 18.1529 18 17.9555 18C17.6696 18 17.415 17.893 17.1915 17.6791L12 12.4451L6.80846 17.6791C6.5902 17.893 6.33556 18 6.04454 18C5.85226 18 5.67817 17.9542 5.52227 17.8625C5.36117 17.7657 5.23385 17.6383 5.14031 17.4804C5.04677 17.3225 5 17.1519 5 16.9685C5 16.6832 5.09874 16.4413 5.29621 16.2426L11.1659 10.3668C11.2906 10.2445 11.4206 10.1528 11.5557 10.0917C11.6908 10.0306 11.8389 10 12 10Z",fill:"currentColor"})]})}var g=r(8891),v=r.n(g),y=r(69306),x=r(75508),b=r(21498),w=r(98942),_=r(44746),j=r(71864),C=r(42625),k=r(57718);function E(e){let{fetchContent:t,children:r,...i}=e,o=async()=>{let e=await t();if(e){if(!navigator?.share)return;await navigator.share({text:e})}};return(0,n.jsx)(a.z,{className:"text-xs underline hover:bg-transparent",onClick:o,...i,children:r??(0,n.jsx)(n.Fragment,{children:"Share"})})}function S(e){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M7.83333 13H6C5.44772 13 5 13.4477 5 14V18C5 19.1046 5.89543 20 7 20H17C18.1046 20 19 19.1046 19 18V14C19 13.4477 18.5523 13 18 13H16.1667",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.0041 3.0003C12.2851 3.0003 12.5661 3.11733 12.7645 3.32632L17.186 7.81012C17.4008 8.03583 17.5 8.28661 17.5 8.54576C17.5 9.14764 17.0785 9.57397 16.5248 9.57397C16.219 9.57397 15.9711 9.44858 15.7893 9.25631L13.9215 7.38379L12.9298 6.1769L13.0372 8.07449L13.0372 15.5003C13.0372 16.1356 12.6157 16.5703 12.0041 16.5703C11.3926 16.5703 10.9711 16.1356 10.9711 15.5003L10.9711 8.07449L11.0785 6.18526L10.0868 7.38379L8.21901 9.25631C8.02893 9.44858 7.78099 9.57397 7.48347 9.57397C6.92149 9.57397 6.5 9.14764 6.5 8.54576C6.5 8.28661 6.60744 8.03583 6.83884 7.80176L11.2438 3.32632C11.4421 3.11733 11.7231 3.0003 12.0041 3.0003Z",fill:"currentColor"})]})}var N=r(27418);function P(e){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:[(0,n.jsx)("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2",d:"M14.286 4H11.2c-3 0-4.5 0-5.551.764a4 4 0 00-.885.885C4 6.7 4 8.2 4 11.2v1.6c0 3 0 4.5.764 5.551.247.34.545.638.885.885C6.7 20 8.2 20 11.2 20h1.6c3 0 4.5 0 5.551-.764.34-.247.638-.545.885-.885C20 17.3 20 15.8 20 12.8V9.714M14.286 4l.332 2.327c.163 1.14.244 1.71.566 2.126a2 2 0 00.363.363c.417.322.986.403 2.126.566L20 9.714M14.286 4l.52.045A5.69 5.69 0 0120 9.715v0"}),(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.976 12.583a1.113 1.113 0 00-.034.041l-1.1 1.384a.326.326 0 01-.504.008l-.675-.797a1.134 1.134 0 00-1.707 0l-1.581 1.866c-.31.366-.541.873-.22 1.231.2.224.499.366.834.366H16c.348 0 .659-.154.858-.394.293-.35.081-.83-.203-1.188l-1.966-2.476c-.426-.536-1.267-.55-1.714-.04zm1.987 3.884l-.009-.012a.072.072 0 01.009.012z",clipRule:"evenodd"}),(0,n.jsx)("path",{fill:"currentColor",d:"M12.001 9.667a1.667 1.667 0 11-3.333 0 1.667 1.667 0 013.333 0z"})]})}var L=r(32178);let T=e=>{let{open:t,onOpenChange:r,designFile:s}=e,[l,u]=(0,i.useState)(!1),[,c]=(0,L.I)("interested-in-pod",!1),d=(0,i.useCallback)(()=>{v().track("Clicked notify me about printing",{designId:s.id,tag:s?.Template?.tags?.find(e=>e?.tag?.type==="MAJOR")?.tag?.name}),c(!0),u(!0)},[s,c]);return(0,n.jsx)(o.Vq,{open:t,onOpenChange:r,children:(0,n.jsxs)(o.cZ,{className:"flex flex-col gap-4 text-center max-w-lg mx-auto",closeVariant:"simple",children:[(0,n.jsx)("h2",{className:"text-fg-primary font-semibold",children:"Printing is coming to Playground"}),(0,n.jsx)("p",{children:"Soon, you'll be able to print custom shirts, stickers, phone cases, and more—right from Playground! Click below to be the first to know when we launch."}),(0,n.jsx)("div",{children:l?(0,n.jsx)("div",{className:"h-10 flex items-center justify-center font-medium",children:"We'll let you know!"}):(0,n.jsx)(a.z,{variant:"action-secondary",disabled:l,onClick:e=>{e.stopPropagation(),e.preventDefault(),d(),setTimeout(()=>r(!1),3e3)},children:"Notify Me"})})]})})};var O=r(63518),R=r(49338),A=r(28908),I=r(47922),M=r(75362);let D=p.z.enum(["p1","p2","p3","p4"]),F=p.z.object({image:p.z.string()}),z=p.z.object({url:p.z.string(),variant:D}),B=p.z.array(z);p.z.object({name:p.z.string(),ebModelId:p.z.string(),handler:p.z.function().args(F).returns(p.z.promise(z))});let U=e=>{let{children:t,inDrawer:r}=e;return(0,n.jsx)("h3",{className:`ml-3 text-design-base ${r?"text-black":"text-bg-tertiary"} font-pg-normal mb-2 flex flex-row gap-2`,children:t})},V=e=>{let{context:t,templateId:r,designFile:n,designVersion:o}=e;return(0,i.useCallback)(e=>{v().track("Design exported",{action:e,context:t,templateId:r,designId:n?.id,designVersionId:o?.id,tags:n?.Template?.tags?.map(e=>e?.tag?.name),tag:n?.Template?.tags?.find(e=>e?.tag?.type==="MAJOR")?.tag?.name})},[n,o,r,t])};function $(e){let{download:t,wasUpscaled:r,copyLink:i,originalUrl:o,url:l,setUrl:u,setDimms:c,setWasUpscaled:d,print:f,track:p}=e;return(0,n.jsxs)("div",{className:"text-gray-100 py-4 rounded-md space-y-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1 items-start",children:[(0,n.jsx)(U,{children:"Share options"}),(0,n.jsxs)(a.z,{"data-testid":"design-export-download-button",variant:"inverse",className:"flex gap-2",onClick:t,children:[(0,n.jsx)(s._,{className:"w-5 h-5"}),r?"Download upscaled":"Download"]}),(0,n.jsxs)(a.z,{className:"flex gap-2",variant:"inverse",onClick:f,children:[(0,n.jsx)(P,{className:"w-5 h-5"}),"Print with Playground"]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1 items-start",children:[(0,n.jsxs)(U,{children:["More actions ",(0,n.jsx)(C.Z,{})]}),(0,n.jsx)(H,{variant:"inverse",url:l,setUrl:u,track:p,setDimms:c,setWasUpscaled:d,disabled:r}),(0,n.jsx)(Z,{variant:"inverse",url:o,setUrl:u,track:p})]})]})}function H(e){let{url:t,setUrl:r,track:o,setDimms:s,setWasUpscaled:l,...c}=e,[h,g]=(0,i.useState)(!1),v=(0,u.T1)(),y=(0,_.rP)(),{setUpgradeDialogMeta:x}=(0,j.mr)();return(0,n.jsxs)(a.z,{onClick:async()=>{if(!y){x({open:!0,context:"upscale"});return}g(!0),o("Upscale");let e=await (0,f.Wv)(t),n=await (0,f.d4)(t),i=await fetch("/api/models/v2/upscale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({base64:n})}),a=()=>{g(!1),v("Failed to upscale")};if(!i.ok)return a();let u=await i.json(),c=p.z.object({image:p.z.string()}).safeParse(u);if(!c.success)return a();r(c.data.image),s?.([4*e.width,4*e.height]),l(!0),g(!1)},className:"flex gap-2",...c,disabled:h,children:[(0,n.jsx)("div",{className:"h-5 w-5 flex items-center justify-center leading-none",children:h?(0,n.jsx)(d.s8,{className:"w-5 h-5 fill-white"}):(0,n.jsx)(m,{className:"w-5 h-5"})}),"Upscale by 4x"]})}function Z(e){let{url:t,setUrl:r,track:s,...l}=e,[c,m]=(0,i.useState)(!1),g=(0,u.T1)(),v=(0,_.rP)(),{setUpgradeDialogMeta:b}=(0,j.mr)(),w=(0,I.y)("multi-bg-removal"),C=(0,y.OV)("sm"),k=(0,y.OV)("md"),E=function(){let e=(0,u.T1)();return(0,M.Z)("/api/design/generate/action",async(t,r)=>{let{arg:n}=r,i=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"remove-background",input:{image:n.image}})});if(!i?.ok)return console.error("Failed to remove background"),e("Failed to remove background"),null;let o=await i.json(),a=B.safeParse(o);if(!a.success)throw console.log(a.error),Error("Failed to remove background");return a.data})}(),S=c||E.isMutating;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.z,{onClick:async()=>{if(!v){b({open:!0,context:"remove-background"});return}s("Remove background");let e=await (0,f.d4)(t);if(w)return await E.trigger({image:e});m(!0);let n=await fetch("/api/models/v2",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({image:e,schema:"background_removal",edit_tool:"Background removal",skip_cropping:!0})}),i=()=>{m(!1),g("Failed to remove background")};if(!n.ok){i();return}let o=await n.json(),a=p.z.object({images:p.z.array(p.z.object({url:p.z.string()}))}).safeParse(o);if(!a.success){i();return}let l=a.data.images[0].url;await (0,f.Wv)(l),m(!1),r(l)},className:"flex gap-2",...l,disabled:S,children:[(0,n.jsx)("div",{className:"h-5 w-5 flex items-center justify-center leading-none",children:S?(0,n.jsx)(d.s8,{className:"!w-5 h-5 fill-white"}):(0,n.jsx)(h,{className:"w-5 h-5"})}),"Remove Background"]}),C||k?(0,n.jsx)(x.dy,{open:!!E?.data,onOpenChange:()=>E.reset(),children:(0,n.jsxs)(x.sc,{children:[(0,n.jsxs)(x.OX,{children:[(0,n.jsx)(x.iI,{className:"flex items-center gap-2",children:"Remove Background"}),(0,n.jsx)(a.z,{onClick:()=>E.reset(),variant:"ghost",children:"Done"})]}),(0,n.jsx)(x.u6,{className:"text-center",children:"Choose your preferred result"}),(0,n.jsx)("div",{className:"w-full h-[70vh] px-4 pb-4 flex flex-col gap-4 items-center overflow-y-auto",children:(0,n.jsx)(W,{results:E.data,setUrl:r,reset:E.reset})})]})}):(0,n.jsx)(o.Vq,{open:!!E?.data,onOpenChange:()=>E.reset(),children:(0,n.jsxs)(o.cZ,{className:"max-w-7xl",children:[(0,n.jsx)(o.fK,{children:(0,n.jsx)(o.$N,{className:"text-center lg:text-center justify-center flex items-center gap-2",children:"Remove Background"})}),(0,n.jsxs)("div",{className:"flex flex-col items-center w-full mx-auto gap-4",children:[(0,n.jsx)(o.Be,{children:"Choose your preferred result"}),(0,n.jsx)(W,{results:E.data,setUrl:r,reset:E.reset})]})]})})]})}function W(e){return(0,n.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 gap-1",children:(function(e){for(let t=e.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1));[e[t],e[r]]=[e[r],e[t]]}return e})(Array.isArray(e.results)?e.results:[])?.map(t=>n.jsx(a.z,{onClick:async()=>{await f.Wv(t.url),e.setUrl(t.url),v().track("Background Removal Variant Pick",{...t}),e.reset()},variant:"ghost",className:"p-0 h-auto w-full overflow-hidden rounded-design-md",children:n.jsx(q,{src:t.url})},t.variant))})}function q(e){let{src:t,alt:r="Zoomable image"}=e,o=(0,y.OV)("sm"),a=(0,y.OV)("md"),[s,l]=(0,i.useState)(!1),[u,c]=(0,i.useState)({x:0,y:0}),[d,f]=(0,i.useState)(1),p=(0,i.useRef)(null),h=(0,i.useRef)(null);return((0,i.useEffect)(()=>{let e=new Image;e.onload=()=>{f(e.width/e.height)},e.src=t},[t]),o||a)?(0,n.jsx)("img",{src:t,alt:r,className:"h-full w-full object-contain"}):(0,n.jsx)("div",{ref:p,className:"relative overflow-hidden w-full",style:{aspectRatio:d,backgroundImage:`
          linear-gradient(45deg, #80808025 25%, transparent 25%),
          linear-gradient(-45deg, #80808025 25%, transparent 25%),
          linear-gradient(45deg, transparent 75%, #80808025 75%),
          linear-gradient(-45deg, transparent 75%, #80808025 75%)
        `,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onMouseMove:e=>{if(p.current){let t=p.current.getBoundingClientRect();c({x:(e.clientX-t.left)/t.width,y:(e.clientY-t.top)/t.height})}},children:(0,n.jsx)("img",{ref:h,src:t,alt:r,className:"h-full w-full object-contain",style:{transform:s?"scale(2)":"none",transformOrigin:`${100*u.x}% ${100*u.y}%`,transition:"transform 0.2s ease-out"}})})}var G=()=>{let{template:e,designFile:t,designVersion:r,url:d,designCanvasRef:f}=(0,j.mr)(),p=(0,u.T1)(),h=e?.id,[m,g]=(0,i.useState)(!1),[_,C]=(0,i.useState)(d),[L,I]=(0,i.useState)(!1),M=e?.TemplatePresets.find(e=>"original"===e.presetConfigSlug),[D,F]=(0,i.useState)(r?[r?.width,r?.height]:[M?.width,M?.height]),z=(0,N.N)(),B=(0,R.C)(),U=(0,y.OV)("md"),W=V({context:"export",templateId:h,designFile:t,designVersion:r}),q=(0,i.useCallback)(e=>{if(!e)return C(e);let t=new Image;t.src=e,t.onload=()=>{t.width<=D[0]&&t.height<=D[1]&&I(!1),F([t.width,t.height])},C(e)},[D,I,F,C]),[G,Y]=(0,i.useState)(!1);function K(e){e||(I(!1),F([r?.width,r?.height]),C(d)),Y(e)}(0,i.useEffect)(()=>{f.current&&G&&q(f.current.toDataURL())},[f,G,q]),(0,O.Z)("design:export:open",()=>K(!0));let X=(0,i.useCallback)(async()=>{if(!r?.id||!h||!(await fetch(`/api/design/public/${r.id}`,{method:"POST"})).ok){p("Failed to copy link");return}return W("Copy public link"),z.trigger({templateId:h}),window.location.origin+"/design/public/"+r.id+"?utm_source=shared_by_user"},[r?.id,p,z,h,W]),J=(0,A.b)(),{setUpgradeDialogMeta:Q}=(0,j.mr)(),ee=(0,i.useCallback)(()=>{if(W("Download"),!_){v().track("Problem downloading design",{detail:"URL is not available",templateId:h,designId:t?.id,designVersionId:r?.id}),p("An error occurred while processing the image. Please try again.");return}return J?(h&&z.trigger({templateId:h}),B.trigger(),(async()=>{try{let r=await fetch(_),n=await r.blob(),i=t?.name||e?.title,o=new File([n],`${i}.png`,{type:"image/png"}),a=(0,k.T)();if(!(navigator?.share&&navigator.canShare({files:[o]}))||!U||!a)return(0,c.GN)(_,i);try{return await navigator.share({title:i,text:"Check out my design",files:[o]})}catch(e){}}catch(e){console.error("Error in shareOrDownload:",e),v().track("Problem downloading design",{detail:"Error in shareOrDownload",error:e,templateId:h,designId:t?.id,designVersionId:r?.id}),p("An error occurred while processing the image. Please try again.")}})()):(v().track("Problem downloading design",{detail:"canDownload is false",templateId:h,designId:t?.id,designVersionId:r?.id}),Q({open:!0,context:"download"}))},[t,_,p,U,z,h,r?.id,W,e?.title,J,B,Q]),et=(0,i.useCallback)(()=>{g(!0),W("Print")},[W]),er=function(){let[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{t(!!window?.navigator?.share)},[]),e}(),en=er?E:w.Z,ei=er?S:l.T,eo=!t||t.permissions?.write,ea="Export",es=eo?"secondary":"action-primary";return U?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(T,{open:m,onOpenChange:g,designFile:t}),(0,n.jsxs)(x.dy,{open:G,onOpenChange:K,onClose:()=>g(!1),children:[(0,n.jsx)(a.z,{onClick:()=>{b.KF.getState().setData(null),K(!0)},"data-testid":"design-export-button",className:"font-semibold",variant:es,disabled:!_,children:ea}),(0,n.jsxs)(x.sc,{className:"flex flex-col gap-4 pb-4",children:[(0,n.jsxs)(x.OX,{children:[(0,n.jsx)(x.iI,{children:"Share Design"}),(0,n.jsx)(a.z,{onClick:()=>{K(!1),q(d)},variant:"ghost",children:"Done"})]}),(0,n.jsxs)("div",{className:"w-full max-h-[50vh] aspect-square flex items-center justify-center relative",children:[(0,n.jsx)("img",{onContextMenu:e=>{if(!J)return e.preventDefault(),!1},src:_,alt:"",className:"h-full w-full object-contain"}),(0,n.jsx)("div",{className:"absolute bottom-4 right-4 px-[10px] py-[6px] bg-bg-secondary backdrop-blur-xl bg-blend-luminosity rounded-full text-fg-secondary text-design-sm whitespace-nowrap",children:`${D[0]} x ${D[1]}`})]}),(0,n.jsxs)("div",{className:"flex overflow-x-auto gap-2 py-1 no-scrollbar px-3 xs:justify-center",children:[(0,n.jsx)(H,{url:_,setUrl:q,track:W,setDimms:F,setWasUpscaled:I,disabled:L}),(0,n.jsx)(Z,{url:d,setUrl:q,track:W})]}),(0,n.jsxs)("div",{className:"flex flex-row gap-2 py-1 w-full px-3 overflow-x-scroll",children:[(0,n.jsxs)(a.z,{className:"w-full flex gap-2",variant:"action-secondary",size:"lg",onClick:ee,"data-testid":"design-export-download-button",children:[(0,n.jsx)(s._,{className:"w-5 h-5"}),L?"Download upscaled":"Download"]}),(0,n.jsxs)(en,{className:"w-full flex gap-2",variant:"action-secondary",size:"lg",fetchContent:X,children:[(0,n.jsx)(ei,{className:"w-5 h-5"}),er?"Share":"Copy public link"]}),(0,n.jsxs)(a.z,{className:"w-full flex gap-2",variant:"action-secondary",size:"lg",onClick:et,children:[(0,n.jsx)(P,{className:"w-5 h-5"}),"Print"]})]})]})]})]}):(0,n.jsxs)(o.Vq,{open:G,onOpenChange:e=>{K(e),e&&b.KF.getState().setData(null),e||g(!1),e||q(d)},children:[(0,n.jsx)(o.hg,{asChild:!0,children:(0,n.jsx)(a.z,{"data-testid":"design-export-button",className:"font-semibold",variant:es,disabled:!_,children:ea})}),(0,n.jsxs)(o.cZ,{className:"p-0 !w-screen !max-w-none !rounded-none bg-background",children:[(0,n.jsx)(T,{open:m,onOpenChange:g,designFile:t}),(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row items-center mx-auto",children:[(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("img",{onContextMenu:e=>{if(!J)return e.preventDefault(),!1},src:_,alt:"",className:"h-screen object-contain"}),(0,n.jsx)("div",{className:"absolute bottom-4 right-4 flex items-center justify-center px-[10px] py-[6px] bg-bg-secondary backdrop-blur-xl bg-blend-luminosity rounded-full text-fg-secondary text-design-sm whitespace-nowrap",children:`${D[0]} x ${D[1]}`})]}),(0,n.jsx)("div",{className:"px-4",children:(0,n.jsx)($,{download:ee,wasUpscaled:L,copyLink:X,url:_,originalUrl:d,setUrl:q,setDimms:F,setWasUpscaled:I,print:et,track:W})})]})]})]})}},97233:function(e,t,r){"use strict";r.d(t,{L:function(){return x},Q:function(){return y}});var n=r(85893),i=r(75508),o=r(69306);r(67294);var a=r(9520),s=r(66751),l=r(66991),u=r(93125),c=r(11163),d=r(8891),f=r.n(d),p=r(38372),h=r(71864),m=r(1233),g=r(62469),v=r(48105);function y(){let{setLoginDialogMeta:e}=(0,h.mr)(),t="create-from-image",r=(0,c.useRouter)(),n=(0,p.Z)();return[r.query?.[t]==="true",i=>{if(f().track("Create My Own click"),!n)return e({open:!0});if(i)r.push({pathname:r.pathname,query:{...r.query,[t]:!0}},void 0,{shallow:!0,scroll:!1});else{let e={...r.query};delete e[t],r.push({pathname:r.pathname,query:e},void 0,{shallow:!0,scroll:!1})}}]}function x(){let[e,t]=y(),r=(0,u.u)(),c=(0,l.Xt)({type:"MAJOR",visibility:"ga"});return(0,o.OV)("lg")?(0,n.jsx)(i.dy,{open:e,onOpenChange:t,children:(0,n.jsxs)(i.sc,{children:[(0,n.jsx)(i.OX,{}),(0,n.jsx)("div",{className:"p-8 text-center",children:(0,n.jsx)(a.P,{onSubmit:r.trigger,isPending:r.isMutating,data:{tags:c.data??[]}})})]})}):(0,n.jsx)(s.Vq,{open:e,onOpenChange:t,children:(0,n.jsxs)(s.cZ,{hideCloseButton:!0,children:[(0,n.jsx)(a.P,{data:{tags:c.data??[]},onSubmit:r.trigger,isPending:r.isMutating}),(0,n.jsx)(s.GG,{className:(0,m.cn)("flex absolute left-4 top-4 ring-offset-background hover:opacity-100 focus:outline-none focus:ring-none focus:ring-offset-2 disabled:pointer-events-none"),children:(0,n.jsxs)(v.z,{variant:"secondary",size:"icon",children:[(0,n.jsx)(g.Pxu,{className:"h-5 w-5"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})})]})})}},9520:function(e,t,r){"use strict";r.d(t,{P:function(){return d}});var n=r(85893),i=r(67294),o=r(48105),a=r(1233),s=r(627),l=r(8891),u=r.n(l),c=r(68995);function d(e){let[t,r]=(0,i.useState)(""),[l,d]=(0,i.useState)(1024),[f,p]=(0,i.useState)(1024),h=i.useRef(null),[m,g]=i.useState(!1);async function v(t){if(t.startsWith("data:image/svg+xml")){let e=await fetch(t).then(e=>e.blob()),r=URL.createObjectURL(e),n=new Image;n.src=r,n.onload=()=>{let e=document.createElement("canvas");e.width=n.width,e.height=n.height;let t=e.getContext("2d");t&&(t.drawImage(n,0,0),e.toDataURL("image/png"),v(e.toDataURL("image/png")))},n.onerror=()=>{console.error("Error loading SVG image.")};return}r(t);let n=new Image;n.src=t,n.onload=()=>(p(n.width),d(n.height),u().track("Create My Own image uploaded",{width:n.width,height:n.height}),e.onSubmit({image:t,width:n.width,height:n.height}))}let y=i.useRef(null);return e.isPending?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"absolute top-0 left-0 w-full h-full blur-3xl bg-cover bg-no-repeat bg-center z-0 pointer-events-none duration-1000 ease-linear transition-[background-image]",style:{backgroundImage:`url(${t})`,opacity:.3}}),(0,n.jsx)("div",{className:"flex-1 flex-col flex gap-2 w-full",children:(0,n.jsxs)("div",{className:"flex w-full gap-4 justify-center",children:[(0,n.jsx)("div",{className:"flex-none w-[20%] hidden md:flex"}),(0,n.jsxs)("div",{className:"overflow-hidden rounded-[48px] flex justify-center relative border-solid border-[6px] border-bg-primary",children:[(0,n.jsx)("img",{src:t,className:"flex-1 object-contain max-h-[calc(50vh)]",alt:"Design preview"}),(0,n.jsx)("div",{className:"backdrop-blur-sm rounded-[40px] absolute inset-0"}),(0,n.jsx)("div",{className:"backdrop-blur-md rounded-[40px] animate-pulse absolute inset-0 bg-black/20"}),(0,n.jsxs)("div",{className:"absolute inset-0 rounded-[40px] flex items-center justify-center w-full h-full flex-col gap-2",children:[(0,n.jsx)(s.s8,{className:"fill-white"}),(0,n.jsx)("p",{className:"text-white text-sm font-medium",children:"Generating..."})]})]}),(0,n.jsx)("div",{className:"flex-none w-[20%] hidden md:flex"})]})})]}):(0,n.jsx)("form",{ref:y,onSubmit:r=>(r.preventDefault(),e.onSubmit({image:t,width:f,height:l})),className:"flex flex-col justify-between space-y-8 h-full",children:(0,n.jsxs)("div",{className:"flex flex-col space-y-4 w-full max-w-xl mx-auto items-center",children:[(0,n.jsx)("h2",{className:"text-xl text-fg-primary font-semibold text-center",style:{whiteSpace:"balance"},children:"Upload an image of something you like and we'll turn it into a design you can change."}),(0,n.jsx)("div",{className:(0,a.cn)("border-[3px] border-dashed p-3 rounded-design-base aspect-square transition-all duration-75",m&&"border-fg-primary"),onDragOver:e=>{e.preventDefault(),g(!0)},onDragLeave:e=>{e.preventDefault(),g(!1)},onDrop:e=>{e.preventDefault(),g(!1);let t=e.dataTransfer.files[0];if(t&&t.type.startsWith("image/")){let e=new FileReader;e.onload=e=>{e.target&&"string"==typeof e.target.result&&v(e.target.result)},e.readAsDataURL(t)}else console.error("Please drop an image file")},children:(0,n.jsxs)(o.z,{onClick:()=>h.current?.click(),type:"button",className:(0,a.cn)("rounded-design-xs p-0","h-64 w-64 md:h-96 md:w-96",m&&"bg-bg-secondary text-fg-primary"),variant:"ghost",children:[(0,n.jsx)("input",{"data-testid":"design-create-my-own-file-input",ref:h,hidden:!0,type:"file",accept:"image/*",onChange:e=>{if(e.target.files&&e.target.files.length){let t=e.target.files[0],r=new FileReader;r.onload=e=>{e.target&&"string"==typeof e.target.result&&v(e.target.result)},r.readAsDataURL(t)}}}),t?(0,n.jsx)("img",{alt:"Preview of image",src:t,className:(0,a.cn)("h-fit w-fit object-contain rounded-design-sm","h-64 md:h-96 w-64 md:w-96")}):(0,n.jsxs)("div",{className:"flex flex-col gap-1 items-center px-4",children:[(0,n.jsx)(c.p,{className:"h-7 w-7 text-fg-tertiary"}),(0,n.jsx)("p",{className:"whitespace-break-spaces text-fg-secondary",children:"Drop image here or click to choose"})]})]})}),(0,n.jsx)("p",{className:"text-sm text-fg-tertiary",children:"The image created will be inspired but not exact."})]})})}},21498:function(e,t,r){"use strict";r.d(t,{Cb:function(){return ep},_A:function(){return ef},KF:function(){return ed}});var n,i=r(85893),o=r(67294),a=r(73935);function s(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function l(...e){return o.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}function u(e,t=[]){let r=[],n=()=>{let t=r.map(e=>o.createContext(e));return function(r){let n=r?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let a=o.createContext(n),s=r.length;function l(t){let{scope:r,children:n,...l}=t,u=r?.[e][s]||a,c=o.useMemo(()=>l,Object.values(l));return(0,i.jsx)(u.Provider,{value:c,children:n})}return r=[...r,n],l.displayName=t+"Provider",[l,function(r,i){let l=i?.[e][s]||a,u=o.useContext(l);if(u)return u;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}var c=r(4222),d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=o.forwardRef((e,r)=>{let{asChild:n,...o}=e,a=n?c.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(a,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function f(e,t){e&&a.flushSync(()=>e.dispatchEvent(t))}function p(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}var h="dismissableLayer.update",m=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),g=o.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:f,onDismiss:g,...v}=e,b=o.useContext(m),[w,_]=o.useState(null),j=w?.ownerDocument??globalThis?.document,[,C]=o.useState({}),k=l(t,e=>_(e)),E=Array.from(b.layers),[S]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),N=E.indexOf(S),P=w?E.indexOf(w):-1,L=b.layersWithOutsidePointerEventsDisabled.size>0,T=P>=N,O=function(e,t=globalThis?.document){let r=p(e),n=o.useRef(!1),i=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){x("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...b.branches].some(e=>e.contains(t));!T||r||(u?.(e),f?.(e),e.defaultPrevented||g?.())},j),R=function(e,t=globalThis?.document){let r=p(e),n=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!n.current&&x("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;[...b.branches].some(e=>e.contains(t))||(c?.(e),f?.(e),e.defaultPrevented||g?.())},j);return!function(e,t=globalThis?.document){let r=p(e);o.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{P!==b.layers.size-1||(a?.(e),!e.defaultPrevented&&g&&(e.preventDefault(),g()))},j),o.useEffect(()=>{if(w)return r&&(0===b.layersWithOutsidePointerEventsDisabled.size&&(n=j.body.style.pointerEvents,j.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),y(),()=>{r&&1===b.layersWithOutsidePointerEventsDisabled.size&&(j.body.style.pointerEvents=n)}},[w,j,r,b]),o.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersWithOutsidePointerEventsDisabled.delete(w),y())},[w,b]),o.useEffect(()=>{let e=()=>C({});return document.addEventListener(h,e),()=>document.removeEventListener(h,e)},[]),(0,i.jsx)(d.div,{...v,ref:k,style:{pointerEvents:L?T?"auto":"none":void 0,...e.style},onFocusCapture:s(e.onFocusCapture,R.onFocusCapture),onBlurCapture:s(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:s(e.onPointerDownCapture,O.onPointerDownCapture)})});g.displayName="DismissableLayer";var v=o.forwardRef((e,t)=>{let r=o.useContext(m),n=o.useRef(null),a=l(t,n);return o.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,i.jsx)(d.div,{...e,ref:a})});function y(){let e=new CustomEvent(h);document.dispatchEvent(e)}function x(e,t,r,{discrete:n}){let i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?f(i,o):i.dispatchEvent(o)}v.displayName="DismissableLayerBranch";var b=globalThis?.document?o.useLayoutEffect:()=>{},w=o.forwardRef((e,t)=>{let{container:r,...n}=e,[s,l]=o.useState(!1);b(()=>l(!0),[]);let u=r||s&&globalThis?.document?.body;return u?a.createPortal((0,i.jsx)(d.div,{...n,ref:t}),u):null});w.displayName="Portal";var _=e=>{let t,r;let{present:n,children:i}=e,s=function(e){var t,r;let[n,i]=o.useState(),s=o.useRef({}),l=o.useRef(e),u=o.useRef("none"),[c,d]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},o.useReducer((e,t)=>r[e][t]??e,t));return o.useEffect(()=>{let e=j(s.current);u.current="mounted"===c?e:"none"},[c]),b(()=>{let t=s.current,r=l.current;if(r!==e){let n=u.current,i=j(t);e?d("MOUNT"):"none"===i||t?.display==="none"?d("UNMOUNT"):r&&n!==i?d("ANIMATION_OUT"):d("UNMOUNT"),l.current=e}},[e,d]),b(()=>{if(n){let e=e=>{let t=j(s.current).includes(e.animationName);e.target===n&&t&&a.flushSync(()=>d("ANIMATION_END"))},t=e=>{e.target===n&&(u.current=j(s.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:o.useCallback(e=>{e&&(s.current=getComputedStyle(e)),i(e)},[])}}(n),u="function"==typeof i?i({present:s.isPresent}):o.Children.only(i),c=l(s.ref,(t=Object.getOwnPropertyDescriptor(u.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?u.ref:(t=Object.getOwnPropertyDescriptor(u,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?u.props.ref:u.props.ref||u.ref);return"function"==typeof i||s.isPresent?o.cloneElement(u,{ref:c}):null};function j(e){return e?.animationName||"none"}_.displayName="Presence";var C=o.forwardRef((e,t)=>(0,i.jsx)(d.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));C.displayName="VisuallyHidden";var k="ToastProvider",[E,S,N]=function(e){let t=e+"CollectionProvider",[r,n]=u(t),[a,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:r}=e,n=o.useRef(null),s=o.useRef(new Map).current;return(0,i.jsx)(a,{scope:t,itemMap:s,collectionRef:n,children:r})};d.displayName=t;let f=e+"CollectionSlot",p=o.forwardRef((e,t)=>{let{scope:r,children:n}=e,o=l(t,s(f,r).collectionRef);return(0,i.jsx)(c.g7,{ref:o,children:n})});p.displayName=f;let h=e+"CollectionItemSlot",m="data-radix-collection-item",g=o.forwardRef((e,t)=>{let{scope:r,children:n,...a}=e,u=o.useRef(null),d=l(t,u),f=s(h,r);return o.useEffect(()=>(f.itemMap.set(u,{ref:u,...a}),()=>void f.itemMap.delete(u))),(0,i.jsx)(c.g7,{[m]:"",ref:d,children:n})});return g.displayName=h,[{Provider:d,Slot:p,ItemSlot:g},function(t){let r=s(e+"CollectionConsumer",t);return o.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}("Toast"),[P,L]=u("Toast",[N]),[T,O]=P(k),R=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:l}=e,[u,c]=o.useState(null),[d,f]=o.useState(0),p=o.useRef(!1),h=o.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${k}\`. Expected non-empty \`string\`.`),(0,i.jsx)(E.Provider,{scope:t,children:(0,i.jsx)(T,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:s,toastCount:d,viewport:u,onViewportChange:c,onToastAdd:o.useCallback(()=>f(e=>e+1),[]),onToastRemove:o.useCallback(()=>f(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:h,children:l})})};R.displayName=k;var A="ToastViewport",I=["F8"],M="toast.viewportPause",D="toast.viewportResume",F=o.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:n=I,label:a="Notifications ({hotkey})",...s}=e,u=O(A,r),c=S(r),f=o.useRef(null),p=o.useRef(null),h=o.useRef(null),m=o.useRef(null),g=l(t,m,u.onViewportChange),y=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=u.toastCount>0;o.useEffect(()=>{let e=e=>{n.every(t=>e[t]||e.code===t)&&m.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[n]),o.useEffect(()=>{let e=f.current,t=m.current;if(x&&e&&t){let r=()=>{if(!u.isClosePausedRef.current){let e=new CustomEvent(M);t.dispatchEvent(e),u.isClosePausedRef.current=!0}},n=()=>{if(u.isClosePausedRef.current){let e=new CustomEvent(D);t.dispatchEvent(e),u.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||n()},o=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",i),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",o),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",i),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",o),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}},[x,u.isClosePausedRef]);let b=o.useCallback(({tabbingDirection:e})=>{let t=c().map(t=>{let r=t.ref.current,n=[r,...function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}(r)];return"forwards"===e?n:n.reverse()});return("forwards"===e?t.reverse():t).flat()},[c]);return o.useEffect(()=>{let e=m.current;if(e){let t=t=>{let r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){let r=document.activeElement,n=t.shiftKey;if(t.target===e&&n){p.current?.focus();return}let i=b({tabbingDirection:n?"backwards":"forwards"}),o=i.findIndex(e=>e===r);et(i.slice(o+1))?t.preventDefault():n?p.current?.focus():h.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[c,b]),(0,i.jsxs)(v,{ref:f,role:"region","aria-label":a.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&(0,i.jsx)(B,{ref:p,onFocusFromOutsideViewport:()=>{et(b({tabbingDirection:"forwards"}))}}),(0,i.jsx)(E.Slot,{scope:r,children:(0,i.jsx)(d.ol,{tabIndex:-1,...s,ref:g})}),x&&(0,i.jsx)(B,{ref:h,onFocusFromOutsideViewport:()=>{et(b({tabbingDirection:"backwards"}))}})]})});F.displayName=A;var z="ToastFocusProxy",B=o.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=O(z,r);return(0,i.jsx)(C,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||n()}})});B.displayName=z;var U="Toast",V=o.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:a,onOpenChange:l,...u}=e,[c=!0,d]=function({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,i]=function({defaultProp:e,onChange:t}){let r=o.useState(e),[n]=r,i=o.useRef(n),a=p(t);return o.useEffect(()=>{i.current!==n&&(a(n),i.current=n)},[n,i,a]),r}({defaultProp:t,onChange:r}),a=void 0!==e,s=a?e:n,l=p(r);return[s,o.useCallback(t=>{if(a){let r="function"==typeof t?t(e):t;r!==e&&l(r)}else i(t)},[a,e,i,l])]}({prop:n,defaultProp:a,onChange:l});return(0,i.jsx)(_,{present:r||c,children:(0,i.jsx)(Z,{open:c,...u,ref:t,onClose:()=>d(!1),onPause:p(e.onPause),onResume:p(e.onResume),onSwipeStart:s(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:s(e.onSwipeMove,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${r}px`)}),onSwipeCancel:s(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:s(e.onSwipeEnd,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${r}px`),d(!1)})})})});V.displayName=U;var[$,H]=P(U,{onClose(){}}),Z=o.forwardRef((e,t)=>{let{__scopeToast:r,type:n="foreground",duration:u,open:c,onClose:f,onEscapeKeyDown:h,onPause:m,onResume:v,onSwipeStart:y,onSwipeMove:x,onSwipeCancel:b,onSwipeEnd:w,..._}=e,j=O(U,r),[C,k]=o.useState(null),S=l(t,e=>k(e)),N=o.useRef(null),P=o.useRef(null),L=u||j.duration,T=o.useRef(0),R=o.useRef(L),A=o.useRef(0),{onToastAdd:I,onToastRemove:F}=j,z=p(()=>{C?.contains(document.activeElement)&&j.viewport?.focus(),f()}),B=o.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(A.current),T.current=new Date().getTime(),A.current=window.setTimeout(z,e))},[z]);o.useEffect(()=>{let e=j.viewport;if(e){let t=()=>{B(R.current),v?.()},r=()=>{let e=new Date().getTime()-T.current;R.current=R.current-e,window.clearTimeout(A.current),m?.()};return e.addEventListener(M,r),e.addEventListener(D,t),()=>{e.removeEventListener(M,r),e.removeEventListener(D,t)}}},[j.viewport,L,m,v,B]),o.useEffect(()=>{c&&!j.isClosePausedRef.current&&B(L)},[c,L,j.isClosePausedRef,B]),o.useEffect(()=>(I(),()=>F()),[I,F]);let V=o.useMemo(()=>C?function e(t){let r=[];return Array.from(t.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),t.nodeType===t.ELEMENT_NODE){let n=t.ariaHidden||t.hidden||"none"===t.style.display,i=""===t.dataset.radixToastAnnounceExclude;if(!n){if(i){let e=t.dataset.radixToastAnnounceAlt;e&&r.push(e)}else r.push(...e(t))}}}),r}(C):null,[C]);return j.viewport?(0,i.jsxs)(i.Fragment,{children:[V&&(0,i.jsx)(W,{__scopeToast:r,role:"status","aria-live":"foreground"===n?"assertive":"polite","aria-atomic":!0,children:V}),(0,i.jsx)($,{scope:r,onClose:z,children:a.createPortal((0,i.jsx)(E.ItemSlot,{scope:r,children:(0,i.jsx)(g,{asChild:!0,onEscapeKeyDown:s(h,()=>{j.isFocusedToastEscapeKeyDownRef.current||z(),j.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,i.jsx)(d.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":j.swipeDirection,..._,ref:S,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:s(e.onKeyDown,e=>{"Escape"!==e.key||(h?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(j.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:s(e.onPointerDown,e=>{0===e.button&&(N.current={x:e.clientX,y:e.clientY})}),onPointerMove:s(e.onPointerMove,e=>{if(!N.current)return;let t=e.clientX-N.current.x,r=e.clientY-N.current.y,n=!!P.current,i=["left","right"].includes(j.swipeDirection),o=["left","up"].includes(j.swipeDirection)?Math.min:Math.max,a=i?o(0,t):0,s=i?0:o(0,r),l="touch"===e.pointerType?10:2,u={x:a,y:s},c={originalEvent:e,delta:u};n?(P.current=u,Q("toast.swipeMove",x,c,{discrete:!1})):ee(u,j.swipeDirection,l)?(P.current=u,Q("toast.swipeStart",y,c,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(r)>l)&&(N.current=null)}),onPointerUp:s(e.onPointerUp,e=>{let t=P.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),P.current=null,N.current=null,t){let r=e.currentTarget,n={originalEvent:e,delta:t};ee(t,j.swipeDirection,j.swipeThreshold)?Q("toast.swipeEnd",w,n,{discrete:!0}):Q("toast.swipeCancel",b,n,{discrete:!0}),r.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),j.viewport)})]}):null}),W=e=>{let{__scopeToast:t,children:r,...n}=e,a=O(U,t),[s,l]=o.useState(!1),[u,c]=o.useState(!1);return function(e=()=>{}){let t=p(e);b(()=>{let e=0,r=0;return e=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}},[t])}(()=>l(!0)),o.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),u?null:(0,i.jsx)(w,{asChild:!0,children:(0,i.jsx)(C,{...n,children:s&&(0,i.jsxs)(i.Fragment,{children:[a.label," ",r]})})})},q=o.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,i.jsx)(d.div,{...n,ref:t})});q.displayName="ToastTitle";var G=o.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,i.jsx)(d.div,{...n,ref:t})});G.displayName="ToastDescription";var Y="ToastAction";o.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,i.jsx)(J,{altText:r,asChild:!0,children:(0,i.jsx)(X,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Y}\`. Expected non-empty \`string\`.`),null)}).displayName=Y;var K="ToastClose",X=o.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,o=H(K,r);return(0,i.jsx)(J,{asChild:!0,children:(0,i.jsx)(d.button,{type:"button",...n,ref:t,onClick:s(e.onClick,o.onClose)})})});X.displayName=K;var J=o.forwardRef((e,t)=>{let{__scopeToast:r,altText:n,...o}=e;return(0,i.jsx)(d.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Q(e,t,r,{discrete:n}){let i=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?f(i,o):i.dispatchEvent(o)}var ee=(e,t,r=0)=>{let n=Math.abs(e.x),i=Math.abs(e.y),o=n>i;return"left"===t||"right"===t?o&&n>r:!o&&i>r};function et(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function er(e){return(0,i.jsx)("svg",{width:"30",height:"30",viewBox:"0 0 30 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,i.jsx)("path",{d:"M10.3694 5.9502C12.166 2.86573 13.0642 1.32349 14.3365 1.03496C14.7733 0.935898 15.2267 0.935898 15.6635 1.03496C16.9358 1.32349 17.834 2.86573 19.6306 5.9502C20.1451 6.83351 20.4023 7.27517 20.7746 7.59975C20.9084 7.71643 21.0523 7.821 21.2047 7.91222C21.6284 8.16599 22.1279 8.27416 23.127 8.49051C26.6157 9.24596 28.36 9.62369 29.0276 10.7445C29.2568 11.1293 29.3969 11.5606 29.4376 12.0066C29.5564 13.3057 28.3672 14.6366 25.9889 17.2984C25.3078 18.0606 24.9672 18.4418 24.7736 18.8961C24.7039 19.0595 24.649 19.2287 24.6093 19.4017C24.4989 19.8831 24.5504 20.3917 24.6533 21.4087C25.0129 24.96 25.1927 26.7357 24.333 27.717C24.0379 28.0539 23.671 28.3204 23.2594 28.497C22.0606 29.0114 20.4274 28.2917 17.1609 26.8522C16.2255 26.44 15.7578 26.2339 15.2658 26.1902C15.089 26.1744 14.911 26.1744 14.7342 26.1902C14.2422 26.2339 13.7745 26.44 12.8391 26.8522C9.57265 28.2917 7.93943 29.0114 6.74057 28.497C6.32896 28.3204 5.96212 28.0539 5.66697 27.717C4.8073 26.7357 4.98709 24.96 5.34666 21.4087C5.44964 20.3917 5.50112 19.8831 5.39072 19.4017C5.35103 19.2287 5.29605 19.0595 5.22644 18.8961C5.03279 18.4418 4.69224 18.0606 4.01114 17.2984C1.6328 14.6366 0.44363 13.3057 0.562362 12.0066C0.603127 11.5606 0.743248 11.1293 0.972442 10.7445C1.63999 9.62369 3.38433 9.24596 6.87299 8.49051C7.87206 8.27416 8.3716 8.16599 8.79533 7.91222C8.94766 7.821 9.09158 7.71643 9.22541 7.59975C9.5977 7.27517 9.85494 6.83351 10.3694 5.9502Z",fill:"currentColor"})})}var en=r(32478),ei=r(31630),eo=r(48105),ea=r(64529),es=r(8891),el=r.n(es),eu=r(38372),ec=r(77832);let ed=(0,ea.Ue)(e=>({data:null,setData(t){e({data:t})}}));function ef(e,t){let r=localStorage.designFeedbackLastOpened??0;Date.now()-Number(r)>864e5&&(ed.getState().setData({designFileId:e,lastURL:t}),localStorage.designFeedbackLastOpened=Date.now(),el().track("Opened Design Feedback",{templateId:e,lastURL:t}))}function ep(){let[e,t]=(0,o.useState)(0),[r,n]=(0,o.useState)(""),a=(0,eu.Z)(),{data:s,setData:l}=ed(),u=0!==e&&e<3,[c,d]=(0,o.useState)(!1),f=(0,ei.T1)(),p=(0,o.useRef)(void 0),h=async(t,n)=>{d(!0),t?.preventDefault();let i={star:e,additionalFeedback:r,...n};if(el().track("Submitted App Feedback",{rating:i.star,designFileId:s?.designFileId,mostRecentVersionURL:s?.lastURL,feedback:i.additionalFeedback}),!(await fetch("/api/feedback",{method:"POST",body:JSON.stringify({feedback:`${i.additionalFeedback?`${i.additionalFeedback} 
`:""}Star rating: ${i.star} ${s?.lastURL??""}`,designFileId:s?.designFileId,source:"design",starRating:i.star})})).ok)return d(!1),f("Failed to submit feedback");d(!1),l(null)};return((0,ec.K)(null,()=>{l({designFileId:"test",lastURL:"test"})}),a)?1724782253698>new Date(a.createdAt??Date.now()).getTime()?null:(0,i.jsxs)(R,{swipeDirection:"right",duration:9e4,children:[(0,i.jsxs)(V,{className:"bg-bg-primary rounded-3xl p-4 pt-2 items-center data-[state=open]:animate-fade-up data-[state=closed]:animatasdfa data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-[transform_200ms_ease-out] data-[swipe=end]:animate-swipeOut",style:{boxShadow:"0px 4px 24px 0px rgba(0, 0, 0, 0.08)",backgroundBlendMode:"luminosity",backdropFilter:"blur(25px)"},open:null!==s,onOpenChange:e=>l(null),children:[(0,i.jsx)(q,{asChild:!0,className:"text-lg text-fg-primary font-pg-semibold ",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[e&&!u?"Thank you for sharing!":"How do you like your design?"," ",(0,i.jsx)(eo.z,{className:"ml-auto hover:bg-transparent pr-0",onClick:e=>{l(null)},children:(0,i.jsx)(en.Z,{})})]})}),(0,i.jsx)(G,{asChild:!0,className:"",children:(0,i.jsxs)("form",{onSubmit:h,className:"",children:[!u&&!e&&(0,i.jsx)("p",{className:"text-sm text-fg-secondary",children:"Your feedback will help us improve the experience."}),(0,i.jsx)(eh,{star:e,setStar:e=>{p.current&&clearTimeout(p.current),e>=3&&(p.current=setTimeout(()=>{h(null,{star:e}),l(null)},3e3)),t(e)}}),u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{className:"text-fg-primary font-pg-semibold mt-4",children:"What went wrong?"}),(0,i.jsx)("textarea",{minLength:20,className:"w-full h-[100px] p-[10px] mt-[10px] border rounded-2xl placeholder:text-fg-tertiary bg-bg-secondary",value:r,onChange:e=>n(e.target.value),placeholder:"Please share your feedback. Your feedback will only be read by our team.",autoFocus:!0}),(0,i.jsx)(eo.z,{type:"submit",variant:"action-primary",className:"float-right bg-fg-primary hover:bg-fg-tertiary text-white rounded-full bg-black",disabled:r.length<20||c,children:"Submit"})]})]})})]}),(0,i.jsx)(F,{className:"[--viewport-padding:_25px] fixed bottom-0 right-0 md:top-0 md:left-0 flex flex-col p-[var(--viewport-padding)] gap-[10px] w-[370px] max-w-[100vw] m-0 list-none z-[50] rounded-2xl"})]}):null}function eh(e){let{star:t,setStar:r}=e;return(0,i.jsxs)("div",{className:"flex justify-center items-center gap-1 pt-1",children:[(0,i.jsx)("span",{className:"text-xl mt-1 mr-1",children:"\uD83D\uDE41"}),[,,,,,].fill(null).map((e,n)=>(0,i.jsx)("button",{type:"button",onClick:()=>r(n+1),children:(0,i.jsx)(er,{className:n<t?"text-black":"text-bg-tertiary"})},n)),(0,i.jsx)("span",{className:"text-xl mt-1 ml-",children:"\uD83E\uDD29"})]})}},69198:function(e,t,r){"use strict";r.d(t,{T:function(){return o}});var n=r(85893),i=r(81136);function o(e){let{variant:t="spinner"}=e;return"saving-design"===t?(0,n.jsx)("div",{className:"py-24 px-4 flex items-center justify-center",children:(0,n.jsxs)("div",{className:"flex flex-row gap-2",children:[(0,n.jsx)(i.$,{}),(0,n.jsx)("span",{className:"text-fg-secondary",children:"Saving design…"})]})}):(0,n.jsx)("div",{className:"py-24 px-4 flex items-center justify-center",children:(0,n.jsx)(i.$,{})})}},65481:function(e,t,r){"use strict";r.d(t,{K:function(){return a},R:function(){return o}});var n=r(85893),i=r(1233);function o(e){return(0,n.jsx)("header",{...e,className:(0,i.cn)("flex items-center pt-3 md:pt-10 justify-between px-3 gap-2",e.className),children:e.children})}function a(e){return(0,n.jsx)("h1",{...e,className:(0,i.cn)("text-design-base md:text-design-xl lg:text-design-3xl font-[600]",e.className),children:e.children})}r(67294)},14126:function(e,t,r){"use strict";var n=r(85893);r(67294);var i=r(9008),o=r.n(i);t.Z=e=>{let{imageUrl:t="/og/default.png",title:r="Free AI Design Tool: Logos, T-Shirts, Social Media - Playground",description:i="Create custom designs and graphics with Playground",children:a}=e;return(0,n.jsxs)(o(),{children:[(0,n.jsx)("title",{children:r},"title"),(0,n.jsx)("meta",{name:"description",content:i},"description"),(0,n.jsx)("meta",{property:"og:image",content:t},"og:image"),(0,n.jsx)("meta",{property:"og:image:type",content:"image/png"},"og:image:type"),(0,n.jsx)("meta",{property:"og:image:alt",content:"Playground"},"og:image:alt"),(0,n.jsx)("meta",{property:"og:description",content:i},"og:description"),(0,n.jsx)("meta",{property:"og:title",content:r},"og:title"),(0,n.jsx)("meta",{property:"twitter:card",content:"summary_large_image"},"twitter:card"),(0,n.jsx)("meta",{property:"twitter:title",content:r},"twitter:title"),(0,n.jsx)("meta",{property:"twitter:image",content:t},"twitter:image"),(0,n.jsx)("meta",{property:"twitter:description",content:i},"twitter:description"),(0,n.jsx)("meta",{property:"twitter:url",content:"https://playground.com"},"twitter:url"),a]})}},77922:function(e,t,r){"use strict";r.d(t,{Z:function(){return v}});var n=r(85893),i=r(1233),o=r(48105),a=r(67294);function s(e){return(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{d:"M17.7014 6.2965C17.3034 5.89837 16.6474 5.90397 16.2549 6.2965L12 10.5522L7.74505 6.2965C7.35259 5.90397 6.69662 5.89837 6.29855 6.2965C5.90048 6.69464 5.90609 7.35073 6.29855 7.74326L10.5535 11.999L6.29855 16.2546C5.90048 16.6528 5.90048 17.3033 6.29855 17.7014C6.69662 18.0995 7.34699 18.0995 7.74505 17.7014L12 13.4457L16.2549 17.7014C16.653 18.0995 17.3034 18.0995 17.7014 17.7014C18.0995 17.3033 18.0995 16.6528 17.7014 16.2546L13.4465 11.9989L17.7014 7.74326C18.0939 7.35073 18.0995 6.69464 17.7014 6.2965Z",fill:"currentColor"})})}var l=r(11007),u=r(59820),c=r(11923),d=r(1604),f=r(49296),p=r(8891),h=r.n(p);let m=r(34155).env.NEXT_PUBLIC_SEARCH_URL??"https://template-search.playground.com";function g(e,t){h().track("Search Autocomplete Selection",{originalQuery:e,autocompletedResult:t})}var v=function(e){let{variant:t="default",...r}=e,p="small"===t,h=(0,a.useRef)(null),v=Array.isArray(r.value)?r.value.join(" "):r.value,y=function(e){let t=(0,u.ZP)(`${m}/autocomplete?query=${encodeURIComponent(e)}`,(0,c.W)(d.z.object({matches:d.z.array(d.z.object({result:d.z.string(),blocks:d.z.array(d.z.object({text:d.z.string(),emphasized:d.z.boolean()}))}))})),{keepPreviousData:!0});return(0,a.useMemo)(()=>[{result:e,blocks:[{text:e,emphasized:!0}]},...t.data?.matches.slice(0,5)??[]],[t.data,e])}(v??""),[x,b]=(0,a.useState)(!1),[w,_]=(0,a.useState)(0),j=!!(y.length&&v&&x),C=()=>{b(!1),_(0)},k=(0,a.useRef)(null);return(0,f.p)(k,C),(0,n.jsxs)("form",{ref:k,className:(0,i.cn)("p-2 relative w-full flex items-center bg-white group outline-[3px] hover:outline hover:outline-bg-secondary focus-within:outline focus-within:!outline-action-primary",p?"h-10 min-h-[40px]":"h-12 min-h-[48px]",j?p?"rounded-t-[20px]":"rounded-t-[24px]":"rounded-full",r.className,r.backgroundClass),onSubmit:e=>{e.preventDefault(),r.onSubmit&&r.onSubmit()},onFocus:e=>{b(!0)},onBlur:e=>{e.currentTarget.contains(e.target)||C()},children:[(0,n.jsx)(l.W,{className:(0,i.cn)(p?"text-design-base":"text-design-md ml-1",r.value?"text-fg-secondary":"text-fg-tertiary","w-8 h-8 min-w-[2rem] min-h-[2rem] p-1")}),(0,n.jsx)("input",{ref:h,type:"text",name:"query",id:"query",placeholder:r.placeholder||"Search Poster, Logo, or anything",...r,className:(0,i.cn)("bg-transparent border-none placeholder-fg-tertiary text-fg-tertiary focus:text-fg-primary focus:outline-none w-full",p?"ml-1 font-medium placeholder:font-medium text-design-md":"ml-2 text-[18px]"),autoComplete:"off",onSubmit:()=>{},onKeyDown:e=>{if("ArrowDown"===e.key||"ArrowUp"===e.key){e.preventDefault(),e.stopPropagation(),_(t=>null===t?"ArrowDown"===e.key?0:y.length-1:"ArrowDown"===e.key?Math.min(t+1,y.length-1):"ArrowUp"===e.key?Math.max(t-1,0):t);return}if("Enter"===e.key){if(e.preventDefault(),e.stopPropagation(),j&&null!==w&&y?.[w]){let e=y[w].result;h.current&&r.onChange&&r.onChange({target:{value:e}}),r.onSubmit&&r.onSubmit(e),g(r.value,e),C();return}if(r.value&&r.onSubmit){C(),r.onSubmit(r.value);return}C();return}if("Escape"===e.key){C();return}b(!0),r.onKeyDown&&r.onKeyDown(e)}}),(0,n.jsx)("input",{type:"submit",hidden:!0}),r.value&&(0,n.jsx)(o.z,{className:"rounded-full p-0 h-8 w-8 min-h-[2rem] min-w-[2rem] flex items-center justify-center text-fg-secondary hover:text-fg-primary",onClick:()=>{h.current&&r.onChange&&(r.onChange({target:{value:""}}),h.current.focus())},children:(0,n.jsx)(s,{})}),j&&(0,n.jsxs)("div",{className:(0,i.cn)("absolute -left-[3px] p-[3px] pt-0 -right-[3px] z-30",p?"top-9":"top-12"),children:[(0,n.jsx)("ul",{className:`${r.backgroundClass??"bg-white"} w-full h-full ${p?"rounded-b-[20px] p-1":"rounded-b-[24px] p-2"} relative z-10 border-t border-bg-primary`,children:y.map((e,t)=>{let{blocks:o,result:a}=e;return(0,n.jsxs)("li",{className:`py-1 flex items-center ${r.useDarkerBackground?"hover:bg-bg-secondary":"hover:bg-bg-primary"} text-fg-tertiary pr-4 pl-1 rounded-full cursor-pointer
                  ${w===t?`${r.useDarkerBackground?"bg-bg-secondary":"bg-bg-primary"}`:""}
                  ${p?"gap-1":"gap-1.5"}
                  `,onClick:()=>{h.current&&r.onChange&&(r.onChange({target:{value:a}}),C(),r.onSubmit&&r.onSubmit(a),g(r.value,a))},children:[(0,n.jsx)(l.W,{className:(0,i.cn)("text-fg-tertiary","w-8 h-8 min-w-[2rem] min-h-[2rem] p-1")}),(0,n.jsx)("span",{children:o.map((e,t)=>e.emphasized?e.text:(0,n.jsx)("span",{className:"text-fg-primary font-medium",children:e.text},e.text+t))})]},a)})}),(0,n.jsx)("div",{className:`absolute inset-0 bg-transparent group-hover:bg-bg-secondary group-focus-within:!bg-action-primary ${p?"rounded-b-[21.5px]":"rounded-b-[25.5px]"}`})]})]})}},42625:function(e,t,r){"use strict";r.d(t,{s:function(){return f},Z:function(){return p}});var n=r(85893);r(67294);var i=r(25675),o=r.n(i),a=r(45139),s=r(1233);let l=(0,a.j)("inline-flex items-center rounded-pg-base border px-2.5 py-0.5 text-xs font-bold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",pro:"bg-transparent text-white px-1.5 rounded-pg-md shadow border-none hover:bg-primary/10 [text-shadow:_0_1px_0_rgb(0_0_0_/_80%)]"}},defaultVariants:{variant:"default"}});function u(e){let{className:t,variant:r,...i}=e;return(0,n.jsx)("div",{className:(0,s.cn)(l({variant:r}),t),...i})}var c=r(33299),d=r(78358);let f=()=>{let e=(0,c.useSession)(),t=e.data?.user.subscriptions,r=t?.find(e=>{let{term:t,product:r}=d.Ht(e.stripePriceId)||{};return"daypass"===t&&r===d.QI.PRO_DESIGN}),i=Math.floor(Math.max(0,new Date(r?.currentPeriodEnd||0).getTime()-Date.now())/6e4),a=i<60?`${i}m left`:`${Math.floor(i/60)}h left`;return(0,n.jsxs)(u,{variant:"pro",className:"bg-transparent relative",children:[(0,n.jsx)(o(),{src:"/images/design/pro-badge.png",alt:"Pro Badge",layout:"fill",className:"rounded-full"}),(0,n.jsx)("span",{className:"z-10 text-white",children:a})]})};var p=()=>(0,n.jsxs)(u,{variant:"pro",className:"bg-transparent relative",children:[(0,n.jsx)(o(),{src:"/images/design/pro-badge.png",alt:"Pro Badge",layout:"fill",className:"rounded-lg"}),(0,n.jsx)("span",{className:"z-10 text-white",children:"Pro"})]})},23078:function(e,t,r){"use strict";r.r(t),r.d(t,{SignInContent:function(){return C},default:function(){return k}});var n=r(85893),i=r(7871),o=r(62469),a=r(20293),s=r(38228),l=r(48105),u=r(66751),c=r(67294),d=r(1233);let f=c.forwardRef((e,t)=>{let{className:r,type:i,...o}=e;return(0,n.jsx)("input",{type:i,className:(0,d.cn)("flex h-10 w-full rounded-pg-lg border border-input bg-white px-3 py-2 text-fg-quaternary font-medium text-design-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 hover:ring-2 disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...o})});f.displayName="Input";var p=r(627);function h(){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:"22",height:"22",viewBox:"0 0 814 1150",children:(0,n.jsx)("path",{d:"M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"})})}var m=r(70315),g=r(12526),v=r(38372),y=r(33299),x=r(25675),b=r.n(x),w=r(41664),_=r.n(w),j=r(11163);function C(e){let{redirectUrl:t,hideCloseButton:r}=e,o=(0,j.useRouter)(),u=o.query.redirect,c=t??u??(o.asPath.startsWith("/design")||o.asPath.startsWith("/templates")?o.asPath:"/design"),{email:d,setEmail:g,code:v,setCode:x,loading:w,setLoading:C,error:k,setError:S,resendCodeCountdown:N,resetCodeCountdown:P,emailIsInUse:L,setEmailIsInUse:T,page:O,setPage:R,back:A,emailLoginFF:I}=(0,s.Bd)(),{appleLoginFF:M}=(0,s.ek)();return(0,n.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-center",children:[(0,n.jsx)("div",{className:"hidden md:block relative w-1/2 p-4 pr-0",children:(0,n.jsx)(b(),{src:"/images/sign_in_grid_new_2x.jpg",alt:"Image Grid",objectFit:"cover",width:803,height:967})}),(0,n.jsxs)("div",{className:"w-full md:w-1/2 p-8 flex flex-col justify-center",children:[O===s.Bv.LOGIN_OPTIONS&&(0,n.jsxs)("div",{children:[(0,n.jsx)(_(),{href:"/design",className:"flex justify-center mb-6 md:mb-12",children:(0,n.jsx)("img",{src:"/logos/logo-dark.png",className:"h-8 md:h-10",alt:"Playground logo"})}),(0,n.jsx)("div",{className:"text-fg-tertiary font-medium text-center text-design-sm mb-4",children:"Sign up to make your first design"}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)(l.z,{variant:"action-secondary",size:"lg",className:"flex items-center justify-center w-full gap-2",onClick:()=>(0,y.signIn)("google",c?{callbackUrl:c.toString()}:void 0),children:[(0,n.jsx)(m.Z,{}),"Continue with Google"]}),M&&(0,n.jsxs)(l.z,{variant:"secondary",size:"lg",className:"flex items-center justify-center w-full gap-2",onClick:()=>(0,y.signIn)("apple",c?{callbackUrl:c.toString()}:void 0),children:[(0,n.jsx)(h,{}),"Continue with Apple"]}),I&&(0,n.jsxs)(l.z,{variant:"secondary",size:"lg",className:"flex items-center justify-center w-full gap-2",onClick:()=>{R(s.Bv.EMAIL_FORM),S(void 0)},children:[(0,n.jsx)(i.L,{}),"Continue with Email"]})]})]}),I&&O===s.Bv.EMAIL_FORM&&(0,n.jsxs)("form",{className:"mt-4",onSubmit:async e=>{if(e.preventDefault(),e.stopPropagation(),S(void 0),!(0,a.n)(d)){S("Invalid email address");return}C(!0);let t=await fetch("/api/auth/email",{method:"POST",body:JSON.stringify({email:d})}),{inUse:r,provider:n}=await t.json();if(r&&"google"===n){console.log("Email in use with google, switching to Google SSO"),(0,y.signIn)("google",{email:d});return}T(r);try{let{error:e,status:t,ok:r}=await (0,y.signIn)("email",{email:d,redirect:!1,callbackUrl:c})||{};console.log("signIn email",r,t,e),r&&200===t?(R(s.Bv.VERIFICATION_CODE),P(),S(void 0)):429===t?S("Too many attempts. Please try again later."):S(e||"An error occurred")}catch(e){console.log("Error signing in with email",e),e instanceof TypeError&&e.message.includes("Invalid URL")?S("Too many attempts. Please try again later."):S("An error occurred. Please try again later.")}C(!1)},children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsxs)("div",{className:"flex flex-row items-center",children:[(0,n.jsx)(E,{onClick:A}),(0,n.jsx)("h1",{className:"text-lg text-fg-secondary font-semibold",children:"What's your email?"})]}),(0,n.jsx)("p",{className:"text-fg-tertiary font-medium text-design-sm mb-2 mt-2",children:"We'll check if you have an account, and help create one if you don't."})]}),(0,n.jsx)(f,{type:"email",placeholder:"ada@example.com",className:"mb-2",value:d,onChange:e=>g(e.target.value),autoFocus:!0}),(0,n.jsx)(l.z,{variant:"action-secondary",className:"gap-2 w-full",disabled:!d||w,size:"lg",type:"submit",children:w?(0,n.jsx)(p.s8,{}):"Continue"})]}),I&&O===s.Bv.VERIFICATION_CODE&&(0,n.jsxs)("form",{className:"mt-4",onSubmit:e=>{e.preventDefault(),e.stopPropagation(),C(!0),S(void 0),fetch("/api/auth/email/verify",{method:"POST",body:JSON.stringify({email:d,code:v})}).then(e=>e.json()).then(e=>{if(e.url)window.location.href=e.url;else throw console.log(e),C(!1),Error(e.error??"Could not verify email")}).catch(e=>{S(e.message),C(!1)})},children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsxs)("div",{className:"flex flex-row items-center",children:[(0,n.jsx)(E,{onClick:A}),(0,n.jsx)("h1",{className:"text-lg text-fg-secondary font-semibold",children:"Check your email to finish"})]}),(0,n.jsx)("p",{className:"text-fg-tertiary font-medium text-design-sm mb-2 mt-2",children:L?`Once you enter the code we sent to ${d}, you’ll be all logged in.`:`Enter the code we sent to ${d} to finish signing up.`})]}),(0,n.jsx)(f,{type:"text",placeholder:"Enter code",className:"mb-2",value:v,onChange:e=>x(e.target.value),autoFocus:!0}),(0,n.jsx)(l.z,{variant:"action-secondary",type:"submit",className:"gap-2 w-full",disabled:!v||w,size:"lg",children:w?(0,n.jsx)(p.s8,{}):"Continue"}),(0,n.jsxs)("div",{className:"flex text-fg-tertiary text-sm mt-1 w-full gap-1 justify-center",children:["Didn't get the code?",N>0?(0,n.jsxs)("span",{children:["Resend in ",N," seconds"]}):(0,n.jsx)("button",{className:"hover:underline hover:cursor-pointer",type:"button",onClick:async()=>{let{error:e,status:t,ok:r,url:n}=await (0,y.signIn)("email",{email:d,redirect:!1,callbackUrl:c})||{};r&&200===t?(P(),S(void 0)):S(e||"An error occured")},children:"Resend code"})]})]}),k&&(0,n.jsx)("div",{className:"text-pai-error-red text-sm mt-2 text-center w-full",children:k})]})]})}function k(e){let{open:t,onOpenChange:r,redirectUrl:i,hideCloseButton:o}=e;return(0,v.Z)()?null:(0,n.jsx)(g.Z,{children:(0,n.jsx)(u.Vq,{open:t,onOpenChange:e=>{r?.(e)},children:(0,n.jsx)(u.cZ,{hideCloseButton:o,className:"bg-white py-0 pr-0 px-4 md:px-0 mx-auto max-w-[calc(100%-2rem)] md:max-w-3xl min-h-[240px]",children:(0,n.jsx)(C,{redirectUrl:i,hideCloseButton:o})})})})}let E=e=>{let{onClick:t}=e;return(0,n.jsx)("button",{onClick:t,type:"button",children:(0,n.jsx)(o.BNd,{className:"h-6 w-6 text-fg-secondary -translate-x-1"})})}},90644:function(e,t,r){"use strict";r.d(t,{K:function(){return U}});var n=r(85893),i=r(48105),o=r(67294),a=r(2113),s=r(62469),l=r(8891),u=r.n(l),c=r(1233);let d=a.fC,f=e=>(0,n.jsx)(a.xz,{...e,className:(0,c.cn)("data-[state=open]:bg-bg-primary",e.className)});a.ZA,a.Uv;let p=a.Tr;a.Ee;let h=o.forwardRef((e,t)=>{let{className:r,inset:i,children:o,...l}=e;return(0,n.jsxs)(a.fF,{ref:t,className:(0,c.cn)("data-[state=open]:bg-bg-primary","relative flex gap-1.5 cursor-default select-none items-center rounded-design-md px-4 py-3 h-11 font-medium text-design-base text-fg-secondary outline-none focus:bg-bg-secondary",i&&"pl-8",r),...l,children:[o,(0,n.jsx)(s.XCv,{className:"ml-auto h-4 w-4"})]})});h.displayName=a.fF.displayName;let m=o.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(a.tu,{ref:t,className:(0,c.cn)("z-[150] min-w-[8rem] overflow-hidden rounded-design-md bg-bg-primary p-1 text-pg-00 shadow-lg 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",r),sideOffset:8,...i})});m.displayName=a.tu.displayName;let g=o.forwardRef((e,t)=>{let{className:r,sideOffset:i=4,...o}=e;return(0,n.jsx)(a.Uv,{children:(0,n.jsx)(a.VY,{ref:t,sideOffset:i,className:(0,c.cn)("z-[150] min-w-[8rem] overflow-hidden rounded-design-md bg-bg-primary p-1 text-pg-00 shadow-md","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",r),...o})})});g.displayName=a.VY.displayName;let v=o.forwardRef((e,t)=>{let{className:r,inset:i,mixpanelEvent:o,mixpanelKey:s,...l}=e;return(0,n.jsx)(a.ck,{ref:t,className:(0,c.cn)("relative flex gap-2 cursor-default select-none items-center rounded-design-md px-4 py-3 h-11 font-medium text-design-base text-fg-secondary outline-none focus:bg-bg-secondary focus:text-fg-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i&&"pl-8",r),onSelect:e=>{o&&u().track(o,{key:s}),l.onSelect?.(e)},...l})});v.displayName=a.ck.displayName,o.forwardRef((e,t)=>{let{className:r,children:i,checked:o,withCheckmark:l=!0,...u}=e;return(0,n.jsxs)(a.oC,{ref:t,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-pg-base py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-bg-secondary focus:text-fg-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),checked:o,...u,children:[l&&(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(a.wU,{children:(0,n.jsx)(s.nQG,{className:"h-4 w-4"})})}),i]})}).displayName=a.oC.displayName,o.forwardRef((e,t)=>{let{className:r,children:i,...o}=e;return(0,n.jsxs)(a.Rk,{ref:t,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-pg-base py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-bg-secondary focus:text-fg-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...o,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(a.wU,{children:(0,n.jsx)(s.jXb,{className:"h-4 w-4 fill-current"})})}),i]})}).displayName=a.Rk.displayName;let y=o.forwardRef((e,t)=>{let{className:r,inset:i,...o}=e;return(0,n.jsx)(a.__,{ref:t,className:(0,c.cn)("relative flex gap-2 cursor-default select-none items-center rounded-design-md px-4 py-3 h-11 font-medium text-design-base text-fg-primary outline-none focus:bg-bg-secondary focus:text-fg-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i&&"pl-8",r),...o})});y.displayName=a.__.displayName;let x=o.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(a.Z0,{ref:t,className:(0,c.cn)("h-px my-1 bg-bg-secondary",r),...i})});x.displayName=a.Z0.displayName;var b=r(50886),w=r(38372),_=r(11163),j=r(22227);function C(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.344 4h7.312c1.077 0 1.966 0 2.681.077.747.081 1.421.256 2.014.687a4 4 0 01.885.885c.431.593.606 1.268.687 2.014.077.715.077 1.604.077 2.681V13.656c0 1.077 0 1.966-.077 2.681-.081.747-.256 1.421-.687 2.014-.247.34-.545.638-.885.885-.593.431-1.267.606-2.014.687-.715.077-1.604.077-2.681.077H8.344c-1.077 0-1.966 0-2.681-.077-.746-.081-1.421-.256-2.014-.687a4 4 0 01-.885-.885c-.431-.593-.606-1.267-.687-2.014C2 15.622 2 14.733 2 13.656V10.344c0-1.077 0-1.966.077-2.681.081-.746.256-1.421.687-2.014a4 4 0 01.885-.885c.593-.431 1.268-.606 2.014-.687C6.378 4 7.267 4 8.344 4zM5.878 6.066c-.576.062-.858.174-1.054.316a2 2 0 00-.442.442c-.142.196-.254.478-.316 1.054-.005.04-.009.08-.012.122h15.892a7.509 7.509 0 00-.012-.122c-.062-.576-.174-.858-.316-1.054a1.998 1.998 0 00-.442-.442c-.196-.142-.478-.254-1.054-.316C17.527 6 16.747 6 15.6 6H8.4c-1.147 0-1.927.001-2.522.066zM4 10.4V10h16v3.6c0 1.147-.001 1.927-.066 2.522-.062.576-.174.858-.316 1.054-.123.17-.273.319-.442.442-.196.142-.478.254-1.054.316C17.527 18 16.747 18 15.6 18H8.4c-1.147 0-1.927-.001-2.522-.066-.576-.062-.858-.174-1.054-.316a1.998 1.998 0 01-.442-.442c-.142-.196-.254-.478-.316-1.054C4 15.527 4 14.747 4 13.6v-3.2zm3.5 2.1a1.5 1.5 0 000 3H9a1.5 1.5 0 000-3H7.5z",clipRule:"evenodd"})})}var k=r(88686);function E(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 12a8 8 0 1116 0 8 8 0 01-16 0zm8-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1.027 7.497c.18-.31.526-.517.922-.517.556 0 .878.311.975.674.096.356-.027.743-.505.968-.931.44-1.52 1.337-1.52 2.319 0 .546.47.99 1.05.99.58 0 1.051-.444 1.051-.99a.61.61 0 01.36-.548c1.437-.677 1.917-2.049 1.601-3.226C14.592 7.997 13.487 7 11.896 7c-1.195 0-2.233.627-2.767 1.546-.278.48-.091 1.082.418 1.344s1.147.086 1.425-.393zM11.896 17c.638 0 1.156-.488 1.156-1.09 0-.6-.518-1.088-1.156-1.088-.638 0-1.156.487-1.156 1.089 0 .601.518 1.089 1.156 1.089z",clipRule:"evenodd"})})}function S(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 21v-3a1 1 0 011-1h9m-7 0v-3a1 1 0 011-1h6m-4 0v-3a1 1 0 011-1h2.5M7 21h10a2 2 0 002-2V9.588c0-3.866-4-6.5-7-6.5s-7 2.634-7 6.5V19a2 2 0 002 2z"})})}function N(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 6a3 3 0 013-3h10a3 3 0 013 3v12a3 3 0 01-3 3H7a3 3 0 01-3-3v-1a1 1 0 110-2v-2a1 1 0 110-2V9a1 1 0 010-2V6zm2 12v-1a1 1 0 100-2v-2a1 1 0 100-2V9a1 1 0 000-2V6a1 1 0 011-1h7v14H7a1 1 0 01-1-1zm10 1h1a1 1 0 001-1V6a1 1 0 00-1-1h-1v14z",clipRule:"evenodd"})})}function P(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{fill:"currentColor",d:"M4.843 17.154l.983.185a1 1 0 00-.206-.814l-.777.63zM4 20l-.934-.358a1 1 0 00.996 1.356L4 20zm3.571-.599l.472-.881a1 1 0 00-.745-.08l.273.961zM20 12c0 4.09-3.527 7.5-8 7.5v2c5.468 0 10-4.2 10-9.5h-2zm-8-7.5c4.473 0 8 3.41 8 7.5h2c0-5.3-4.532-9.5-10-9.5v2zM4 12c0-4.09 3.527-7.5 8-7.5v-2C6.532 2.5 2 6.7 2 12h2zm1.62 4.525A7.163 7.163 0 014 12H2c0 2.18.774 4.186 2.065 5.783l1.555-1.258zm-.686 3.834c.37-.967.694-1.969.892-3.02l-1.966-.37c-.168.892-.448 1.772-.794 2.672l1.868.718zm2.364-1.92c-1.068.304-2.175.49-3.36.563l.124 1.996a17.737 17.737 0 003.783-.635l-.547-1.924zM12 19.5a8.371 8.371 0 01-3.957-.98L7.1 20.283A10.37 10.37 0 0012 21.5v-2zM9.25 12a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zM13.25 12a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zM17.25 12a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0z"})})}function L(e){return(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{fill:"currentColor",d:"M17.176 4h2.76l-6.03 6.777L21 20h-5.554l-4.35-5.593L6.116 20H3.355l6.45-7.25L3 4h5.695l3.933 5.113L17.176 4zm-.969 14.375h1.53L7.864 5.54h-1.64l9.983 12.836z"})})}var T=r(51879),O=r(41664),R=r.n(O);function A(e){let{href:t,children:r,target:i,...a}=e,s=(0,_.useRouter)(),l=o.useRef(null);return(0,n.jsx)(v,{ref:l,...a,onSelect:e=>a.onSelect?a.onSelect(e):t?s.push(t):void 0,mixpanelEvent:a.mixpanelEvent,mixpanelKey:a.mixpanelKey,children:t?(0,n.jsx)(R(),{href:t,className:(0,c.cn)("cursor-default flex flex-row gap-2",a.className),onClick:e=>{if(i)return e.stopPropagation();l.current?.click(),e.stopPropagation()},...i?{target:i}:{},children:r}):r})}var I=r(33299),M=r(44746),D=r(42625),F=r(71864),z=r(50497);function B(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",...e,children:(0,n.jsx)("path",{d:"M9 5.5v13l8-6.5-8-6.5z",stroke:"currentColor",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})})}function U(e){var t;let r=(0,w.Z)(),{pathname:a,...s}=(0,_.useRouter)(),l=(0,M.rP)(),u=(0,M.pz)(),v=(0,M.kM)(),O=!!r,{setLoginDialogMeta:R,setUpgradeDialogMeta:U}=(0,F.mr)(),[V,$]=o.useState(!1),H=(0,I.useSession)(),Z=r?.name??r?.displayName??r?.email?.split("@")[0]??"";return O?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(z.N,{buttonSize:"lg"}),!l&&O&&(0,n.jsx)(i.z,{className:"gap-[6px] w-full justify-start hidden md:flex",size:"lg",onClick:()=>U({open:!0}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.I,{}),"Upgrade to Pro"]})}),(0,n.jsxs)(d,{open:V,onOpenChange:$,children:[(0,n.jsx)(f,{asChild:!e.children,children:e.children?(0,n.jsx)(n.Fragment,{children:e.children}):(0,n.jsxs)(i.z,{variant:"/search"===a?"secondary":"ghost",className:(0,c.cn)("w-full text-left gap-2 justify-start"),size:"lg",children:[(0,n.jsxs)(b.qE,{className:"h-6 w-6",children:[(0,n.jsx)(b.F$,{src:r?.image??""}),(0,n.jsx)(b.Q5,{className:"text-xs",children:(t=r?.name??r?.displayName??r?.email?.split("@")[0]??"",t?.split(" ").map(e=>e[0]).join(""))})]}),(0,n.jsx)("span",{className:"block max-w-full truncate text-ellipsis",children:Z})]})}),(0,n.jsxs)(g,{align:"start",className:"min-w-[240px]",children:[(0,n.jsxs)(y,{className:"flex items-center justify-between",hidden:!O,children:[(0,n.jsx)("span",{className:"flex-grow-0",children:r?.name??r?.displayName??r?.email}),l&&(u?(0,n.jsx)(D.s,{}):(0,n.jsx)(D.Z,{}))]}),(0,n.jsx)(x,{className:"mt-0",hidden:!O}),(0,n.jsxs)(p,{children:[!l&&O&&(0,n.jsxs)(A,{onSelect:async()=>{$(!1),U({open:!0})},hidden:!O,children:[(0,n.jsx)(j.I,{}),"Upgrade to Pro"]}),(0,n.jsxs)(A,{onSelect:async()=>v?alert("You must manage your subscription on the mobile app."):s.push("/design/account"),hidden:!O,children:[(0,n.jsx)(C,{}),"Account"]}),(0,n.jsxs)(A,{href:"/design/pricing",children:[(0,n.jsx)(k.c,{}),"Pricing"]}),(0,n.jsxs)(h,{children:[(0,n.jsx)(E,{}),"Help"]}),(0,n.jsxs)(m,{className:"min-w-[224px]",children:[(0,n.jsxs)(A,{href:T.oS,target:"_blank",children:[(0,n.jsx)(B,{}),"Watch Tutorial"]}),(0,n.jsxs)(A,{href:T.gO,target:"_blank",children:[(0,n.jsx)(N,{}),"FAQs"]}),(0,n.jsxs)(A,{onSelect:()=>window.Intercom?.("showNewMessage"),children:[(0,n.jsx)(P,{}),"Live chat"]}),(0,n.jsxs)(A,{href:T.a3,target:"_blank",children:[(0,n.jsx)(N,{}),"Status"]}),(0,n.jsxs)(A,{href:T.N$,target:"_blank",children:[(0,n.jsx)(L,{}),"Follow on X"]})]}),(0,n.jsxs)(A,{onSelect:async()=>{O?await (0,I.signOut)({redirect:!1}):R({open:!0})},children:[(0,n.jsx)(S,{}),O?"Logout":"Sign in"]})]})]})]})]}):"loading"===H.status?null:(0,n.jsxs)("div",{className:"w-full flex gap-2 pl-1",children:[(0,n.jsx)(i.z,{variant:"secondary",className:"flex-1",onClick:()=>R({open:!0}),children:"Log In"}),(0,n.jsx)(i.z,{variant:"action-secondary",className:"flex-1",onClick:()=>R({open:!0}),children:"Sign Up"})]})}},50497:function(e,t,r){"use strict";r.d(t,{N:function(){return y},X:function(){return v}});var n=r(85893),i=r(1233),o=r(48105),a=r(66751),s=r(67294);function l(e){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("rect",{x:"6",y:"2",width:"12",height:"20",rx:"3",stroke:"#7C766F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M11 5H13",stroke:"#7C766F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}var u=r(32478),c=r(51879),d=r(57718),f=r(8891),p=r.n(f),h=r(41664),m=r.n(h),g=r(11163);function v(e){let{open:t,setOpen:r}=e;return(0,n.jsx)(a.Vq,{open:t,onOpenChange:e=>{r(e)},children:(0,n.jsxs)(a.cZ,{hideCloseButton:!0,className:"bg-white px-14 pb-8 pt-4 mx-auto min-w-0 w-auto min-h-[240px] bg-bg-primary",children:[(0,n.jsx)("button",{className:"absolute top-4 left-4",onClick:()=>r(!1),type:"button",children:(0,n.jsx)(u.Z,{})}),(0,n.jsxs)(m(),{href:c.jB,className:"flex flex-col items-center justify-center gap-4 font-semibold text-[20px]",children:["Download iOS app",(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:"https://cdn.playground.com/cms-media/download-app-qr-code.png",className:"bg-white border-4 border-black w-64 mt-4 h-64 border-solid rounded-xl",alt:"QR code"}),(0,n.jsx)("div",{className:"text-design-base mb-2",children:"Point your camera at this QR code"}),(0,n.jsx)("img",{src:"https://cdn.playground.com/cms-media/Download_on_the_App_Store_Badge.svg",className:"h-10",alt:"Download on the app store"})]})]})]})})}function y(e){let{className:t,buttonSize:r}=e,a=(0,g.useRouter)(),[u,f]=(0,s.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{open:u,setOpen:f}),(0,n.jsx)(o.z,{className:(0,i.cn)("gap-[6px] w-full justify-start hidden md:flex",t),size:r,onClick:()=>{let e=(0,d.T)();if(p().track("Download iOS app clicked",{opensQRCode:!e}),e)return a.push(c.jB);f(!0)},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l,{}),"Download iOS app"]})})]})}},21426:function(e,t,r){"use strict";r.d(t,{k:function(){return k}});var n=r(85893),i=r(48105),o=r(598),a=r(34986),s=r.n(a),l=r(67294),u=r(65105),c=r(1233),d=r(69306);function f(e){let{next:t,text:r,cta:o="Next",variant:a="action-secondary"}=e;return(0,n.jsxs)("div",{style:{boxShadow:"0px 4px 64px 0px rgba(0, 0, 0, 0.24)"},className:"fixed lg:!shadow-none max-lg:py-4 bottom-0 z-[150] text-center max-lg:bg-bg-primary max-lg:shadow-2xl max-lg:rounded-t-xl w-full px-8 lg:bottom-12 flex justify-center gap-3 flex-col items-center",children:[(0,n.jsx)("h1",{className:"font-semibold text-xl",children:r}),(0,n.jsx)(i.z,{onClick:t,variant:a,className:`!py-4 ${"action-primary"===a?"!px-4":"!px-12"} max-lg:w-full font-semibold`,children:o})]})}var p=r(8891),h=r.n(p);function m(e){(0,l.useEffect)(()=>{h().track(e)},[e])}var g=r(66991);let v="clyyxslod0016oqlxalmxno53",y=[{id:1,url:"https://cdn.playground.com/onboarding/design/1f958464555a942192a07f9d7a1cb04b.png",width:768,height:1024},{id:2,url:"https://cdn.playground.com/onboarding/design/3ab0dc0d9c0b40d41008a60c6e688f35.jpeg",width:768,height:1344},{id:3,url:"https://cdn.playground.com/onboarding/design/45f1300d745ed4215c396f7452a234f7.jpeg",width:832,height:1216},{id:4,url:"https://cdn.playground.com/onboarding/design/725c6a6e2182e8be898394f6b02dcfe4.jpeg",width:768,height:1024},{id:5,url:"https://cdn.playground.com/onboarding/design/8f911a689ede538ccb6de6506154fa19.png",width:768,height:1024},{id:6,url:"https://cdn.playground.com/onboarding/design/bdc0f925f6a30b639e378664b87d34e4.png",width:768,height:1024},{id:7,url:"https://cdn.playground.com/onboarding/design/d2746f4fcd34f012911a639ff6e69b2e.jpeg",width:768,height:1344},{id:8,url:"https://cdn.playground.com/onboarding/design/dfad50b1f652257006526b85ebeb2dfe.png",width:768,height:1024},{id:9,url:"https://cdn.playground.com/onboarding/design/eea059941070b41533acd996ad5d0ab7.jpeg",width:768,height:1024},{id:10,url:"https://cdn.playground.com/onboarding/design/fb2455b402a203fafc53dee82c665db5.png",width:832,height:1216}];var x=r(11163),b=r(37646),w=r(32178);let _=function(e){let t=[...e];for(let e=t.length-1;e>0;e--){let r=Math.floor(Math.random()*(e+1));[t[e],t[r]]=[t[r],t[e]]}return t}(["Education (Teacher, students, etc)","Small business (Startup, shop, etc)","Large company (100+ employees)","Personal (Home, family or friends)"]),j="Other",C={0:function(e){let{next:t}=e,r=(0,o.a)(500);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:`flex flex-col items-center justify-center max-w-md mx-auto text-center h-full space-y-2 px-3 ${s().fadeIn} ${r?"":s().hidden}`,children:[(0,n.jsx)("img",{src:"https://cdn.playground.com/onboarding/design/image%20grid.png",width:800,height:672,className:"max-h-[50vh]  mb-4 object-contain delay-300 -mx-4",alt:""}),(0,n.jsx)("h1",{className:"text-2xl font-semibold delay-500",children:"Welcome to Playground"}),(0,n.jsx)("p",{className:"text-lg text-fg-secondary",style:{transitionDelay:"800ms"},children:"Design anything with thousands of templates to create logos, t-shirts, posters, and more."}),(0,n.jsx)(i.z,{variant:"action-secondary",className:"!py-6 !px-12 !mt-6",style:{transitionDelay:"800ms"},onClick:()=>{h().track("Tapped continue on NUX welcome"),t()},children:"Get started for free"})]})})},1:function(e){let{next:t}=e,{data:r}=(0,g.Xt)({type:"MAJOR",visibility:"ga"}),[i,o]=(0,l.useState)(v);m("Viewed NUX Category Selection");let a=(0,d.OV)("md"),p=(0,d.OV)("lg"),y=a?2:p?3:5,x=(0,l.useMemo)(()=>{let e=Array(18).fill(null);return(r??[])?.forEach((t,r)=>{let n={2:0,3:0,5:7}[y];if(t.id===v)e[n]=t;else{let r=e.findIndex(e=>!e);e[r]=t}}),e},[y,r]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-full h-full flex flex-col p-12 max-md:pb-0 md:pb-[144px] max-w-[100vw] items-center md:justify-center gap-8",children:(0,n.jsx)("ul",{className:"grid gap-1 grid-cols-2 md:grid-cols-3 lg:grid-cols-5 w-full max-w-screen-lg",children:x.map(e=>e?(0,n.jsxs)("li",{className:"relative",children:[e.id===i&&(0,n.jsx)("div",{className:`absolute inset-0 ${s().GlowyShadow}`}),(0,n.jsxs)(u.Zb,{className:(0,c.cn)("flex flex-col gap-3 relative overflow-hidden1 aspect-[14/10] group !p-3 !rounded-3xl","overflow-hidden",e.id===i?"outline-[3px] outline-action-primary outline z-20":"opacity-30 "),onClick:()=>{o(e.id),t()},children:[(0,n.jsx)("div",{className:"absolute inset-0 p-0",children:(0,n.jsx)("img",{src:e.previewImageUrls?.[0],alt:e.name,className:(0,c.cn)("object-top","h-full w-full object-cover rounded-design-sm","blur-3xl opacity-50")})}),(0,n.jsx)("h2",{className:"relative font-[600] z-10",children:e.name}),(0,n.jsx)("div",{className:(0,c.cn)("absolute top-12 rotate-[6deg] left-1/2 -translate-x-1/2 w-1/2 flex items-center justify-center","aspect-[10/14] rounded-design-sm","shadow-design-md"),children:(0,n.jsx)("img",{src:e.previewImageUrls?.[0],alt:e.name,className:(0,c.cn)("pointer-events-none","object-top","h-full object-cover w-full rounded-design-sm","aspect-[10/14]")})})]})]},e.id):null)})}),(0,n.jsx)(f,{text:"1. Start by picking a type of design you want to make",next:()=>{h().track("Tapped continue on NUX Category"),t()}})]})},2:function(e){let{next:t}=e;(0,o.a)(500);let r=(0,d.OV)("md"),i=(0,d.OV)("lg"),a=r?2:i?3:5,[u,p]=(0,l.useState)(3);m("Viewed NUX Template Selection");let g=(0,l.useMemo)(()=>{let e=Array(10).fill(null);return y.forEach((t,r)=>{let n={2:0,3:0,5:5}[a];if(3===t.id)e[n]=t;else{let r=e.findIndex(e=>!e);e[r]=t}}),e.reduce((t,r,n)=>(y.length,n%2==0&&t.push(e.slice(n,n+2)),t),[])},[a]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-full h-full flex flex-col p-12 max-md:pb-0 md:pb-24 max-w-[100vw] items-center lg:justify-center gap-8",children:(0,n.jsx)("ul",{className:"grid gap-1 grid-cols-2 md:grid-cols-3 lg:grid-cols-5 max-w-screen-lg max-h-[50vh] w-auto",style:{aspectRatio:5===a?"16/9":void 0},children:g.map((e,r)=>(0,n.jsx)("div",{className:"flex flex-col gap-1 !max-h-[50vh]",children:e.map(e=>e?(0,n.jsxs)("div",{className:"!relative",children:[u===e?.id&&(0,n.jsx)("div",{className:`${s().GlowyShadow}`}),(0,n.jsx)("img",{alt:"",src:e.url,className:(0,c.cn)("rounded-3xl z-10 relative",u===e?.id?"outline-[3px] outline-action-primary rounded-3xl outline":"opacity-25"),style:{aspectRatio:`${e.width} / ${e.height}`},onClick:()=>{t(),p(e.id)}})]},e.url):null)},r))})}),(0,n.jsx)(f,{next:()=>{h().track("Tapped continue on NUX Template"),t()},text:"2. Choose a design that inspires you"})]})},3:function(e){let{next:t}=e;return(0,d.OV)("md"),(0,d.OV)("lg"),m("Viewed NUX Edit"),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-full h-full flex flex-col justify-center items-center p-12 max-md:pb-0 md:pb-[144px] max-w-[100vw] items-center max-md:justify-start md:justify-center gap-8",children:(0,n.jsx)("div",{style:{aspectRatio:"1 / 1.4590909091 !important"},className:"max-w-[640px] max-h-full  md:bg-[#F1F0EF]/80 md:border-4 border-white md:rounded-3xl flex justify-center  md:items-center pt-6",children:(0,n.jsx)("img",{onClick:()=>t(),alt:"Edit your design",className:"object-contain h-auto w-auto max-h-full max-md:object-top",src:"https://cdn.playground.com/onboarding/design/Frame%202147221313.png"})})}),(0,n.jsx)(f,{text:"3. Change it and make it your own",next:()=>{h().track("Tapped continue on NUX Edit"),t()}})]})},4:function(e){let{next:t}=e;return(0,d.OV)("md"),(0,d.OV)("lg"),m("Viewed NUX Export"),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-full h-full flex flex-col justify-center items-center p-12 max-md:pb-0 md:pb-[144px] max-w-[100vw] max-md:justify-start md:justify-center gap-8",children:(0,n.jsxs)("div",{className:"max-w-[640px] max-h-full md:aspect-[1.124/1] md:bg-[#F1F0EF]/80 md:border-4 border-white md:rounded-3xl flex justify-center  md:items-center p-2",children:[(0,n.jsx)("img",{onClick:()=>t(),alt:"Seal design",className:"object-contain h-auto w-auto max-h-full max-md:object-top hidden md:block",src:"https://cdn.playground.com/onboarding/design/seal_desktop.png"}),(0,n.jsx)("img",{onClick:()=>t(),alt:"Seal design",className:"object-contain h-auto w-auto max-h-full max-md:object-top md:hidden",src:"https://cdn.playground.com/onboarding/design/seal_mobile.png"})]})}),(0,n.jsx)(f,{text:"4. Export your design and use it anywhere",cta:"Start your first design",variant:"action-primary",next:()=>{h().track("Tapped continue on NUX Export"),t()}})]})},5:function(e){let{next:t}=e;m("Viewed Design Tutorial Who Are You");let[r,o]=(0,w.I)("userGroup",null),[a,s]=(0,l.useState)(!1),u=e=>{o(e),h().track("Selected User Group in NUX",{userGroup:e}),h().people.set({user_group:e}),t()};return(0,n.jsxs)("div",{style:{boxShadow:"0px 4px 64px 0px rgba(0, 0, 0, 0.24)"},className:"fixed max-md:pb-24 lg:!shadow-none max-lg:py-4 lg:top-12 bottom-0 z-[150] text-center max-lg:bg-bg-primary max-lg:shadow-2xl max-lg:rounded-t-xl w-full px-8 lg:bottom-12 flex justify-center gap-3 flex-col items-center",children:[(0,n.jsx)("h1",{className:"font-semibold text-xl max-md:text-left",children:"Tell us what you most need Playground for"}),(0,n.jsx)("p",{className:"text-fg-secondary text-[16px] max-md:text-left md:mb-4",children:"Help us create the best experience for you."}),(0,n.jsx)("ul",{className:"max-w-sm space-y-4 ",children:[..._,j].map(e=>(0,n.jsx)(i.z,{onClick:()=>{if(e===j){s("");return}u(e)},size:"lg",variant:"secondary",className:`w-full ${e===j&&!1!==a?"bg-bg-tertiary":""}`,children:e},e))}),!1!==a&&(0,n.jsxs)("div",{className:"flex flex-col justify-end max-w-sm items-stretch w-full mt-4 gap-2",children:[(0,n.jsx)("textarea",{id:"",value:a,onChange:e=>{s(e.target.value)},placeholder:"What best describes you?",autoFocus:!0,className:"border-[3px] border-white bg-bg-primary py-3 px-4 placeholder-fg-quaternary text-fg-primary w-full resize-none rounded-design rounded-design-md outline-none"}),(0,n.jsx)(i.z,{onClick:()=>{u(`${j}: ${a}`)},variant:"action-secondary",className:"place-self-end",children:"Submit"})]})]})}};function k(){let[e,t]=(0,l.useState)(!1),r=(0,x.useRouter)(),i=void 0!==r.query.notour,o=void 0!==r.query.q;return(i&&(b.d.didHaveNoTour=!0),(0,l.useEffect)(()=>{if("undefined"==typeof document)return;let e=document.referrer?.toLowerCase(),r=b.d.didClickStartDesignHomePage;!(localStorage.seenDesignTutorial||e?.includes("google.com")&&!e?.includes("accounts.google.com")&&!r||e?.includes("bing.com")&&!r)&&(navigator.userAgent?.toLowerCase()?.includes("googlebot")||(h().track("Presenting Design NUX"),t(!0)))},[]),!e||i||o||b.d.didHaveNoTour)?null:(0,n.jsx)(E,{})}function E(){let[e,t]=(0,l.useState)(!1),r=(0,o.a)(500),[i,a]=(0,l.useState)(0),s=C[i],[u,c]=(0,w.I)("userGroup",null);return(m("Viewed NUX Welcome"),e)?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:`fixed inset-0 backdrop-blur-xl bg-[#F1F0EF]/90 z-[900] duration-1000 transition-all ${r?"":"opacity-0 backdrop-blur-none pointer-events-none"}`}),(0,n.jsxs)("div",{className:`fixed inset-0 z-[901] bg-transparent ${r?"":"opacity-0"}`,children:[0!==i&&5!==i&&(0,n.jsx)("p",{className:"uppercase text-gray-70 font-semibold absolute top-3 left-0 right-0 text-center text-design-xs",children:"Tutorial"}),s&&(0,n.jsx)(s,{next:()=>{let e=Object.keys(C).length,r=()=>{t(!0),localStorage.seenDesignTutorial=!0,h().track("Completed Design NUX")};if(i===e-1){r();return}return 4===i&&u?r():a(e=>e+1)}})]})]})}},28908:function(e,t,r){"use strict";r.d(t,{b:function(){return a}});var n=r(11923),i=r(59820),o=r(1604);function a(){let{data:e}=(0,i.ZP)("/api/design/downloads",(0,n.W)(o.z.object({canDownload:o.z.boolean()})));return e?.canDownload??!0}},71864:function(e,t,r){"use strict";r.d(t,{gf:function(){return d},mr:function(){return h},u9:function(){return p}});var n=r(85893),i=r(83532),o=r(11163),a=r(67294),s=r(49870),l=r(60505),u=r(75362);let c=e=>fetch(e).then(e=>e.json()),d=[{displayText:"9:16",width:768,height:1344},{displayText:"2:3",width:832,height:1216},{displayText:"3:4",width:768,height:1024},{displayText:"1:1",width:1024,height:1024},{displayText:"4:3",width:1024,height:768},{displayText:"3:2",width:1216,height:832},{displayText:"16:9",width:1344,height:768}],f=a.createContext(null);function p(e){let t=function(){let e=(0,o.useRouter)(),t=e.query.fileSlug,r=t?(0,l.OR)(t):void 0,n=(0,a.useRef)(null),[d,f]=(0,a.useState)({open:!1}),[p,h]=(0,a.useState)({open:!1}),m=(0,a.useRef)(null),[g,v]=(0,a.useState)(0),[y,x]=(0,a.useState)(!1),[b,w]=(0,a.useState)(""),[_,j]=(0,a.useState)(!1),[C,k]=(0,a.useState)(!1),[E,S]=(0,a.useState)(!1),[N,P]=(0,a.useState)(!1),[L,T]=(0,a.useState)(0),O=(0,a.useRef)(null),R=(0,a.useRef)(null),[A,I]=(0,a.useState)(!1),[M,D]=(0,a.useState)(!1),{designFile:F,chooseColorPalette:z,makeChanges:B,resize:U,applyPreset:V,tryAgain:$}=(0,i.Yj)(r,f),{versionPointer:H,setVersionPointer:Z,resetVersionPointer:W}=function(e){let{data:t}=(0,i.fE)(e),[r,n]=(0,a.useState)(-1),o=function(e){let{id:t}=e;return(0,u.Z)(`/api/design/files/${t}`,async(e,t)=>await fetch(e,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.arg)}),{revalidate:!1})}({id:e});function s(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{persist:!0},a="function"==typeof e?e(r):e,s=t?.DesignFileVersion?.[a]?.id;return s&&i?.persist&&o.trigger({activeDesignFileVersionId:s}),n(a)}return(0,a.useEffect)(()=>{if(r<0&&t?.id){let e=t.DesignFileVersion.findIndex(e=>e.id===t.activeDesignFileVersionId);n(e>=0?e:0)}},[t,r]),{versionPointer:r,setVersionPointer:s,resetVersionPointer:()=>s(-1,{persist:!1})}}(r),q=F?.DesignFileVersion?.[H]?.id,{data:G,mutate:Y}=(0,s.Z)(q?`/api/design/versions/${q}`:null,c),[K,X]=(0,a.useState)(!0),[J,Q]=(0,a.useState)(!1),ee=(0,a.useRef)(void 0);(0,a.useEffect)(()=>{J||q===ee.current||X(!0),ee.current=q},[J,q,X]);let et=e.query.templateSlug,er=F?.templateId??(et?(0,l.OR)(et):void 0),{data:en}=(0,s.Z)(er?`/api/templates/${er}`:null,e=>c(e)),ei=en?.TemplatePresets.find(e=>"original"===e.presetConfigSlug),eo=G?G.content.background.url:t?void 0:ei?.url_jpeg??ei?.url,{data:ea}=(0,s.Z)("/api/templates/clzul8r6f00ku3prjkxixdrjw",e=>c(e)),es=async()=>{try{if(j(!0),!G)throw Error("Design version not found");let e=await $(G?.id);if(!e?.ok)throw Error("Failed to update design");W()}catch(e){console.error("Error updating design:",e)}finally{j(!1)}},el=async e=>{try{j(!0);let t=await V(e,G?.id);if(!t?.ok)throw Error("Failed to update design");W(),k(!0)}catch(e){console.error("Error updating design:",e)}finally{j(!1)}},eu=async e=>{try{j(!0);let t=await U(G?.id,e.width,e.height);if(!t?.ok)throw Error("Failed to update design");W()}catch(e){console.error("Error updating design:",e)}finally{j(!1)}},ec=async()=>{try{j(!0);let e=await B(b,G?.id);if(!e?.ok)throw Error("Failed to update design");W(),k(!0)}catch(e){console.error("Error updating design:",e)}finally{j(!1)}},ed=async e=>{try{j(!0);let t=await z(G?.id,e);if(!t?.ok)throw Error("Failed to update design");W()}catch(e){console.error("Error updating design:",e)}finally{j(!1)}},ef=(0,a.useRef)(null),ep=(0,a.useCallback)(()=>{if(x(!y),y)v(0);else if(n.current&&m.current){let e=n.current.getBoundingClientRect(),t=m.current.getBoundingClientRect();t.width>e.width&&v(t.width-e.width)}},[y]),eh=(0,a.useCallback)(()=>{if(S(!E),E)v(0);else if(n.current&&O.current){let e=n.current.getBoundingClientRect(),t=O.current.getBoundingClientRect();t.width>e.width&&v(t.width-e.width)}},[E]),em=(0,a.useCallback)(()=>{if(P(!N),N)v(0);else if(n.current&&R.current){let e=n.current.getBoundingClientRect(),t=R.current.getBoundingClientRect();t.width>e.width&&v(t.width-e.width)}},[N]),eg=(0,a.useCallback)(()=>{x(!1),S(!1),P(!1),v(0)},[]);return{reset:()=>{w(""),j(!1),k(!1),eg(),D(!1),W()},closeAllDrawers:eg,versionPointer:H,setVersionPointer:Z,toggleResize:eh,showPresets:y,translateLeft:g,setTranslateLeft:v,togglePresets:ep,drawerContainerRef:n,presetsDrawerRef:m,makeChangesText:b,setMakeChangesText:w,loading:_,setLoading:j,canTryAgain:C,setCanTryAgain:k,showResize:E,setShowResize:S,resizeDrawerRef:O,colorDrawerPickerRef:R,handleMakeChanges:ec,handleChooseColorPalette:ed,toggleColorPicker:em,showColorPicker:N,setShowColorPicker:P,designVersion:G,designFile:F,url:eo,tile:M,setTile:D,template:en,handleTryAgain:es,handleResize:eu,handleApplyPreset:el,designCanvasRef:ef,mutateDesignVersion:Y,setShowPresets:x,showDebugInfo:A,setShowDebugInfo:I,coffeeCupsTemplate:ea,upgradeDialogMeta:d,setUpgradeDialogMeta:f,loginDialogMeta:p,originalPreset:ei,setLoginDialogMeta:h,showExploreSidebar:J,setShowExploreSidebar:Q,templateSwitchShouldCreateNewVersion:K,setTemplateSwitchShouldCreateNewVersion:X}}();return(0,n.jsx)(f.Provider,{value:t,children:e.children})}function h(){let e=(0,a.useContext)(f);if(!e)throw Error("useDesignCreate must be used within a DesignCreateProvider");return e}},49338:function(e,t,r){"use strict";r.d(t,{C:function(){return i}});var n=r(75362);function i(){return(0,n.Z)("increment-design-download",e=>fetch("/api/design/downloads",{method:"POST"}))}},27418:function(e,t,r){"use strict";r.d(t,{N:function(){return i}});var n=r(75362);function i(){return(0,n.Z)("increment-template-use",(e,t)=>t.arg.templateId?fetch(`/api/templates/${t.arg.templateId}/u`,{method:"POST"}):null)}},40714:function(e,t,r){"use strict";r.d(t,{z:function(){return d}});var n=r(49582),i=r(78358),o=r(9669),a=r.n(o),s=r(8891),l=r.n(s),u=r(11163),c=r(67294);let d=()=>{let[e,t]=(0,c.useState)(!1),r=(0,u.useRouter)();return{redirectToCheckout:(0,c.useCallback)(async e=>{let{priceId:o,quantity:s=1,successUrl:u,cancelUrl:c}=e;t(!0),l().track("Requested checkout session",{plan:i.wv(o)?.name,priceId:o,quantity:s,successUrl:u,cancelUrl:c,path:r.pathname});try{let{data:{sessionId:e}}=await a().post("/api/payments/create-checkout-session",{price:{id:o},successUrl:r.query?.successUrl||u,cancelUrl:c,quantity:s,metadata:(0,n.JW)(r.query)}),t=await (0,n.d2)();await t?.redirectToCheckout({sessionId:e})}catch(e){console.error(e),t(!1)}},[t,r.query,r.pathname]),loading:e}}},60505:function(e,t,r){"use strict";r.d(t,{OR:function(){return i},bS:function(){return a},zS:function(){return o}});let n=(e,t)=>e.toLowerCase().substring(0,t).replace(/ /g,"-").replace(/[^a-zA-Z0-9\-]/g,"").replace(/-+/g,"-");function i(e){let t=e.split("-").pop();if(!t)throw Error("Invalid design file slug");return t}function o(e){return[n(e.title),e.id].join("-")}function a(e){return n(e.name)}},98928:function(e,t,r){"use strict";r.d(t,{O:function(){return tl}});var n=r(85893),i=r(13346),o=r(12242),a=r(67294),s=r(32621),l=e=>"checkbox"===e.type,u=e=>e instanceof Date,c=e=>null==e;let d=e=>"object"==typeof e;var f=e=>!c(e)&&!Array.isArray(e)&&d(e)&&!u(e),p=e=>f(e)&&e.target?l(e.target)?e.target.checked:e.target.value:e,h=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,m=(e,t)=>e.has(h(t)),g=e=>{let t=e.constructor&&e.constructor.prototype;return f(t)&&t.hasOwnProperty("isPrototypeOf")},v="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function y(e){let t;let r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(!(v&&(e instanceof Blob||e instanceof FileList))&&(r||f(e))))return e;else if(t=r?[]:{},r||g(e))for(let r in e)e.hasOwnProperty(r)&&(t[r]=y(e[r]));else t=e;return t}var x=e=>Array.isArray(e)?e.filter(Boolean):[],b=e=>void 0===e,w=(e,t,r)=>{if(!t||!f(e))return r;let n=x(t.split(/[,[\].]+?/)).reduce((e,t)=>c(e)?e:e[t],e);return b(n)||n===e?b(e[t])?r:e[t]:n},_=e=>"boolean"==typeof e,j=e=>/^\w*$/.test(e),C=e=>x(e.replace(/["|']|\]/g,"").split(/\.|\[/)),k=(e,t,r)=>{let n=-1,i=j(t)?[t]:C(t),o=i.length,a=o-1;for(;++n<o;){let t=i[n],o=r;if(n!==a){let r=e[t];o=f(r)||Array.isArray(r)?r:isNaN(+i[n+1])?{}:[]}if("__proto__"===t)return;e[t]=o,e=e[t]}return e};let E={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},S={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},N={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},P=a.createContext(null),L=()=>a.useContext(P);var T=(e,t,r,n=!0)=>{let i={defaultValues:t._defaultValues};for(let o in e)Object.defineProperty(i,o,{get:()=>(t._proxyFormState[o]!==S.all&&(t._proxyFormState[o]=!n||S.all),r&&(r[o]=!0),e[o])});return i},O=e=>f(e)&&!Object.keys(e).length,R=(e,t,r,n)=>{r(e);let{name:i,...o}=e;return O(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!n||S.all))},A=e=>Array.isArray(e)?e:[e],I=(e,t,r)=>!e||!t||e===t||A(e).some(e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e)));function M(e){let t=a.useRef(e);t.current=e,a.useEffect(()=>{let r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var D=e=>"string"==typeof e,F=(e,t,r,n,i)=>D(e)?(n&&t.watch.add(e),w(r,e,i)):Array.isArray(e)?e.map(e=>(n&&t.watch.add(e),w(r,e))):(n&&(t.watchAll=!0),r);let z=e=>e.render(function(e){let t=L(),{name:r,disabled:n,control:i=t.control,shouldUnregister:o}=e,s=m(i._names.array,r),l=function(e){let t=L(),{control:r=t.control,name:n,defaultValue:i,disabled:o,exact:s}=e||{},l=a.useRef(n);l.current=n,M({disabled:o,subject:r._subjects.values,next:e=>{I(l.current,e.name,s)&&c(y(F(l.current,r._names,e.values||r._formValues,!1,i)))}});let[u,c]=a.useState(r._getWatch(n,i));return a.useEffect(()=>r._removeUnmounted()),u}({control:i,name:r,defaultValue:w(i._formValues,r,w(i._defaultValues,r,e.defaultValue)),exact:!0}),u=function(e){let t=L(),{control:r=t.control,disabled:n,name:i,exact:o}=e||{},[s,l]=a.useState(r._formState),u=a.useRef(!0),c=a.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=a.useRef(i);return d.current=i,M({disabled:n,next:e=>u.current&&I(d.current,e.name,o)&&R(e,c.current,r._updateFormState)&&l({...r._formState,...e}),subject:r._subjects.state}),a.useEffect(()=>(u.current=!0,c.current.isValid&&r._updateValid(!0),()=>{u.current=!1}),[r]),T(s,r,c.current,!1)}({control:i,name:r}),c=a.useRef(i.register(r,{...e.rules,value:l,..._(e.disabled)?{disabled:e.disabled}:{}}));return a.useEffect(()=>{let e=i._options.shouldUnregister||o,t=(e,t)=>{let r=w(i._fields,e);r&&r._f&&(r._f.mount=t)};if(t(r,!0),e){let e=y(w(i._options.defaultValues,r));k(i._defaultValues,r,e),b(w(i._formValues,r))&&k(i._formValues,r,e)}return()=>{(s?e&&!i._state.action:e)?i.unregister(r):t(r,!1)}},[r,i,s,o]),a.useEffect(()=>{w(i._fields,r)&&i._updateDisabledField({disabled:n,fields:i._fields,name:r,value:w(i._fields,r)._f.value})},[n,r,i]),{field:{name:r,value:l,..._(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:a.useCallback(e=>c.current.onChange({target:{value:p(e),name:r},type:E.CHANGE}),[r]),onBlur:a.useCallback(()=>c.current.onBlur({target:{value:w(i._formValues,r),name:r},type:E.BLUR}),[r,i]),ref:e=>{let t=w(i._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!w(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!w(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!w(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!w(u.validatingFields,r)},error:{enumerable:!0,get:()=>w(u.errors,r)}})}}(e));var B=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},U=()=>{let e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=(16*Math.random()+e)%16|0;return("x"==t?r:3&r|8).toString(16)})},V=(e,t,r={})=>r.shouldFocus||b(r.shouldFocus)?r.focusName||`${e}.${b(r.focusIndex)?t:r.focusIndex}.`:"",$=e=>({isOnSubmit:!e||e===S.onSubmit,isOnBlur:e===S.onBlur,isOnChange:e===S.onChange,isOnAll:e===S.all,isOnTouch:e===S.onTouched}),H=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let Z=(e,t,r,n)=>{for(let i of r||Object.keys(e)){let r=w(e,i);if(r){let{_f:e,...o}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!n||e.ref&&t(e.ref,e.name)&&!n)break;Z(o,t)}else f(o)&&Z(o,t)}}};var W=(e,t,r)=>{let n=A(w(e,r));return k(n,"root",t[r]),k(e,r,n),e},q=e=>"file"===e.type,G=e=>"function"==typeof e,Y=e=>{if(!v)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},K=e=>D(e),X=e=>"radio"===e.type,J=e=>e instanceof RegExp;let Q={value:!1,isValid:!1},ee={value:!0,isValid:!0};var et=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!b(e[0].attributes.value)?b(e[0].value)||""===e[0].value?ee:{value:e[0].value,isValid:!0}:ee:Q}return Q};let er={isValid:!1,value:null};var en=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,er):er;function ei(e,t,r="validate"){if(K(e)||Array.isArray(e)&&e.every(K)||_(e)&&!e)return{type:r,message:K(e)?e:"",ref:t}}var eo=e=>f(e)&&!J(e)?e:{value:e,message:""},ea=async(e,t,r,n,i)=>{let{ref:o,refs:a,required:s,maxLength:u,minLength:d,min:p,max:h,pattern:m,validate:g,name:v,valueAsNumber:y,mount:x,disabled:j}=e._f,C=w(t,v);if(!x||j)return{};let k=a?a[0]:o,E=e=>{n&&k.reportValidity&&(k.setCustomValidity(_(e)?"":e||""),k.reportValidity())},S={},P=X(o),L=l(o),T=(y||q(o))&&b(o.value)&&b(C)||Y(o)&&""===o.value||""===C||Array.isArray(C)&&!C.length,R=B.bind(null,v,r,S),A=(e,t,r,n=N.maxLength,i=N.minLength)=>{let a=e?t:r;S[v]={type:e?n:i,message:a,ref:o,...R(e?n:i,a)}};if(i?!Array.isArray(C)||!C.length:s&&(!(P||L)&&(T||c(C))||_(C)&&!C||L&&!et(a).isValid||P&&!en(a).isValid)){let{value:e,message:t}=K(s)?{value:!!s,message:s}:eo(s);if(e&&(S[v]={type:N.required,message:t,ref:k,...R(N.required,t)},!r))return E(t),S}if(!T&&(!c(p)||!c(h))){let e,t;let n=eo(h),i=eo(p);if(c(C)||isNaN(C)){let r=o.valueAsDate||new Date(C),a=e=>new Date(new Date().toDateString()+" "+e),s="time"==o.type,l="week"==o.type;D(n.value)&&C&&(e=s?a(C)>a(n.value):l?C>n.value:r>new Date(n.value)),D(i.value)&&C&&(t=s?a(C)<a(i.value):l?C<i.value:r<new Date(i.value))}else{let r=o.valueAsNumber||(C?+C:C);c(n.value)||(e=r>n.value),c(i.value)||(t=r<i.value)}if((e||t)&&(A(!!e,n.message,i.message,N.max,N.min),!r))return E(S[v].message),S}if((u||d)&&!T&&(D(C)||i&&Array.isArray(C))){let e=eo(u),t=eo(d),n=!c(e.value)&&C.length>+e.value,i=!c(t.value)&&C.length<+t.value;if((n||i)&&(A(n,e.message,t.message),!r))return E(S[v].message),S}if(m&&!T&&D(C)){let{value:e,message:t}=eo(m);if(J(e)&&!C.match(e)&&(S[v]={type:N.pattern,message:t,ref:o,...R(N.pattern,t)},!r))return E(t),S}if(g){if(G(g)){let e=ei(await g(C,t),k);if(e&&(S[v]={...e,...R(N.validate,e.message)},!r))return E(e.message),S}else if(f(g)){let e={};for(let n in g){if(!O(e)&&!r)break;let i=ei(await g[n](C,t),k,n);i&&(e={...i,...R(n,i.message)},E(i.message),r&&(S[v]=e))}if(!O(e)&&(S[v]={ref:k,...e},!r))return S}}return E(!0),S},es=(e,t)=>[...e,...A(t)],el=e=>Array.isArray(e)?e.map(()=>void 0):void 0;function eu(e,t,r){return[...e.slice(0,t),...A(r),...e.slice(t)]}var ec=(e,t,r)=>Array.isArray(e)?(b(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ed=(e,t)=>[...A(t),...A(e)],ef=(e,t)=>b(t)?[]:function(e,t){let r=0,n=[...e];for(let e of t)n.splice(e-r,1),r++;return x(n).length?n:[]}(e,A(t).sort((e,t)=>e-t)),ep=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function eh(e,t){let r=Array.isArray(t)?t:j(t)?[t]:C(t),n=1===r.length?e:function(e,t){let r=t.slice(0,-1).length,n=0;for(;n<r;)e=b(e)?n++:e[t[n++]];return e}(e,r),i=r.length-1,o=r[i];return n&&delete n[o],0!==i&&(f(n)&&O(n)||Array.isArray(n)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!b(e[t]))return!1;return!0}(n))&&eh(e,r.slice(0,-1)),e}var em=(e,t,r)=>(e[t]=r,e),eg=()=>{let e=[];return{get observers(){return e},next:t=>{for(let r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},ev=e=>c(e)||!d(e);function ey(e,t){if(ev(e)||ev(t))return e===t;if(u(e)&&u(t))return e.getTime()===t.getTime();let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i of r){let r=e[i];if(!n.includes(i))return!1;if("ref"!==i){let e=t[i];if(u(r)&&u(e)||f(r)&&f(e)||Array.isArray(r)&&Array.isArray(e)?!ey(r,e):r!==e)return!1}}return!0}var ex=e=>"select-multiple"===e.type,eb=e=>X(e)||l(e),ew=e=>Y(e)&&e.isConnected,e_=e=>{for(let t in e)if(G(e[t]))return!0;return!1};function ej(e,t={}){let r=Array.isArray(e);if(f(e)||r)for(let r in e)Array.isArray(e[r])||f(e[r])&&!e_(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ej(e[r],t[r])):c(e[r])||(t[r]=!0);return t}var eC=(e,t)=>(function e(t,r,n){let i=Array.isArray(t);if(f(t)||i)for(let i in t)Array.isArray(t[i])||f(t[i])&&!e_(t[i])?b(r)||ev(n[i])?n[i]=Array.isArray(t[i])?ej(t[i],[]):{...ej(t[i])}:e(t[i],c(r)?{}:r[i],n[i]):n[i]=!ey(t[i],r[i]);return n})(e,t,ej(t)),ek=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>b(e)?e:t?""===e?NaN:e?+e:e:r&&D(e)?new Date(e):n?n(e):e;function eE(e){let t=e.ref;return(e.refs?e.refs.every(e=>e.disabled):t.disabled)?void 0:q(t)?t.files:X(t)?en(e.refs).value:ex(t)?[...t.selectedOptions].map(({value:e})=>e):l(t)?et(e.refs).value:ek(b(t.value)?e.ref.value:t.value,e)}var eS=(e,t,r,n)=>{let i={};for(let r of e){let e=w(t,r);e&&k(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},eN=e=>b(e)?e:J(e)?e.source:f(e)?J(e.value)?e.value.source:e.value:e,eP=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function eL(e,t,r){let n=w(e,r);if(n||j(r))return{error:n,name:r};let i=r.split(".");for(;i.length;){let n=i.join("."),o=w(t,n),a=w(e,n);if(o&&!Array.isArray(o)&&r!==n)break;if(a&&a.type)return{name:n,error:a};i.pop()}return{name:r}}var eT=(e,t,r,n,i)=>!i.isOnAll&&(!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?!n.isOnChange:!i.isOnChange)||e),eO=(e,t)=>!x(w(e,t)).length&&eh(e,t);let eR={mode:S.onSubmit,reValidateMode:S.onChange,shouldFocusError:!0},eA=(e,t,r)=>{if(e&&"reportValidity"in e){let n=w(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},eI=(e,t)=>{for(let r in t.fields){let n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?eA(n.ref,r,e):n.refs&&n.refs.forEach(t=>eA(t,r,e))}},eM=(e,t)=>{t.shouldUseNativeValidation&&eI(e,t);let r={};for(let n in e){let i=w(t.fields,n),o=Object.assign(e[n]||{},{ref:i&&i.ref});if(eD(t.names||Object.keys(e),n)){let e=Object.assign({},w(r,n));k(e,"root",o),k(r,n,e)}else k(r,n,o)}return r},eD=(e,t)=>e.some(e=>e.startsWith(t+"."));var eF=function(e,t){for(var r={};e.length;){var n=e[0],i=n.code,o=n.message,a=n.path.join(".");if(!r[a]){if("unionErrors"in n){var s=n.unionErrors[0].errors[0];r[a]={message:s.message,type:s.code}}else r[a]={message:o,type:i}}if("unionErrors"in n&&n.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var l=r[a].types,u=l&&l[n.code];r[a]=B(a,t,r,i,u?[].concat(u,n.message):n.message)}e.shift()}return r},ez=r(4222);r(73935);var eB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=a.forwardRef((e,r)=>{let{asChild:i,...o}=e,a=i?ez.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,n.jsx)(a,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),eU=a.forwardRef((e,t)=>(0,n.jsx)(eB.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));eU.displayName="Label";var eV=r(45139),e$=r(1233);let eH=(0,eV.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),eZ=a.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,n.jsx)(eU,{ref:t,className:(0,e$.cn)(eH(),r),...i})});eZ.displayName=eU.displayName;let eW=e=>{let{children:t,...r}=e;return a.createElement(P.Provider,{value:r},t)},eq=a.createContext({}),eG=e=>{let{...t}=e;return(0,n.jsx)(eq.Provider,{value:{name:t.name},children:(0,n.jsx)(z,{...t})})},eY=()=>{let e=a.useContext(eq),t=a.useContext(eK),{getFieldState:r,formState:n}=L(),i=r(e.name,n);if(!e)throw Error("useFormField should be used within <FormField>");let{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...i}},eK=a.createContext({}),eX=a.forwardRef((e,t)=>{let{className:r,...i}=e,o=a.useId();return(0,n.jsx)(eK.Provider,{value:{id:o},children:(0,n.jsx)("div",{ref:t,className:(0,e$.cn)("space-y-2",r),...i})})});eX.displayName="FormItem";let eJ=a.forwardRef((e,t)=>{let{className:r,...i}=e,{error:o,formItemId:a}=eY();return(0,n.jsx)(eZ,{ref:t,className:(0,e$.cn)(o&&"text-destructive",r),htmlFor:a,...i})});eJ.displayName="FormLabel";let eQ=a.forwardRef((e,t)=>{let{...r}=e,{error:i,formItemId:o,formDescriptionId:a,formMessageId:s}=eY();return(0,n.jsx)(ez.g7,{ref:t,id:o,"aria-describedby":i?`${a} ${s}`:`${a}`,"aria-invalid":!!i,...r})});eQ.displayName="FormControl";let e0=a.forwardRef((e,t)=>{let{className:r,...i}=e,{formDescriptionId:o}=eY();return(0,n.jsx)("p",{ref:t,id:o,className:(0,e$.cn)("text-[0.8rem] text-muted-foreground",r),...i})});e0.displayName="FormDescription";let e1=a.forwardRef((e,t)=>{let{className:r,children:i,...o}=e,{error:a,formMessageId:s}=eY(),l=a?String(a?.message):i;return l?(0,n.jsx)("p",{ref:t,id:s,className:(0,e$.cn)("text-[0.8rem] font-medium text-destructive",r),...o,children:l}):null});e1.displayName="FormMessage";var e2=r(27860),e5=r(66991),e4=r(14319),e3=r(35382),e6=r(75362),e8=r(55409),e7=r(62469),e9=r(1604),te=r(53416),tt=r(31630),tr=r(46825),tn=r(17615),ti=r(41026);r(11163);var to=r(25554),ta=r(18794);async function ts(e){let t=(0,te.x0)(),r=await fetch("/api/models",{headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({batchId:t,prompt:e.prompt,seed:e.seed,width:e.width,height:e.height,modelType:tr.Hn.PLAYGROUND_V3,steps:75,num_images:1,cfg_scale:6,guidance_scale:6,strength:1.45,high_noise_frac:.6,expandPrompt:!1,isPrivate:!0,generateVariants:!1,initImageFromPlayground:!1,high_res_fix:!1})}),n=await r.json();if(!e9.z.object({images:e9.z.object({imageKey:e9.z.string(),prompt:e9.z.string(),url:e9.z.string()}).array()}).safeParse(n).success)throw Error("Invalid response");let i=await fetch(`/api/images/batch?batchId=${t}&batchSize=1`,{method:"GET",headers:{"content-type":"application/json"}}),o=e9.z.object({images:e9.z.object({id:e9.z.string(),url:e9.z.string(),url_jpeg:e9.z.string()}).array()}),a=await i.json(),s=o.safeParse(a);if(!s.success)throw console.error(s.error),Error("Invalid response");return s.data}function tl(e){var t,r;let{buttonLabel:d="Create",isPending:h,isDeleting:g,enabledFields:j={image:!0,majorTags:!0,minorTags:!0,title:!0,prompt:!1,negativePrompt:!1,seed:!0},fields:C={regenerateImage:!1,userId:!1,majorTags:!0,minorTags:!1,visibility:!0,images:!0,previewImageUrls:!0,prompt:!0,negativePrompt:!0,title:!0,seed:!0,height:!0,width:!0,type:!0},...N}=e,P=function(e={}){let t=a.useRef(),r=a.useRef(),[n,i]=a.useState({isDirty:!1,isValidating:!1,isLoading:G(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:G(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...function(e={}){let t,r={...eR,...e},n={submitCount:0,isDirty:!1,isLoading:G(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},i={},o=(f(r.defaultValues)||f(r.values))&&y(r.defaultValues||r.values)||{},a=r.shouldUnregister?{}:y(o),s={action:!1,mount:!1,watch:!1},d={mount:new Set,unMount:new Set,array:new Set,watch:new Set},h=0,g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},j={values:eg(),array:eg(),state:eg()},C=$(r.mode),N=$(r.reValidateMode),P=r.criteriaMode===S.all,L=e=>t=>{clearTimeout(h),h=setTimeout(e,t)},T=async e=>{if(g.isValid||e){let e=r.resolver?O((await U()).errors):await K(i,!0);e!==n.isValid&&j.state.next({isValid:e})}},R=(e,t)=>{(g.isValidating||g.validatingFields)&&((e||Array.from(d.mount)).forEach(e=>{e&&(t?k(n.validatingFields,e,t):eh(n.validatingFields,e))}),j.state.next({validatingFields:n.validatingFields,isValidating:!O(n.validatingFields)}))},I=(e,t)=>{k(n.errors,e,t),j.state.next({errors:n.errors})},M=(e,t,r,n)=>{let l=w(i,e);if(l){let i=w(a,e,b(r)?w(o,e):r);b(i)||n&&n.defaultChecked||t?k(a,e,t?i:eE(l._f)):Q(e,i),s.mount&&T()}},z=(e,t,r,a,s)=>{let l=!1,u=!1,c={name:e},d=!!(w(i,e)&&w(i,e)._f&&w(i,e)._f.disabled);if(!r||a){g.isDirty&&(u=n.isDirty,n.isDirty=c.isDirty=X(),l=u!==c.isDirty);let r=d||ey(w(o,e),t);u=!!(!d&&w(n.dirtyFields,e)),r||d?eh(n.dirtyFields,e):k(n.dirtyFields,e,!0),c.dirtyFields=n.dirtyFields,l=l||g.dirtyFields&&!r!==u}if(r){let t=w(n.touchedFields,e);t||(k(n.touchedFields,e,r),c.touchedFields=n.touchedFields,l=l||g.touchedFields&&t!==r)}return l&&s&&j.state.next(c),l?c:{}},B=(r,i,o,a)=>{let s=w(n.errors,r),l=g.isValid&&_(i)&&n.isValid!==i;if(e.delayError&&o?(t=L(()=>I(r,o)))(e.delayError):(clearTimeout(h),t=null,o?k(n.errors,r,o):eh(n.errors,r)),(o?!ey(s,o):s)||!O(a)||l){let e={...a,...l&&_(i)?{isValid:i}:{},errors:n.errors,name:r};n={...n,...e},j.state.next(e)}},U=async e=>{R(e,!0);let t=await r.resolver(a,r.context,eS(e||d.mount,i,r.criteriaMode,r.shouldUseNativeValidation));return R(e),t},V=async e=>{let{errors:t}=await U(e);if(e)for(let r of e){let e=w(t,r);e?k(n.errors,r,e):eh(n.errors,r)}else n.errors=t;return t},K=async(e,t,i={valid:!0})=>{for(let o in e){let s=e[o];if(s){let{_f:e,...l}=s;if(e){let l=d.array.has(e.name);R([o],!0);let u=await ea(s,a,P,r.shouldUseNativeValidation&&!t,l);if(R([o]),u[e.name]&&(i.valid=!1,t))break;t||(w(u,e.name)?l?W(n.errors,u,e.name):k(n.errors,e.name,u[e.name]):eh(n.errors,e.name))}l&&await K(l,t,i)}}return i.valid},X=(e,t)=>(e&&t&&k(a,e,t),!ey(eo(),o)),J=(e,t,r)=>F(e,d,{...s.mount?a:b(t)?o:D(e)?{[e]:t}:t},r,t),Q=(e,t,r={})=>{let n=w(i,e),o=t;if(n){let r=n._f;r&&(r.disabled||k(a,e,ek(t,r)),o=Y(r.ref)&&c(t)?"":t,ex(r.ref)?[...r.ref.options].forEach(e=>e.selected=o.includes(e.value)):r.refs?l(r.ref)?r.refs.length>1?r.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find(t=>t===e.value):o===e.value)):r.refs[0]&&(r.refs[0].checked=!!o):r.refs.forEach(e=>e.checked=e.value===o):q(r.ref)?r.ref.value="":(r.ref.value=o,r.ref.type||j.values.next({name:e,values:{...a}})))}(r.shouldDirty||r.shouldTouch)&&z(e,o,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&ei(e)},ee=(e,t,r)=>{for(let n in t){let o=t[n],a=`${e}.${n}`,s=w(i,a);!d.array.has(e)&&ev(o)&&(!s||s._f)||u(o)?Q(a,o,r):ee(a,o,r)}},et=(e,t,r={})=>{let l=w(i,e),u=d.array.has(e),f=y(t);k(a,e,f),u?(j.array.next({name:e,values:{...a}}),(g.isDirty||g.dirtyFields)&&r.shouldDirty&&j.state.next({name:e,dirtyFields:eC(o,a),isDirty:X(e,f)})):!l||l._f||c(f)?Q(e,f,r):ee(e,f,r),H(e,d)&&j.state.next({...n}),j.values.next({name:s.mount?e:void 0,values:{...a}})},er=async e=>{s.mount=!0;let o=e.target,l=o.name,u=!0,c=w(i,l),f=e=>{u=Number.isNaN(e)||e===w(a,l,e)};if(c){let s,h;let m=o.type?eE(c._f):p(e),v=e.type===E.BLUR||e.type===E.FOCUS_OUT,y=!eP(c._f)&&!r.resolver&&!w(n.errors,l)&&!c._f.deps||eT(v,w(n.touchedFields,l),n.isSubmitted,N,C),x=H(l,d,v);k(a,l,m),v?(c._f.onBlur&&c._f.onBlur(e),t&&t(0)):c._f.onChange&&c._f.onChange(e);let b=z(l,m,v,!1),_=!O(b)||x;if(v||j.values.next({name:l,type:e.type,values:{...a}}),y)return g.isValid&&T(),_&&j.state.next({name:l,...x?{}:b});if(!v&&x&&j.state.next({...n}),r.resolver){let{errors:e}=await U([l]);if(f(m),u){let t=eL(n.errors,i,l),r=eL(e,i,t.name||l);s=r.error,l=r.name,h=O(e)}}else R([l],!0),s=(await ea(c,a,P,r.shouldUseNativeValidation))[l],R([l]),f(m),u&&(s?h=!1:g.isValid&&(h=await K(i,!0)));u&&(c._f.deps&&ei(c._f.deps),B(l,h,s,b))}},en=(e,t)=>{if(w(n.errors,t)&&e.focus)return e.focus(),1},ei=async(e,t={})=>{let o,a;let s=A(e);if(r.resolver){let t=await V(b(e)?e:s);o=O(t),a=e?!s.some(e=>w(t,e)):o}else e?((a=(await Promise.all(s.map(async e=>{let t=w(i,e);return await K(t&&t._f?{[e]:t}:t)}))).every(Boolean))||n.isValid)&&T():a=o=await K(i);return j.state.next({...!D(e)||g.isValid&&o!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:o}:{},errors:n.errors}),t.shouldFocus&&!a&&Z(i,en,e?s:d.mount),a},eo=e=>{let t={...s.mount?a:o};return b(e)?t:D(e)?w(t,e):e.map(e=>w(t,e))},es=(e,t)=>({invalid:!!w((t||n).errors,e),isDirty:!!w((t||n).dirtyFields,e),error:w((t||n).errors,e),isValidating:!!w(n.validatingFields,e),isTouched:!!w((t||n).touchedFields,e)}),el=(e,t,r)=>{let o=(w(i,e,{_f:{}})._f||{}).ref,{ref:a,message:s,type:l,...u}=w(n.errors,e)||{};k(n.errors,e,{...u,...t,ref:o}),j.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&o&&o.focus&&o.focus()},eu=(e,t={})=>{for(let s of e?A(e):d.mount)d.mount.delete(s),d.array.delete(s),t.keepValue||(eh(i,s),eh(a,s)),t.keepError||eh(n.errors,s),t.keepDirty||eh(n.dirtyFields,s),t.keepTouched||eh(n.touchedFields,s),t.keepIsValidating||eh(n.validatingFields,s),r.shouldUnregister||t.keepDefaultValue||eh(o,s);j.values.next({values:{...a}}),j.state.next({...n,...t.keepDirty?{isDirty:X()}:{}}),t.keepIsValid||T()},ec=({disabled:e,name:t,field:r,fields:n,value:i})=>{if(_(e)&&s.mount||e){let o=e?void 0:b(i)?eE(r?r._f:w(n,t)._f):i;k(a,t,o),z(t,o,!1,!1,!0)}},ed=(e,t={})=>{let n=w(i,e),a=_(t.disabled);return k(i,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),d.mount.add(e),n?ec({field:n,disabled:t.disabled,name:e,value:t.value}):M(e,!0,t.value),{...a?{disabled:t.disabled}:{},...r.progressive?{required:!!t.required,min:eN(t.min),max:eN(t.max),minLength:eN(t.minLength),maxLength:eN(t.maxLength),pattern:eN(t.pattern)}:{},name:e,onChange:er,onBlur:er,ref:a=>{if(a){ed(e,t),n=w(i,e);let r=b(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=eb(r),l=n._f.refs||[];(s?l.find(e=>e===r):r===n._f.ref)||(k(i,e,{_f:{...n._f,...s?{refs:[...l.filter(ew),r,...Array.isArray(w(o,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),M(e,!1,void 0,r))}else(n=w(i,e,{}))._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&!(m(d.array,e)&&s.action)&&d.unMount.add(e)}}},ef=()=>r.shouldFocusError&&Z(i,en,d.mount),ep=(e,t)=>async o=>{let s;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=y(a);if(j.state.next({isSubmitting:!0}),r.resolver){let{errors:e,values:t}=await U();n.errors=e,l=t}else await K(i);if(eh(n.errors,"root"),O(n.errors)){j.state.next({errors:{}});try{await e(l,o)}catch(e){s=e}}else t&&await t({...n.errors},o),ef(),setTimeout(ef);if(j.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:O(n.errors)&&!s,submitCount:n.submitCount+1,errors:n.errors}),s)throw s},em=(t,r={})=>{let l=t?y(t):o,u=y(l),c=O(t),f=c?o:u;if(r.keepDefaultValues||(o=l),!r.keepValues){if(r.keepDirtyValues)for(let e of d.mount)w(n.dirtyFields,e)?k(f,e,w(a,e)):et(e,w(f,e));else{if(v&&b(t))for(let e of d.mount){let t=w(i,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Y(e)){let t=e.closest("form");if(t){t.reset();break}}}}i={}}a=e.shouldUnregister?r.keepDefaultValues?y(o):{}:y(f),j.array.next({values:{...f}}),j.values.next({values:{...f}})}d={mount:r.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!g.isValid||!!r.keepIsValid||!!r.keepDirtyValues,s.watch=!!e.shouldUnregister,j.state.next({submitCount:r.keepSubmitCount?n.submitCount:0,isDirty:!c&&(r.keepDirty?n.isDirty:!!(r.keepDefaultValues&&!ey(t,o))),isSubmitted:!!r.keepIsSubmitted&&n.isSubmitted,dirtyFields:c?{}:r.keepDirtyValues?r.keepDefaultValues&&a?eC(o,a):n.dirtyFields:r.keepDefaultValues&&t?eC(o,t):r.keepDirty?n.dirtyFields:{},touchedFields:r.keepTouched?n.touchedFields:{},errors:r.keepErrors?n.errors:{},isSubmitSuccessful:!!r.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1})},e_=(e,t)=>em(G(e)?e(a):e,t);return{control:{register:ed,unregister:eu,getFieldState:es,handleSubmit:ep,setError:el,_executeSchema:U,_getWatch:J,_getDirty:X,_updateValid:T,_removeUnmounted:()=>{for(let e of d.unMount){let t=w(i,e);t&&(t._f.refs?t._f.refs.every(e=>!ew(e)):!ew(t._f.ref))&&eu(e)}d.unMount=new Set},_updateFieldArray:(e,t=[],r,l,u=!0,c=!0)=>{if(l&&r){if(s.action=!0,c&&Array.isArray(w(i,e))){let t=r(w(i,e),l.argA,l.argB);u&&k(i,e,t)}if(c&&Array.isArray(w(n.errors,e))){let t=r(w(n.errors,e),l.argA,l.argB);u&&k(n.errors,e,t),eO(n.errors,e)}if(g.touchedFields&&c&&Array.isArray(w(n.touchedFields,e))){let t=r(w(n.touchedFields,e),l.argA,l.argB);u&&k(n.touchedFields,e,t)}g.dirtyFields&&(n.dirtyFields=eC(o,a)),j.state.next({name:e,isDirty:X(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else k(a,e,t)},_updateDisabledField:ec,_getFieldArray:t=>x(w(s.mount?a:o,t,e.shouldUnregister?w(o,t,[]):[])),_reset:em,_resetDefaultValues:()=>G(r.defaultValues)&&r.defaultValues().then(e=>{e_(e,r.resetOptions),j.state.next({isLoading:!1})}),_updateFormState:e=>{n={...n,...e}},_disableForm:e=>{_(e)&&(j.state.next({disabled:e}),Z(i,(t,r)=>{let n=w(i,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEach(t=>{t.disabled=n._f.disabled||e}))},0,!1))},_subjects:j,_proxyFormState:g,_setErrors:e=>{n.errors=e,j.state.next({errors:n.errors,isValid:!1})},get _fields(){return i},get _formValues(){return a},get _state(){return s},set _state(value){s=value},get _defaultValues(){return o},get _names(){return d},set _names(value){d=value},get _formState(){return n},set _formState(value){n=value},get _options(){return r},set _options(value){r={...r,...value}}},trigger:ei,register:ed,handleSubmit:ep,watch:(e,t)=>G(e)?j.values.subscribe({next:r=>e(J(void 0,t),r)}):J(e,t,!0),setValue:et,getValues:eo,reset:e_,resetField:(e,t={})=>{w(i,e)&&(b(t.defaultValue)?et(e,y(w(o,e))):(et(e,t.defaultValue),k(o,e,y(t.defaultValue))),t.keepTouched||eh(n.touchedFields,e),t.keepDirty||(eh(n.dirtyFields,e),n.isDirty=t.defaultValue?X(e,y(w(o,e))):X()),!t.keepError&&(eh(n.errors,e),g.isValid&&T()),j.state.next({...n}))},clearErrors:e=>{e&&A(e).forEach(e=>eh(n.errors,e)),j.state.next({errors:e?n.errors:{}})},unregister:eu,setError:el,setFocus:(e,t={})=>{let r=w(i,e),n=r&&r._f;if(n){let e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:es}}(e),formState:n});let o=t.current.control;return o._options=e,M({subject:o._subjects.state,next:e=>{R(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),a.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),a.useEffect(()=>{if(o._proxyFormState.isDirty){let e=o._getDirty();e!==n.isDirty&&o._subjects.state.next({isDirty:e})}},[o,n.isDirty]),a.useEffect(()=>{e.values&&!ey(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values,i(e=>({...e}))):o._resetDefaultValues()},[e.values,o]),a.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),a.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),a.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=T(n,o),t.current}({resolver:(t=s.c4,void 0===r&&(r={}),function(e,n,i){try{return Promise.resolve(function(n,o){try{var a=Promise.resolve(t["sync"===r.mode?"parse":"parseAsync"](e,void 0)).then(function(t){return i.shouldUseNativeValidation&&eI({},i),{errors:{},values:r.raw?e:t}})}catch(e){return o(e)}return a&&a.then?a.then(void 0,o):a}(0,function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:eM(eF(e.errors,!i.shouldUseNativeValidation&&"all"===i.criteriaMode),i)};throw e}))}catch(e){return Promise.reject(e)}}),defaultValues:N.defaultValues}),L=(0,tt.T1)(),I=P.watch("prompt"),z=(0,a.useRef)(null),B=(0,e6.Z)("/api/templates/generate-image",async()=>{if(!I)throw Error("Prompt is empty");let e=P.watch("height"),t=P.watch("width"),r=Math.floor(1e9*Math.random());return P.setValue("seed",r),ts({prompt:I,seed:r,height:e,width:t})},{onSuccess:e=>{P.setValue("previewImageUrls.0",e?.images?.[0].url_jpeg)},onError:e=>{console.error(e),L("An error occurred")}}),U=(0,ta.z0)(),V=(0,ta.l6)(),K=(0,e5.Xt)({type:"MAJOR",visibility:U?["ga","beta","internal"]:V?["ga","beta"]:"ga"}),X=(0,e6.Z)("/api/templates/generate-title",e=>{let t=P.watch("tags"),r=K.data?.find(e=>t?.includes(e.id));return fetch(e,{method:"POST",body:JSON.stringify({prompt:I,category:r?.name})}).then(e=>e.ok?e.json():e.text().then(e=>{throw Error(e)})).catch(e=>{e instanceof Error&&L(e.message)})},{onSuccess:e=>{P.setValue("title",e.title)}}),J=P.watch("title");(0,a.useEffect)(()=>{X.data||X.isMutating||X.error||J||!I||z.current?.click()},[X.data,X.error,X.isMutating,I,J]);let Q=P.watch("previewImageUrls");return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(eW,{...P,children:(0,n.jsxs)("form",{onSubmit:P.handleSubmit(e=>{let t=P.watch("tags");if(t?.length===0){L("Please select a category");return}return N.onSubmit({...e,previewImageUrls:e.previewImageUrls.filter(Boolean)})}),className:"space-y-8",children:[(0,n.jsxs)("div",{className:"flex flex-col",children:[C.previewImageUrls&&(0,n.jsx)(eG,{control:P.control,name:"previewImageUrls",render:e=>{let{field:t}=e;return(0,n.jsxs)(eX,{children:[(0,n.jsx)(eJ,{children:"Image"}),(0,n.jsx)(eQ,{children:(0,n.jsx)(e3.S,{disabled:!j.image,accept:"image/*",value:Q?.[0],className:"aspect-square w-full h-full",onChange:e=>{let t=e.target.files?.[0];if(t){let e=new FileReader;e.onloadend=()=>{let t=e.result;P.setValue("previewImageUrls",[t])},e.readAsDataURL(t)}}})}),(0,n.jsx)(e1,{})]})}}),(0,n.jsxs)("div",{className:"flex items-center gap-2 justify-center mt-2",children:[C.regenerateImage&&(0,n.jsx)(i.z,{type:"button",className:"w-fit",disabled:B.isMutating,onClick:()=>B.trigger(),children:B.isMutating?(0,n.jsx)(e8.L,{className:"h-4 w-4 mr-1 animate-spin"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e7.$2U,{className:"h-4 w-4 mr-2"}),"Regenerate the image"]})}),(0,n.jsxs)(tn.Vq,{children:[(0,n.jsx)(tn.hg,{asChild:!0,children:(0,n.jsxs)(i.z,{children:[(0,n.jsx)(ti.Z,{className:"h-4 w-4 mr-2"}),"Expand"]})}),(0,n.jsx)(tn.cZ,{className:"p-0 max-w-[60vh]",children:(0,n.jsx)("img",{src:Q?.[0],alt:"Preview image",className:"w-full h-full object-contain"})})]})]})]}),C.userId&&(0,n.jsx)(eG,{control:P.control,name:"userId",render:e=>{let{field:t}=e;return(0,n.jsxs)(eX,{children:[(0,n.jsx)(eJ,{children:"User ID (optional, fallback to current user)"}),(0,n.jsx)(eQ,{children:(0,n.jsx)(o.I,{maxLength:100,placeholder:"user ID",...t})}),(0,n.jsx)(e1,{})]})}}),C.title&&(0,n.jsx)(eG,{disabled:X.isMutating,control:P.control,name:"title",render:e=>{let{field:t}=e;return(0,n.jsxs)(eX,{children:[(0,n.jsx)(eJ,{children:"Title"}),(0,n.jsx)(eQ,{children:(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)(o.I,{maxLength:60,placeholder:"Your template title",...t}),(0,n.jsx)(i.z,{ref:z,type:"button",className:"shrink-0",variant:"ghost",size:"iconSm",onClick:()=>X.trigger(),children:X.isMutating?(0,n.jsx)(e8.L,{className:"h-4 w-4 animate-spin"}):(0,n.jsx)(e7.$2U,{className:"h-4 w-4"})})]})}),(0,n.jsxs)(e0,{children:["A maximum of ",60," characters. This will be visible to everyone."]}),(0,n.jsx)(e1,{})]})}}),C.prompt&&(0,n.jsx)(eG,{control:P.control,name:"prompt",render:e=>{let{field:t}=e;return(0,n.jsxs)(eX,{children:[(0,n.jsx)(eJ,{children:"Prompt"}),(0,n.jsx)(eQ,{children:(0,n.jsx)(e2.g,{disabled:!j.prompt,rows:8,placeholder:"Your image prompt",...t})}),(0,n.jsx)(e0,{children:"This prompt will not be visible to anyone except you."}),(0,n.jsx)(e1,{})]})}}),C.negativePrompt&&(0,n.jsx)(eG,{control:P.control,name:"negativePrompt",render:e=>{let{field:t}=e;return(0,n.jsxs)(eX,{children:[(0,n.jsx)(eJ,{children:"Negative Prompt"}),(0,n.jsx)(eQ,{children:(0,n.jsx)(e2.g,{disabled:!j.negativePrompt,rows:4,placeholder:"Your image negative prompt",...t,value:t.value??"",onChange:e=>{P.setValue("negativePrompt",e.target.value)}})}),(0,n.jsx)(e0,{children:"This prompt will not be visible to anyone except you."}),(0,n.jsx)(e1,{})]})}}),C.seed&&(0,n.jsx)(eG,{control:P.control,name:"seed",render:e=>{let{field:t}=e;return(0,n.jsxs)(eX,{children:[(0,n.jsx)(eJ,{children:"Seed"}),(0,n.jsx)(eQ,{children:(0,n.jsx)(o.I,{disabled:!j.seed,placeholder:"Seed",...t,value:t.value??0,onChange:e=>{let t=parseInt(e.target.value);isNaN(t)||P.setValue("seed",t)}})}),(0,n.jsx)(e1,{})]})}}),C.majorTags&&(0,n.jsx)(tc,{minorTags:C.minorTags,majorTags:C.majorTags}),C.type&&(0,n.jsx)(tu,{}),(0,n.jsx)(i.z,{disabled:h,size:"lg",type:"submit",variant:"create",children:h?"Loading...":d}),N.onDelete&&(0,n.jsx)(i.z,{disabled:g,size:"lg",type:"button",variant:"delete",onClick:()=>{if(confirm("Are you sure you want to delete this template?"))return N.onDelete?.()},children:g?"Deleting...":"Delete"})]})})})}function tu(){let e=L();return(0,n.jsx)(eG,{control:e.control,name:"type",render:t=>{let{field:r}=t;return(0,n.jsxs)(eX,{children:[(0,n.jsx)(eJ,{children:"Gating"}),(0,n.jsx)(eQ,{children:(0,n.jsx)("div",{className:"flex gap-2 items-center",children:(0,n.jsxs)(to.Ph,{value:r.value,onValueChange:t=>{e.setValue("type",t)},children:[(0,n.jsx)(to.i4,{children:(0,n.jsx)(to.ki,{placeholder:"Visibility"})}),(0,n.jsxs)(to.Bw,{children:[(0,n.jsx)(to.Ql,{value:"BASIC",children:"Basic"}),(0,n.jsx)(to.Ql,{value:"PREMIUM",children:"Premium"})]})]})})}),(0,n.jsxs)(e0,{children:["A maximum of ",60," characters. This will be visible to everyone."]}),(0,n.jsx)(e1,{})]})}})}function tc(e){let t=L(),r=t.watch("tags"),i=(0,ta.z0)(),o=(0,ta.l6)(),s=(0,e5.Xt)({type:"MAJOR",visibility:i?["ga","beta","internal"]:o?["ga","beta"]:"ga",take:300}),l=Array.isArray(r)?r?.find(e=>s?.data?.some(t=>t.id===e))??void 0:void 0,u=(0,e5.Xt)({type:"MINOR",visibility:i?["ga","beta","internal"]:o?["ga","beta"]:"ga",parentId:l,take:300}),{append:c,remove:d}=function(e){let t=L(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:o}=e,[s,l]=a.useState(r._getFieldArray(n)),u=a.useRef(r._getFieldArray(n).map(U)),c=a.useRef(s),d=a.useRef(n),f=a.useRef(!1);d.current=n,c.current=s,r._names.array.add(n),e.rules&&r.register(n,e.rules),M({next:({values:e,name:t})=>{if(t===d.current||!t){let t=w(e,d.current);Array.isArray(t)&&(l(t),u.current=t.map(U))}},subject:r._subjects.array});let p=a.useCallback(e=>{f.current=!0,r._updateFieldArray(n,e)},[r,n]);return a.useEffect(()=>{if(r._state.action=!1,H(n,r._names)&&r._subjects.state.next({...r._formState}),f.current&&(!$(r._options.mode).isOnSubmit||r._formState.isSubmitted)){if(r._options.resolver)r._executeSchema([n]).then(e=>{let t=w(e.errors,n),i=w(r._formState.errors,n);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?k(r._formState.errors,n,t):eh(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{let e=w(r._fields,n);e&&e._f&&!($(r._options.reValidateMode).isOnSubmit&&$(r._options.mode).isOnSubmit)&&ea(e,r._formValues,r._options.criteriaMode===S.all,r._options.shouldUseNativeValidation,!0).then(e=>!O(e)&&r._subjects.state.next({errors:W(r._formState.errors,e,n)}))}}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&Z(r._fields,(e,t)=>{if(r._names.focus&&t.startsWith(r._names.focus)&&e.focus)return e.focus(),1}),r._names.focus="",r._updateValid(),f.current=!1},[s,n,r]),a.useEffect(()=>(w(r._formValues,n)||r._updateFieldArray(n),()=>{(r._options.shouldUnregister||o)&&r.unregister(n)}),[n,r,i,o]),{swap:a.useCallback((e,t)=>{let i=r._getFieldArray(n);ep(i,e,t),ep(u.current,e,t),p(i),l(i),r._updateFieldArray(n,i,ep,{argA:e,argB:t},!1)},[p,n,r]),move:a.useCallback((e,t)=>{let i=r._getFieldArray(n);ec(i,e,t),ec(u.current,e,t),p(i),l(i),r._updateFieldArray(n,i,ec,{argA:e,argB:t},!1)},[p,n,r]),prepend:a.useCallback((e,t)=>{let i=A(y(e)),o=ed(r._getFieldArray(n),i);r._names.focus=V(n,0,t),u.current=ed(u.current,i.map(U)),p(o),l(o),r._updateFieldArray(n,o,ed,{argA:el(e)})},[p,n,r]),append:a.useCallback((e,t)=>{let i=A(y(e)),o=es(r._getFieldArray(n),i);r._names.focus=V(n,o.length-1,t),u.current=es(u.current,i.map(U)),p(o),l(o),r._updateFieldArray(n,o,es,{argA:el(e)})},[p,n,r]),remove:a.useCallback(e=>{let t=ef(r._getFieldArray(n),e);u.current=ef(u.current,e),p(t),l(t),r._updateFieldArray(n,t,ef,{argA:e})},[p,n,r]),insert:a.useCallback((e,t,i)=>{let o=A(y(t)),a=eu(r._getFieldArray(n),e,o);r._names.focus=V(n,e,i),u.current=eu(u.current,e,o.map(U)),p(a),l(a),r._updateFieldArray(n,a,eu,{argA:e,argB:el(t)})},[p,n,r]),update:a.useCallback((e,t)=>{let i=y(t),o=em(r._getFieldArray(n),e,i);u.current=[...o].map((t,r)=>t&&r!==e?u.current[r]:U()),p(o),l([...o]),r._updateFieldArray(n,o,em,{argA:e,argB:i},!0,!1)},[p,n,r]),replace:a.useCallback(e=>{let t=A(y(e));u.current=t.map(U),p([...t]),l([...t]),r._updateFieldArray(n,[...t],e=>e,{},!0,!1)},[p,n,r]),fields:a.useMemo(()=>s.map((e,t)=>({...e,[i]:u.current[t]||U()})),[s,i])}}({control:t.control,name:"tags"}),f=(e,t)=>{let n=r||[],i=n.includes(e),o=n.filter(e=>s.data?.some(t=>t.id===e)),a=n.filter(e=>u.data?.some(t=>t.id===e));i?d(n.indexOf(e)):"MAJOR"===t?(o.length>0&&d(n.indexOf(o[0])),c(e)):"MINOR"===t&&(a.length<3||d(n.indexOf(a[0])),c(e))};return(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[e.majorTags&&Array.isArray(s.data)&&s.data.length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)(eJ,{children:"Major Category"}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.data.map(e=>{let t=r?.includes(e.id);return(0,n.jsx)(e4.C,{onClick:()=>f(e.id,"MAJOR"),variant:t?"default":"outline",as:"button",type:"button",children:e.name},e.id)})}),(0,n.jsx)(e0,{className:"mt-2",children:"Choose one major category"})]}),e.minorTags&&Array.isArray(u.data)&&u.data.length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)(eJ,{children:"Minor Categories"}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:u.data.map(e=>{let t=r?.includes(e.id);return(0,n.jsx)(e4.C,{onClick:()=>f(e.id,"MINOR"),variant:t?"default":"outline",as:"button",type:"button",children:e.name},e.id)})}),(0,n.jsx)(e0,{className:"mt-2",children:"Choose up to three minor categories"})]})]})}},13383:function(e,t,r){"use strict";r.d(t,{J:function(){return p},e:function(){return f}});var n=r(85893),i=r(64529),o=r(98928),a=r(66991),s=r(63778),l=r(17615),u=r(31630),c=r(38372);let d=(0,i.Ue)(e=>({defaultValues:{imageId:""},isOpen:!1,open:t=>{let{imageId:r}=t;e({isOpen:!0,defaultValues:{imageId:r}})},close:()=>{e({isOpen:!1,defaultValues:{imageId:""}})}}));function f(){let{defaultValues:e,isOpen:t,close:r,open:n}=d(e=>e);return{defaultValues:e,isOpen:t,close:r,open:n}}function p(){let{defaultValues:e,isOpen:t,close:r}=d(e=>e),i=(0,a.VW)(),f=(0,u.T1)(),p=(0,c.Z)(),h=(0,s.Mw)({id:e?.imageId}),m=h?.data?.url_jpeg||h?.data?.url;return(0,n.jsx)(l.Vq,{open:t,onOpenChange:()=>r(),children:(0,n.jsxs)(l.cZ,{className:"max-h-[80vh] overflow-y-auto max-w-2xl",children:[(0,n.jsx)(l.fK,{children:(0,n.jsx)(l.$N,{children:"Create Template"})}),h?.isLoading?(0,n.jsx)("div",{className:"p-24 flex items-center justify-center",children:"Loading..."}):(0,n.jsx)(o.O,{buttonLabel:"Submit for Approval",isPending:i.isMutating,fields:{minorTags:!1,userId:!1,visibility:!0,majorTags:!0,images:!0,previewImageUrls:!0,prompt:!0,negativePrompt:!0,title:!0,seed:!0,height:!1,width:!1,type:!1},enabledFields:{image:!1,majorTags:!0,minorTags:!1,title:!0,prompt:!1,negativePrompt:!1,seed:!1},defaultValues:{userId:p?.id,visibility:"beta",images:[e.imageId],prompt:h?.data?.prompt??"",negativePrompt:h?.data?.negative_prompt??"",title:"",previewImageUrls:m?[m]:[""],seed:h?.data?.seed,type:"BASIC"},onSubmit:e=>i.trigger({...e},{onError:e=>{console.error(e),f("Failed to submit template for approval")},onSuccess:e=>{f("Your template was submitted for approval!",{time:1e4}),r()}})})]})})}},66991:function(e,t,r){"use strict";r.d(t,{AS:function(){return p},VW:function(){return l},Xt:function(){return f},Zg:function(){return c},hm:function(){return d}});var n=r(75362),i=r(32621),o=r(59820),a=r(31630);async function s(e,t){return fetch(e,{body:JSON.stringify(t.arg),method:"POST"}).then(e=>e.json())}function l(){let e=(0,a.T1)();return(0,n.Z)("/api/templates",s,{onError:t=>{console.error(t),e("An error occurred")}})}async function u(e,t){return fetch(e,{body:JSON.stringify(t.arg),method:"PUT"}).then(e=>e.json())}function c(){let e=(0,a.T1)();return(0,n.Z)("/api/templates",u,{onError:t=>{console.error(t),e("An error occurred")}})}function d(){return(0,o.ZP)("/api/templates/creators",e=>fetch(e).then(async e=>{let t=await e.json(),r=i.E.safeParse(t);if(r.success)return r.data;throw Error("Failed to fetch template creators")}),{onError:e=>{console.error(e)}})}function f(e){let t=new URLSearchParams(e).toString();return(0,o.ZP)("/api/templates/tags?"+t,e=>fetch(e).then(e=>e.json()))}function p(){let e=(0,a.T1)();return(0,n.Z)("/api/templates/visibility",async(t,r)=>{let{arg:n}=r;try{let e=await fetch(`/api/templates/${n.templateId}/visibility`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!e.ok)throw Error("An error occurred while updating template visibility");return await e.json()}catch(t){throw console.error("Error in useUpdateTemplateVisibilityMutation:",t),e(t instanceof Error?t.message:"An error occurred"),t}},{onError:t=>{console.error("SWR mutation error:",t),e("An error occurred while updating template visibility")}})}},32621:function(e,t,r){"use strict";r.d(t,{hv:function(){return l},E:function(){return h},c4:function(){return d}});var n=r(1604);let i=n.z.object({id:n.z.string(),name:n.z.string(),previewImageUrls:n.z.array(n.z.string()),image:n.z.string().optional().nullish(),height:n.z.number().optional().nullish(),width:n.z.number().optional().nullish(),visibility:n.z.enum(["internal","beta","ga"]),type:n.z.enum(["MAJOR","MINOR"]),position:n.z.number(),createdAt:n.z.string().optional().nullish(),updatedAt:n.z.string().optional().nullish()}),o=n.z.object({parentId:n.z.string(),parent:i.optional().nullish(),childId:n.z.string(),child:i.optional().nullish()}),a=n.z.object({children:n.z.array(o).optional().nullish(),parents:n.z.array(o).optional().nullish()}).merge(i);n.z.object({tagId:n.z.string()}),n.z.object({});let s=a.omit({id:!0,createdAt:!0,updatedAt:!0,children:!0,parents:!0}).merge(n.z.object({parents:n.z.object({id:n.z.string()}).array().optional().nullish(),children:n.z.object({id:n.z.string()}).array().optional().nullish()}));n.z.object({tagId:n.z.string()}).merge(s),n.z.object({tagId:n.z.string()}),n.z.object({empty:n.z.enum(["empty","not-empty"]).optional().describe("This enables/disabled empty tags from being returned, default is true (return empty tags)"),name:n.z.string().optional(),visibility:n.z.enum(["internal","beta","ga"]).default("ga").or(n.z.array(n.z.enum(["internal","beta","ga"]))).optional(),type:n.z.enum(["MAJOR","MINOR"]).optional(),children:a.array().optional().nullish(),parentId:n.z.string().optional(),position:n.z.number().optional(),take:n.z.number().optional(),cursor:n.z.string().optional(),orderBy:n.z.object({name:n.z.enum(["asc","desc"]).optional(),visibility:n.z.enum(["asc","desc"]).optional(),type:n.z.enum(["asc","desc"]).optional(),parentTagId:n.z.enum(["asc","desc"]).optional(),position:n.z.enum(["asc","desc"]).optional()}).optional()}),n.z.object({tags:n.z.object({id:n.z.string(),position:n.z.number()}).array()});let l={prompt:{min:200}},u=n.z.object({id:n.z.string(),title:n.z.string().min(3,"Title must be at least 3 characters").max(100,"Title must be at most 100 characters"),visibility:n.z.enum(["ga","beta","internal"]).default("beta"),previewImageUrls:n.z.array(n.z.string()),prompt:n.z.string().min(l.prompt.min,`Prompt must be at least ${l.prompt.min} characters`),negativePrompt:n.z.string().optional().nullish(),userId:n.z.string(),createdAt:n.z.string(),updatedAt:n.z.string(),seed:n.z.number().optional().nullish(),type:n.z.enum(["BASIC","PREMIUM","PREMIUM_CANDIDATE"])}),c=u.omit({id:!0,createdAt:!0,updatedAt:!0}).merge(n.z.object({images:n.z.string().array().optional(),tags:n.z.string().array().optional(),height:n.z.number().optional().nullish(),width:n.z.number().optional().nullish(),seed:n.z.number().optional().nullish()}));c.merge(n.z.object({id:n.z.string()})).omit({images:!0});let d=c.omit({}),f=n.z.string().array().optional().nullish();n.z.object({visibility:n.z.enum(["internal","beta","ga"]).default("ga"),prompt:n.z.string().optional().nullish(),title:n.z.string().optional().nullish(),userId:n.z.string().optional().nullish(),tags:f.optional().nullish(),take:n.z.number().max(1e3).optional().nullish(),cursor:n.z.string().optional().nullish(),includeAllPresets:n.z.boolean().default(!0).optional().nullish(),orderBy:n.z.enum(["createdAt:desc","createdAt:asc","title:asc","title:desc","used:desc","used:asc","trending:daily","trending:weekly","trending:monthly"]).optional().nullish()});let p=n.z.object({id:n.z.string(),title:n.z.string(),visibility:n.z.enum(["ga","beta","internal"]),createdAt:n.z.date(),updatedAt:n.z.date(),useDate:n.z.date().optional().nullish(),keywords:n.z.string().array().optional().nullish().default([]),used:n.z.bigint(),usedInPeriod:n.z.number().nullish(),type:n.z.enum(["BASIC","PREMIUM"]),userId:n.z.string(),_count:n.z.object({tags:n.z.number().optional().nullish()}).optional(),tags:n.z.object({tag:a,tagId:n.z.string()}).array(),user:n.z.object({id:n.z.string(),displayName:n.z.string().optional().nullish(),name:n.z.string().optional().nullish(),image:n.z.string().optional().nullish()}).optional().nullish(),TemplatePresets:n.z.object({height:n.z.number(),width:n.z.number(),url:n.z.string(),url_jpeg:n.z.string().optional().nullish(),prompt:n.z.string().optional().nullish(),presetConfigSlug:n.z.string(),PresetConfig:n.z.object({name:n.z.string()}).optional().nullish()}).array()});p.extend({TemplateUses:n.z.object({count:n.z.number(),date:n.z.date()}).array()}).array(),p.array(),n.z.object({id:n.z.string()}),n.z.object({templateId:n.z.string(),visibility:n.z.enum(["internal","beta","ga"])}),n.z.object({templateId:n.z.string(),type:n.z.enum(["BASIC","PREMIUM"])}),u.pick({prompt:!0}).merge(n.z.object({category:n.z.string().optional().nullish()})),u.pick({prompt:!0,seed:!0}).merge(n.z.object({height:n.z.number().optional().nullish(),width:n.z.number().optional().nullish()})),n.z.object({templateId:n.z.string(),tagId:n.z.string().optional().nullish()});let h=n.z.object({id:n.z.string(),displayName:n.z.string().optional().nullish(),name:n.z.string().optional().nullish(),image:n.z.string().optional().nullish()}).array()},85944:function(e,t,r){"use strict";r.d(t,{k:function(){return i}});var n=r(85893);let i={SAFETY_FILTER_PROMPT:(0,n.jsxs)("p",{className:"text-gray-25 text-[12px] flex-grow",children:["We detected that your prompt might be against our"," ",(0,n.jsx)("a",{className:"underline",href:"http://help.playgroundai.com/en/articles/8325241-content-policy",target:"_blank",children:"content guidelines"}),". Continued attempts might result in your account being disabled."]})}},96897:function(e,t,r){"use strict";r.d(t,{UG:function(){return o},dZ:function(){return i},wX:function(){return a}}),r(51879);let n=Symbol("ERR");function i(e){return"object"==typeof e&&null!=e&&n in e}function o(e){return{[n]:!0,error:e}}async function a(e){try{return await e()}catch(e){return o(e)}}},63518:function(e,t,r){"use strict";r.d(t,{K:function(){return o},Z:function(){return i}});var n=r(67294);function i(e,t){(0,n.useEffect)(()=>Array.isArray(e)?(e.forEach(e=>document.addEventListener(e,t)),()=>{e.forEach(e=>document.removeEventListener(e,t))}):(document.addEventListener(e,t),()=>{document.removeEventListener(e,t)}),[t,e])}function o(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))}},54029:function(e,t,r){"use strict";r.d(t,{Hv:function(){return i},Vh:function(){return a},Yx:function(){return u},k3:function(){return o},nf:function(){return s},qR:function(){return l}}),r(25478);var n=r(92890);let i=["internal","beta-vip","beta","none"],o="feature_flag_class",a="classed_feature_flag_enabled";function s(){return(0,n.Iw)(o,"none")[0]}function l(e,t,r){if("none"===e||!e||"on"!==t)return!1;let n=i.indexOf(e),o=i.indexOf(r);return -1!==n&&-1!==o&&n<=o}function u(){return(0,n.Iw)(a,null)}},47922:function(e,t,r){"use strict";r.d(t,{y:function(){return a}});var n=r(33299),i=r(59820);async function o(e){return fetch(e).then(e=>e.json())}function a(e){let t=(0,n.useSession)(),r=(0,i.ZP)("/api/flags",o,{refreshInterval:36e5,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateOnMount:!0});return t.data?.user?.featureFlags?.[e]??r.data?.[e]??!1}},18794:function(e,t,r){"use strict";r.d(t,{AP:function(){return y},Bg:function(){return v},De:function(){return p},L0:function(){return g},LL:function(){return h},SC:function(){return m},T6:function(){return u},cd:function(){return f},l6:function(){return l},n8:function(){return c},wI:function(){return d},z0:function(){return s}});var n=r(54029),i=r(92890),o=r(11163);function a(e){let t=(0,n.nf)(),[r]=(0,i.Iw)(n.Vh,null);return(0,n.qR)(t,r,e)}function s(){return a("internal")}function l(){return a("beta")}function u(){return function(e){let t=(0,i.j8)(n.k3,"none"),r=(0,i.j8)(n.Vh,null);return(0,n.qR)(t,r,e)}("internal")}let c=()=>!0,d=()=>!0,f=()=>!0,p=()=>!0,h=()=>!0,m=()=>!0,g=()=>!0;function v(){let{query:e}=(0,o.useRouter)();return"new"===e.createPageLayout||"old"!==e.createPageLayout}function y(){return v()}},81e3:function(e,t,r){"use strict";r.d(t,{e:function(){return a}});var n=r(85893);r(67294);var i=r(33299),o=r(19856);function a(e){let t=(0,i.useSession)();return(0,o.qD)(t.data,e.permission)?(0,n.jsx)(n.Fragment,{children:e.children}):null}},19856:function(e,t,r){"use strict";r.d(t,{qD:function(){return i}});var n=r(86709);function i(e,t){if(!e)return!1;let r=e.user.db.role,i=n.Y[r];return!!i&&i.filter(e=>new RegExp(e).test(t)).length>0}},92890:function(e,t,r){"use strict";r.d(t,{Cq:function(){return o},D1:function(){return d},Iw:function(){return i.I},a7:function(){return c},j8:function(){return a},u7:function(){return u}});var n=r(59345),i=r(32178);let o={};function a(e,t){return i.J[e]??t}let s=[],l=!1;function u(e,t){s.push({key:e,value:t}),l||function e(){if(!s.length)return;l=!0;let{key:t,value:r}=s.shift();fetch("/api/user/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:r})}).then(()=>{(0,n.U)(),l=!1,e()}).catch(()=>{l=!1})}()}function c(){return fetch("/api/user/preferences",{method:"DELETE"}).then(()=>{(0,n.U)()})}function d(e,t,r){return"object"!=typeof e?r:(e??{})[t]??r}},32178:function(e,t,r){"use strict";r.d(t,{I:function(){return s},J:function(){return a}});var n=r(33299),i=r(67294),o=r(92890);let a={};function s(e,t){let r=(0,n.useSession)(),s=r?.data?.user,l=(0,i.useMemo)(()=>(a=s?.db?.preferences??{},s?.db?.preferences??{}),[s?.db?.preferences]),[u,c]=(0,i.useState)(l[e]??t),d=(0,i.useCallback)(t=>{c(t),a[e]=t,(0,o.u7)(e,t)},[e]);return((0,i.useEffect)(()=>{c(l[e]??t),a[e]=l[e]??t},[l,t,e,r.status]),s&&void 0!==u)?[u,d]:[t,d]}},29108:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return p},usePathname:function(){return d},useRouter:function(){return f},useSearchParams:function(){return c},useSelectedLayoutSegment:function(){return m},useSelectedLayoutSegments:function(){return h},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});let n=r(67294),i=r(55716),o=r(77353),a=r(78575),s=r(74565),l=r(8670),u=r(14439);function c(){let e=(0,n.useContext)(o.SearchParamsContext);return(0,n.useMemo)(()=>e?new l.ReadonlyURLSearchParams(e):null,[e])}function d(){return(0,n.useContext)(o.PathnameContext)}function f(){let e=(0,n.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function p(){return(0,n.useContext)(o.PathParamsContext)}function h(e){void 0===e&&(e="children");let t=(0,n.useContext)(i.LayoutRouterContext);return t?function e(t,r,n,i){let o;if(void 0===n&&(n=!0),void 0===i&&(i=[]),n)o=t[1][r];else{var l;let e=t[1];o=null!=(l=e.children)?l:Object.values(e)[0]}if(!o)return i;let u=o[0],c=(0,a.getSegmentValue)(u);return!c||c.startsWith(s.PAGE_SEGMENT_KEY)?i:(i.push(c),e(o,r,!1,i))}(t.tree,e):null}function m(e){void 0===e&&(e="children");let t=h(e);if(!t||0===t.length)return null;let r="children"===e?t[0]:t[t.length-1];return r===s.DEFAULT_SEGMENT_KEY?null:r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8670:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return a},RedirectType:function(){return n.RedirectType},notFound:function(){return i.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});let n=r(58384),i=r(15403);class o extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class a extends URLSearchParams{append(){throw new o}delete(){throw new o}set(){throw new o}sort(){throw new o}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},15403:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isNotFoundError:function(){return i},notFound:function(){return n}});let r="NEXT_NOT_FOUND";function n(){let e=Error(r);throw e.digest=r,e}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80037:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}}),(n=r||(r={}))[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},58384:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return n},getRedirectError:function(){return u},getRedirectStatusCodeFromError:function(){return m},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return p},isRedirectError:function(){return f},permanentRedirect:function(){return d},redirect:function(){return c}});let o=r(95714),a=r(1747),s=r(80037),l="NEXT_REDIRECT";function u(e,t,r){void 0===r&&(r=s.RedirectStatusCode.TemporaryRedirect);let n=Error(l);n.digest=l+";"+t+";"+e+";"+r+";";let i=o.requestAsyncStorage.getStore();return i&&(n.mutableCookies=i.mutableCookies),n}function c(e,t){void 0===t&&(t="replace");let r=a.actionAsyncStorage.getStore();throw u(e,t,(null==r?void 0:r.isAction)?s.RedirectStatusCode.SeeOther:s.RedirectStatusCode.TemporaryRedirect)}function d(e,t){void 0===t&&(t="replace");let r=a.actionAsyncStorage.getStore();throw u(e,t,(null==r?void 0:r.isAction)?s.RedirectStatusCode.SeeOther:s.RedirectStatusCode.PermanentRedirect)}function f(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r,n,i]=e.digest.split(";",4),o=Number(i);return t===l&&("replace"===r||"push"===r)&&"string"==typeof n&&!isNaN(o)&&o in s.RedirectStatusCode}function p(e){return f(e)?e.digest.split(";",3)[2]:null}function h(e){if(!f(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function m(e){if(!f(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(i=n||(n={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},78575:function(e,t){"use strict";function r(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},56101:function(e,t){"use strict";var r,n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_FAST_REFRESH:function(){return d},ACTION_NAVIGATE:function(){return s},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return a},ACTION_RESTORE:function(){return l},ACTION_SERVER_ACTION:function(){return f},ACTION_SERVER_PATCH:function(){return u},PrefetchCacheEntryStatus:function(){return n},PrefetchKind:function(){return r},isThenable:function(){return p}});let a="refresh",s="navigate",l="restore",u="server-patch",c="prefetch",d="fast-refresh",f="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(i=r||(r={})).AUTO="auto",i.FULL="full",i.TEMPORARY="temporary",(o=n||(n={})).fresh="fresh",o.reusable="reusable",o.expired="expired",o.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27670:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return i}});let n=r(51297);function i(e,t,i,o){{let a=r(47969).normalizeLocalePath,s=r(27448).detectDomainLocale,l=t||a(e,i).detectedLocale,u=s(o,void 0,l);if(u){let t="http"+(u.http?"":"s")+"://",r=l===u.defaultLocale?"":"/"+l;return""+t+u.domain+(0,n.normalizePathTrailingSlash)(""+r+e)}return!1}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},26821:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return x}});let n=r(38754),i=r(61757),o=r(85893),a=i._(r(67294)),s=n._(r(73935)),l=n._(r(37219)),u=r(21128),c=r(76252),d=r(29146);r(42723);let f=r(54494),p=n._(r(95176)),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e,t,r,n,i,o,a){let s=null==e?void 0:e.src;e&&e["data-loaded-src"]!==s&&(e["data-loaded-src"]=s,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,i=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==n?void 0:n.current)&&n.current(e)}}))}function g(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}let v=(0,a.forwardRef)((e,t)=>{let{src:r,srcSet:n,sizes:i,height:s,width:l,decoding:u,className:c,style:d,fetchPriority:f,placeholder:p,loading:h,unoptimized:v,fill:y,onLoadRef:x,onLoadingCompleteRef:b,setBlurComplete:w,setShowAltText:_,sizesInput:j,onLoad:C,onError:k,...E}=e;return(0,o.jsx)("img",{...E,...g(f),loading:h,width:l,height:s,decoding:u,"data-nimg":y?"fill":"1",className:c,style:d,sizes:i,srcSet:n,src:r,ref:(0,a.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(k&&(e.src=e.src),e.complete&&m(e,p,x,b,w,v,j))},[r,p,x,b,w,k,v,j,t]),onLoad:e=>{m(e.currentTarget,p,x,b,w,v,j)},onError:e=>{_(!0),"empty"!==p&&w(!0),k&&k(e)}})});function y(e){let{isAppRouter:t,imgAttributes:r}=e,n={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...g(r.fetchPriority)};return t&&s.default.preload?(s.default.preload(r.src,n),null):(0,o.jsx)(l.default,{children:(0,o.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...n},"__nimg-"+r.src+r.srcSet+r.sizes)})}let x=(0,a.forwardRef)((e,t)=>{let r=(0,a.useContext)(f.RouterContext),n=(0,a.useContext)(d.ImageConfigContext),i=(0,a.useMemo)(()=>{let e=h||n||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r}},[n]),{onLoad:s,onLoadingComplete:l}=e,m=(0,a.useRef)(s);(0,a.useEffect)(()=>{m.current=s},[s]);let g=(0,a.useRef)(l);(0,a.useEffect)(()=>{g.current=l},[l]);let[x,b]=(0,a.useState)(!1),[w,_]=(0,a.useState)(!1),{props:j,meta:C}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:i,blurComplete:x,showAltText:w});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v,{...j,unoptimized:C.unoptimized,placeholder:C.placeholder,fill:C.fill,onLoadRef:m,onLoadingCompleteRef:g,setBlurComplete:b,setShowAltText:_,sizesInput:e.sizes,ref:t}),C.priority?(0,o.jsx)(y,{isAppRouter:!r,imgAttributes:j}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24116:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return b}});let n=r(38754),i=r(85893),o=n._(r(67294)),a=r(69975),s=r(92712),l=r(28547),u=r(84350),c=r(38109),d=r(54494),f=r(55716),p=r(388),h=r(27670),m=r(6220),g=r(56101),v=new Set;function y(e,t,r,n,i,o){if(o||(0,s.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(v.has(i))return;v.add(i)}(async()=>o?e.prefetch(t,i):e.prefetch(t,r,n))().catch(e=>{})}}function x(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let b=o.default.forwardRef(function(e,t){let r,n;let{href:l,as:v,children:b,prefetch:w=null,passHref:_,replace:j,shallow:C,scroll:k,locale:E,onClick:S,onMouseEnter:N,onTouchStart:P,legacyBehavior:L=!1,...T}=e;r=b,L&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let O=o.default.useContext(d.RouterContext),R=o.default.useContext(f.AppRouterContext),A=null!=O?O:R,I=!O,M=!1!==w,D=null===w?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:F,as:z}=o.default.useMemo(()=>{if(!O){let e=x(l);return{href:e,as:v?x(v):e}}let[e,t]=(0,a.resolveHref)(O,l,!0);return{href:e,as:v?(0,a.resolveHref)(O,v):t||e}},[O,l,v]),B=o.default.useRef(F),U=o.default.useRef(z);L&&(n=o.default.Children.only(r));let V=L?n&&"object"==typeof n&&n.ref:t,[$,H,Z]=(0,p.useIntersection)({rootMargin:"200px"}),W=o.default.useCallback(e=>{(U.current!==z||B.current!==F)&&(Z(),U.current=z,B.current=F),$(e),V&&("function"==typeof V?V(e):"object"==typeof V&&(V.current=e))},[z,V,F,Z,$]);o.default.useEffect(()=>{A&&H&&M&&y(A,F,z,{locale:E},{kind:D},I)},[z,F,H,E,M,null==O?void 0:O.locale,A,I,D]);let q={ref:W,onClick(e){L||"function"!=typeof S||S(e),L&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),A&&!e.defaultPrevented&&function(e,t,r,n,i,a,l,u,c){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,s.isLocalURL)(r)))return;e.preventDefault();let f=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:a,locale:u,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};c?o.default.startTransition(f):f()}(e,A,F,z,j,C,k,E,I)},onMouseEnter(e){L||"function"!=typeof N||N(e),L&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),A&&(M||!I)&&y(A,F,z,{locale:E,priority:!0,bypassPrefetchedCheck:!0},{kind:D},I)},onTouchStart:function(e){L||"function"!=typeof P||P(e),L&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),A&&(M||!I)&&y(A,F,z,{locale:E,priority:!0,bypassPrefetchedCheck:!0},{kind:D},I)}};if((0,u.isAbsoluteUrl)(z))q.href=z;else if(!L||_||"a"===n.type&&!("href"in n.props)){let e=void 0!==E?E:null==O?void 0:O.locale,t=(null==O?void 0:O.isLocaleDomain)&&(0,h.getDomainLocale)(z,e,null==O?void 0:O.locales,null==O?void 0:O.domainLocales);q.href=t||(0,m.addBasePath)((0,c.addLocale)(z,e,null==O?void 0:O.defaultLocale))}return L?o.default.cloneElement(n,q):(0,i.jsx)("a",{...T,...q,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47969:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});let n=(e,t)=>r(75934).normalizeLocalePath(e,t);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},388:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let n=r(67294),i=r(40460),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:r,disabled:l}=e,u=l||!o,[c,d]=(0,n.useState)(!1),f=(0,n.useRef)(null),p=(0,n.useCallback)(e=>{f.current=e},[]);return(0,n.useEffect)(()=>{if(o){if(u||c)return;let e=f.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:i,elements:o}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=s.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=a.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},s.push(r),a.set(r,t),t}(r);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(n);let e=s.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,r,t,c,f.current]),[p,c,(0,n.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19606:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return a}});let n=r(38754);r(85893),r(67294);let i=n._(r(6119));function o(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=i.default,n={loading:e=>{let{error:t,isLoading:r,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let s=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r({...n,loader:()=>null!=s?s().then(o):Promise.resolve(o(()=>null))}):(delete n.webpack,delete n.modules,a(r,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},21128:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),r(42723);let n=r(32685),i=r(76252);function o(e){return void 0!==e.default}function a(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var r;let s,l,u,{src:c,sizes:d,unoptimized:f=!1,priority:p=!1,loading:h,className:m,quality:g,width:v,height:y,fill:x=!1,style:b,overrideSrc:w,onLoad:_,onLoadingComplete:j,placeholder:C="empty",blurDataURL:k,fetchPriority:E,layout:S,objectFit:N,objectPosition:P,lazyBoundary:L,lazyRoot:T,...O}=e,{imgConf:R,showAltText:A,blurComplete:I,defaultLoader:M}=t,D=R||i.imageConfigDefault;if("allSizes"in D)s=D;else{let e=[...D.deviceSizes,...D.imageSizes].sort((e,t)=>e-t),t=D.deviceSizes.sort((e,t)=>e-t);s={...D,allSizes:e,deviceSizes:t}}if(void 0===M)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let F=O.loader||M;delete O.loader,delete O.srcSet;let z="__next_img_default"in F;if(z){if("custom"===s.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=F;F=t=>{let{config:r,...n}=t;return e(n)}}if(S){"fill"===S&&(x=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[S];e&&(b={...b,...e});let t={responsive:"100vw",fill:"100vw"}[S];t&&!d&&(d=t)}let B="",U=a(v),V=a(y);if("object"==typeof(r=c)&&(o(r)||void 0!==r.src)){let e=o(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,u=e.blurHeight,k=k||e.blurDataURL,B=e.src,!x){if(U||V){if(U&&!V){let t=U/e.width;V=Math.round(e.height*t)}else if(!U&&V){let t=V/e.height;U=Math.round(e.width*t)}}else U=e.width,V=e.height}}let $=!p&&("lazy"===h||void 0===h);(!(c="string"==typeof c?c:B)||c.startsWith("data:")||c.startsWith("blob:"))&&(f=!0,$=!1),s.unoptimized&&(f=!0),z&&c.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(f=!0),p&&(E="high");let H=a(g),Z=Object.assign(x?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:N,objectPosition:P}:{},A?{}:{color:"transparent"},b),W=I||"empty"===C?null:"blur"===C?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:U,heightInt:V,blurWidth:l,blurHeight:u,blurDataURL:k||"",objectFit:Z.objectFit})+'")':'url("'+C+'")',q=W?{backgroundSize:Z.objectFit||"cover",backgroundPosition:Z.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:W}:{},G=function(e){let{config:t,src:r,unoptimized:n,width:i,quality:o,sizes:a,loader:s}=e;if(n)return{src:r,srcSet:void 0,sizes:void 0};let{widths:l,kind:u}=function(e,t,r){let{deviceSizes:n,allSizes:i}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let n;n=e.exec(r);n)t.push(parseInt(n[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=n[0]*e),kind:"w"}}return{widths:i,kind:"w"}}return"number"!=typeof t?{widths:n,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))],kind:"x"}}(t,i,a),c=l.length-1;return{sizes:a||"w"!==u?a:"100vw",srcSet:l.map((e,n)=>s({config:t,src:r,quality:o,width:e})+" "+("w"===u?e:n+1)+u).join(", "),src:s({config:t,src:r,quality:o,width:l[c]})}}({config:s,src:c,unoptimized:f,width:U,quality:H,sizes:d,loader:F});return{props:{...O,loading:$?"lazy":h,fetchPriority:E,width:U,height:V,decoding:"async",className:m,style:{...Z,...q},sizes:G.sizes,srcSet:G.srcSet,src:w||G.src},meta:{unoptimized:f,priority:p,placeholder:C,fill:x}}}},32685:function(e,t){"use strict";function r(e){let{widthInt:t,heightInt:r,blurWidth:n,blurHeight:i,blurDataURL:o,objectFit:a}=e,s=n?40*n:t,l=i?40*i:r,u=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},7e4:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return l},getImageProps:function(){return s}});let n=r(38754),i=r(21128),o=r(26821),a=n._(r(95176));function s(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:a.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let l=o.Image},95176:function(e,t){"use strict";function r(e){let{config:t,src:r,width:n,quality:i}=e;return t.path+"?url="+encodeURIComponent(r)+"&w="+n+"&q="+(i||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}}),r.__next_img_default=!0;let n=r},16725:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=r(38754)._(r(67294)).default.createContext(null)},6119:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let n=r(38754)._(r(67294)),i=r(16725),o=[],a=[],s=!1;function l(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class u{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function c(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),o=null;function l(){if(!o){let t=new u(e,r);o={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return o.promise()}if(!s){let e=r.webpack?r.webpack():r.modules;e&&a.push(t=>{for(let r of e)if(t.includes(r))return l()})}function c(e,t){!function(){l();let e=n.default.useContext(i.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let a=n.default.useSyncExternalStore(o.subscribe,o.getCurrentValue,o.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:o.retry}),[]),n.default.useMemo(()=>{var t;return a.loading||a.error?n.default.createElement(r.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:o.retry}):a.loaded?n.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null},[e,a])}return c.preload=()=>l(),c.displayName="LoadableComponent",n.default.forwardRef(c)}(l,e)}function d(e,t){let r=[];for(;e.length;){let n=e.pop();r.push(n(t))}return Promise.all(r).then(()=>{if(e.length)return d(e,t)})}c.preloadAll=()=>new Promise((e,t)=>{d(o).then(e,t)}),c.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());d(a,e).then(r,r)})),window.__NEXT_PRELOADREADY=c.preloadReady;let f=c},14439:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return o}});let n=r(61757)._(r(67294)),i=n.default.createContext(null);function o(e){let t=(0,n.useContext)(i);t&&t(e)}},21470:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return az}});var n,i,o,a,s,l,u,c,d,f,p,h,m,g,v,y,x,b,w,_,j,C,k,E=r(85893),S=r(70917),N=String.raw,P=N`
  :root,
  :host {
    --chakra-vh: 100vh;
  }

  @supports (height: -webkit-fill-available) {
    :root,
    :host {
      --chakra-vh: -webkit-fill-available;
    }
  }

  @supports (height: -moz-fill-available) {
    :root,
    :host {
      --chakra-vh: -moz-fill-available;
    }
  }

  @supports (height: 100dvh) {
    :root,
    :host {
      --chakra-vh: 100dvh;
    }
  }
`,L=()=>(0,E.jsx)(S.xB,{styles:P}),T=({scope:e=""})=>(0,E.jsx)(S.xB,{styles:N`
      html {
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        font-family: system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        -moz-osx-font-smoothing: grayscale;
        touch-action: manipulation;
      }

      body {
        position: relative;
        min-height: 100%;
        margin: 0;
        font-feature-settings: "kern";
      }

      ${e} :where(*, *::before, *::after) {
        border-width: 0;
        border-style: solid;
        box-sizing: border-box;
        word-wrap: break-word;
      }

      main {
        display: block;
      }

      ${e} hr {
        border-top-width: 1px;
        box-sizing: content-box;
        height: 0;
        overflow: visible;
      }

      ${e} :where(pre, code, kbd,samp) {
        font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 1em;
      }

      ${e} a {
        background-color: transparent;
        color: inherit;
        text-decoration: inherit;
      }

      ${e} abbr[title] {
        border-bottom: none;
        text-decoration: underline;
        -webkit-text-decoration: underline dotted;
        text-decoration: underline dotted;
      }

      ${e} :where(b, strong) {
        font-weight: bold;
      }

      ${e} small {
        font-size: 80%;
      }

      ${e} :where(sub,sup) {
        font-size: 75%;
        line-height: 0;
        position: relative;
        vertical-align: baseline;
      }

      ${e} sub {
        bottom: -0.25em;
      }

      ${e} sup {
        top: -0.5em;
      }

      ${e} img {
        border-style: none;
      }

      ${e} :where(button, input, optgroup, select, textarea) {
        font-family: inherit;
        font-size: 100%;
        line-height: 1.15;
        margin: 0;
      }

      ${e} :where(button, input) {
        overflow: visible;
      }

      ${e} :where(button, select) {
        text-transform: none;
      }

      ${e} :where(
          button::-moz-focus-inner,
          [type="button"]::-moz-focus-inner,
          [type="reset"]::-moz-focus-inner,
          [type="submit"]::-moz-focus-inner
        ) {
        border-style: none;
        padding: 0;
      }

      ${e} fieldset {
        padding: 0.35em 0.75em 0.625em;
      }

      ${e} legend {
        box-sizing: border-box;
        color: inherit;
        display: table;
        max-width: 100%;
        padding: 0;
        white-space: normal;
      }

      ${e} progress {
        vertical-align: baseline;
      }

      ${e} textarea {
        overflow: auto;
      }

      ${e} :where([type="checkbox"], [type="radio"]) {
        box-sizing: border-box;
        padding: 0;
      }

      ${e} input[type="number"]::-webkit-inner-spin-button,
      ${e} input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none !important;
      }

      ${e} input[type="number"] {
        -moz-appearance: textfield;
      }

      ${e} input[type="search"] {
        -webkit-appearance: textfield;
        outline-offset: -2px;
      }

      ${e} input[type="search"]::-webkit-search-decoration {
        -webkit-appearance: none !important;
      }

      ${e} ::-webkit-file-upload-button {
        -webkit-appearance: button;
        font: inherit;
      }

      ${e} details {
        display: block;
      }

      ${e} summary {
        display: list-item;
      }

      template {
        display: none;
      }

      [hidden] {
        display: none !important;
      }

      ${e} :where(
          blockquote,
          dl,
          dd,
          h1,
          h2,
          h3,
          h4,
          h5,
          h6,
          hr,
          figure,
          p,
          pre
        ) {
        margin: 0;
      }

      ${e} button {
        background: transparent;
        padding: 0;
      }

      ${e} fieldset {
        margin: 0;
        padding: 0;
      }

      ${e} :where(ol, ul) {
        margin: 0;
        padding: 0;
      }

      ${e} textarea {
        resize: vertical;
      }

      ${e} :where(button, [role="button"]) {
        cursor: pointer;
      }

      ${e} button::-moz-focus-inner {
        border: 0 !important;
      }

      ${e} table {
        border-collapse: collapse;
      }

      ${e} :where(h1, h2, h3, h4, h5, h6) {
        font-size: inherit;
        font-weight: inherit;
      }

      ${e} :where(button, input, optgroup, select, textarea) {
        padding: 0;
        line-height: inherit;
        color: inherit;
      }

      ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
        display: block;
      }

      ${e} :where(img, video) {
        max-width: 100%;
        height: auto;
      }

      [data-js-focus-visible]
        :focus:not([data-focus-visible-added]):not(
          [data-focus-visible-disabled]
        ) {
        outline: none;
        box-shadow: none;
      }

      ${e} select::-ms-expand {
        display: none;
      }

      ${P}
    `}),O=r(695),R=r(45161),A=r(67294),I=r(33179),M=r(21759),D=r(36597),F=r(76330);function z(e){let{cssVarsRoot:t,theme:r,children:n}=e,i=(0,A.useMemo)(()=>(0,I.c0)(r),[r]);return(0,E.jsxs)(F.a,{theme:i,children:[(0,E.jsx)(B,{root:t}),n]})}function B({root:e=":host, :root"}){let t=[e,"[data-theme]"].join(",");return(0,E.jsx)(S.xB,{styles:e=>({[t]:e.__cssVars})})}var[U,V]=function(e={}){let{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=e,i=(0,A.createContext)(void 0);return i.displayName=n,[i.Provider,function e(){var n;let o=(0,A.useContext)(i);if(!o&&t){let t=Error(r);throw t.name="ContextError",null==(n=Error.captureStackTrace)||n.call(Error,t,e),t}return o},i]}({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function $(){let{colorMode:e}=(0,R.If)();return(0,E.jsx)(S.xB,{styles:t=>{let r=(0,M.Wf)(t,"styles.global"),n=(0,D.Pu)(r,{theme:t,colorMode:e});if(n)return(0,I.iv)(n)(t)}})}var H={light:"chakra-ui-light",dark:"chakra-ui-dark"},Z="chakra-ui-color-mode",W={ssr:!1,type:"localStorage",get(e){let t;if(!(null==globalThis?void 0:globalThis.document))return e;try{t=localStorage.getItem(Z)||e}catch(e){}return t||e},set(e){try{localStorage.setItem(Z,e)}catch(e){}}},q=r(26245),G=()=>{};function Y(e,t){return"cookie"===e.type&&e.ssr?e.get(t):t}function K(e){let{value:t,children:r,options:{useSystemColorMode:n,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=W}=e,s="dark"===i?"dark":"light",[l,u]=(0,A.useState)(()=>Y(a,s)),[c,d]=(0,A.useState)(()=>Y(a)),{getSystemTheme:f,setClassName:p,setDataset:h,addListener:m}=(0,A.useMemo)(()=>(function(e={}){let{preventTransition:t=!0}=e,r={setDataset:e=>{let n=t?r.preventTransition():void 0;document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e,null==n||n()},setClassName(e){document.body.classList.add(e?H.dark:H.light),document.body.classList.remove(e?H.light:H.dark)},query:()=>window.matchMedia("(prefers-color-scheme: dark)"),getSystemTheme(e){var t;return(null!=(t=r.query().matches)?t:"dark"===e)?"dark":"light"},addListener(e){let t=r.query(),n=t=>{e(t.matches?"dark":"light")};return"function"==typeof t.addListener?t.addListener(n):t.addEventListener("change",n),()=>{"function"==typeof t.removeListener?t.removeListener(n):t.removeEventListener("change",n)}},preventTransition(){let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(e)})})}}};return r})({preventTransition:o}),[o]),g="system"!==i||l?l:c,v=(0,A.useCallback)(e=>{let t="system"===e?f():e;u(t),p("dark"===t),h(t),a.set(t)},[a,f,p,h]);(0,q.G)(()=>{"system"===i&&d(f())},[]),(0,A.useEffect)(()=>{let e=a.get();if(e){v(e);return}if("system"===i){v("system");return}v(s)},[a,s,i,v]);let y=(0,A.useCallback)(()=>{v("dark"===g?"light":"dark")},[g,v]);(0,A.useEffect)(()=>{if(n)return m(v)},[n,m,v]);let x=(0,A.useMemo)(()=>({colorMode:null!=t?t:g,toggleColorMode:t?G:y,setColorMode:t?G:v,forced:void 0!==t}),[g,y,v,t]);return(0,E.jsx)(R.kc.Provider,{value:x,children:r})}K.displayName="ColorModeProvider";var X=(0,A.createContext)({getDocument:()=>document,getWindow:()=>window});function J(e){let{children:t,environment:r,disabled:n}=e,i=(0,A.useRef)(null),o=(0,A.useMemo)(()=>r||{getDocument:()=>{var e,t;return null!=(t=null==(e=i.current)?void 0:e.ownerDocument)?t:document},getWindow:()=>{var e,t;return null!=(t=null==(e=i.current)?void 0:e.ownerDocument.defaultView)?t:window}},[r]),a=!n||!r;return(0,E.jsxs)(X.Provider,{value:o,children:[t,a&&(0,E.jsx)("span",{id:"__chakra_env",hidden:!0,ref:i})]})}X.displayName="EnvironmentContext",J.displayName="EnvironmentProvider";var Q=e=>{let{children:t,colorModeManager:r,portalZIndex:n,resetScope:i,resetCSS:o=!0,theme:a={},environment:s,cssVarsRoot:l,disableEnvironment:u,disableGlobalStyle:c}=e,d=(0,E.jsx)(J,{environment:s,disabled:u,children:t});return(0,E.jsx)(z,{theme:a,cssVarsRoot:l,children:(0,E.jsxs)(K,{colorModeManager:r,options:a.config,children:[o?(0,E.jsx)(T,{scope:i}):(0,E.jsx)(L,{}),!c&&(0,E.jsx)($,{}),n?(0,E.jsx)(O.h,{zIndex:n,children:d}):d]})})},ee={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},et={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},er={...et,max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch",container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}},en={breakpoints:{base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},zIndices:{hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},radii:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},blur:{none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},colors:{transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},...ee,sizes:er,shadows:{xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},space:et,borders:{none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},transition:{property:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},easing:{"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},duration:{"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"}}},{defineMultiStyleConfig:ei,definePartsStyle:eo}=(0,I.D)(["stepper","step","title","description","indicator","separator","icon","number"]),ea=(0,I.gJ)("stepper-indicator-size"),es=(0,I.gJ)("stepper-icon-size"),el=(0,I.gJ)("stepper-title-font-size"),eu=(0,I.gJ)("stepper-description-font-size"),ec=(0,I.gJ)("stepper-accent-color"),ed=ei({baseStyle:eo(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[ec.variable]:`colors.${e}.500`,_dark:{[ec.variable]:`colors.${e}.200`}},title:{fontSize:el.reference,fontWeight:"medium"},description:{fontSize:eu.reference,color:"chakra-subtle-text"},number:{fontSize:el.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:es.reference,height:es.reference},indicator:{flexShrink:0,borderRadius:"full",width:ea.reference,height:ea.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:ec.reference},"&[data-status=complete]":{bg:ec.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:ec.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${ea.reference} - 8px)`,top:`calc(${ea.reference} + 4px)`,insetStart:`calc(${ea.reference} / 2 - 1px)`}}})),sizes:{xs:eo({stepper:{[ea.variable]:"sizes.4",[es.variable]:"sizes.3",[el.variable]:"fontSizes.xs",[eu.variable]:"fontSizes.xs"}}),sm:eo({stepper:{[ea.variable]:"sizes.6",[es.variable]:"sizes.4",[el.variable]:"fontSizes.sm",[eu.variable]:"fontSizes.xs"}}),md:eo({stepper:{[ea.variable]:"sizes.8",[es.variable]:"sizes.5",[el.variable]:"fontSizes.md",[eu.variable]:"fontSizes.sm"}}),lg:eo({stepper:{[ea.variable]:"sizes.10",[es.variable]:"sizes.6",[el.variable]:"fontSizes.lg",[eu.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function ef(e,t={}){let r=!1;function n(t){let r=(["container","root"].includes(null!=t?t:"")?[e]:[e,t]).filter(Boolean).join("__"),n=`chakra-${r}`;return{className:n,selector:`.${n}`,toString:()=>t}}return{parts:function(...i){for(let e of(!function(){if(!r){r=!0;return}throw Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}(),i))t[e]=n(e);return ef(e,t)},toPart:n,extend:function(...r){for(let e of r)e in t||(t[e]=n(e));return ef(e,t)},selectors:function(){return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.selector]))},classnames:function(){return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.className]))},get keys(){return Object.keys(t)},__type:{}}}var ep=ef("accordion").parts("root","container","button","panel").extend("icon"),eh=ef("alert").parts("title","description","container").extend("icon","spinner"),em=ef("avatar").parts("label","badge","container").extend("excessLabel","group"),eg=ef("breadcrumb").parts("link","item","container").extend("separator");ef("button").parts();var ev=ef("checkbox").parts("control","icon","container").extend("label");ef("progress").parts("track","filledTrack").extend("label");var ey=ef("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),ex=ef("editable").parts("preview","input","textarea"),eb=ef("form").parts("container","requiredIndicator","helperText"),ew=ef("formError").parts("text","icon"),e_=ef("input").parts("addon","field","element","group"),ej=ef("list").parts("container","item","icon"),eC=ef("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),ek=ef("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),eE=ef("numberinput").parts("root","field","stepperGroup","stepper");ef("pininput").parts("field");var eS=ef("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),eN=ef("progress").parts("label","filledTrack","track"),eP=ef("radio").parts("container","control","label"),eL=ef("select").parts("field","icon"),eT=ef("slider").parts("container","track","thumb","filledTrack","mark"),eO=ef("stat").parts("container","label","helpText","number","icon"),eR=ef("switch").parts("container","track","thumb","label"),eA=ef("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),eI=ef("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),eM=ef("tag").parts("container","label","closeButton"),eD=ef("card").parts("container","header","body","footer");function eF(e){let t=function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString());return t.includes("\\.")?e:Number.isInteger(parseFloat(e.toString()))?e:t.replace(".","\\.")}function ez(e,t){var r,n;let i=function(e,t=""){return`--${function(e,t=""){return[t,eF(e)].filter(Boolean).join("-")}(e,t)}`}(e,null==t?void 0:t.prefix);return{variable:i,reference:(r="string"==typeof(n=null==t?void 0:t.fallback)?n:null==n?void 0:n.reference,`var(${eF(i)}${r?`, ${r}`:""})`)}}ef("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");var eB=r(25432);function eU(e){return(0,eB.Kn)(e)&&e.reference?e.reference:String(e)}var eV=(e,...t)=>t.map(eU).join(` ${e} `).replace(/calc/g,""),e$=(...e)=>`calc(${eV("+",...e)})`,eH=(...e)=>`calc(${eV("-",...e)})`,eZ=(...e)=>`calc(${eV("*",...e)})`,eW=(...e)=>`calc(${eV("/",...e)})`,eq=e=>{let t=eU(e);return null==t||Number.isNaN(parseFloat(t))?eZ(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},eG=Object.assign(e=>({add:(...t)=>eG(e$(e,...t)),subtract:(...t)=>eG(eH(e,...t)),multiply:(...t)=>eG(eZ(e,...t)),divide:(...t)=>eG(eW(e,...t)),negate:()=>eG(eq(e)),toString:()=>e.toString()}),{add:e$,subtract:eH,multiply:eZ,divide:eW,negate:eq}),{defineMultiStyleConfig:eY,definePartsStyle:eK}=(0,I.D)(eR.keys),eX=ez("switch-track-width"),eJ=ez("switch-track-height"),eQ=ez("switch-track-diff"),e0=eG.subtract(eX,eJ),e1=ez("switch-thumb-x"),e2=ez("switch-bg"),e5=(0,I.k0)(e=>{let{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[eX.reference],height:[eJ.reference],transitionProperty:"common",transitionDuration:"fast",[e2.variable]:"colors.gray.300",_dark:{[e2.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[e2.variable]:`colors.${t}.500`,_dark:{[e2.variable]:`colors.${t}.200`}},bg:e2.reference}}),e4=(0,I.k0)({bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[eJ.reference],height:[eJ.reference],_checked:{transform:`translateX(${e1.reference})`}}),e3=eY({baseStyle:eK(e=>({container:{[eQ.variable]:e0,[e1.variable]:eQ.reference,_rtl:{[e1.variable]:eG(eQ).negate().toString()}},track:e5(e),thumb:e4})),sizes:{sm:eK({container:{[eX.variable]:"1.375rem",[eJ.variable]:"sizes.3"}}),md:eK({container:{[eX.variable]:"1.875rem",[eJ.variable]:"sizes.4"}}),lg:eK({container:{[eX.variable]:"2.875rem",[eJ.variable]:"sizes.6"}})},defaultProps:{size:"md",colorScheme:"blue"}});function e6(e,t){return r=>"dark"===r.colorMode?t:e}function e8(e){let{orientation:t,vertical:r,horizontal:n}=e;return t?"vertical"===t?r:n:{}}var{defineMultiStyleConfig:e7,definePartsStyle:e9}=(0,I.D)(eA.keys),te=e9({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),tt=(0,I.k0)({"&[data-is-numeric=true]":{textAlign:"end"}}),tr=e7({baseStyle:te,variants:{simple:e9(e=>{let{colorScheme:t}=e;return{th:{color:e6("gray.600","gray.400")(e),borderBottom:"1px",borderColor:e6(`${t}.100`,`${t}.700`)(e),...tt},td:{borderBottom:"1px",borderColor:e6(`${t}.100`,`${t}.700`)(e),...tt},caption:{color:e6("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),striped:e9(e=>{let{colorScheme:t}=e;return{th:{color:e6("gray.600","gray.400")(e),borderBottom:"1px",borderColor:e6(`${t}.100`,`${t}.700`)(e),...tt},td:{borderBottom:"1px",borderColor:e6(`${t}.100`,`${t}.700`)(e),...tt},caption:{color:e6("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:e6(`${t}.100`,`${t}.700`)(e)},td:{background:e6(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),unstyled:(0,I.k0)({})},sizes:{sm:e9({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:e9({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:e9({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}});function tn(e,t,r){return Math.min(Math.max(e,r),t)}class ti extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}function to(e){if("string"!=typeof e)throw new ti(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=tp.test(e)?function(e){let t=ts[function(e){let t=5381,r=e.length;for(;r;)t=33*t^e.charCodeAt(--r);return(t>>>0)%2341}(e.toLowerCase().trim())];if(!t)throw new ti(e);return`#${t}`}(e):e;let r=tu.exec(t);if(r){let e=Array.from(r).slice(1);return[...e.slice(0,3).map(e=>parseInt(tl(e,2),16)),parseInt(tl(e[3]||"f",2),16)/255]}let n=tc.exec(t);if(n){let e=Array.from(n).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,16)),parseInt(e[3]||"ff",16)/255]}let i=td.exec(t);if(i){let e=Array.from(i).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,10)),parseFloat(e[3]||"1")]}let o=tf.exec(t);if(o){let[t,r,n,i]=Array.from(o).slice(1).map(parseFloat);if(tn(0,100,r)!==r||tn(0,100,n)!==n)throw new ti(e);return[...tm(t,r,n),Number.isNaN(i)?1:i]}throw new ti(e)}let ta=e=>parseInt(e.replace(/_/g,""),36),ts="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{let r=ta(t.substring(0,3)),n=ta(t.substring(3)).toString(16),i="";for(let e=0;e<6-n.length;e++)i+="0";return e[r]=`${i}${n}`,e},{}),tl=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),tu=RegExp(`^#${tl("([a-f0-9])",3)}([a-f0-9])?$`,"i"),tc=RegExp(`^#${tl("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),td=RegExp(`^rgba?\\(\\s*(\\d+)\\s*${tl(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),tf=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,tp=/^[a-z]+$/i,th=e=>Math.round(255*e),tm=(e,t,r)=>{let n=r/100;if(0===t)return[n,n,n].map(th);let i=(e%360+360)%360/60,o=t/100*(1-Math.abs(2*n-1)),a=o*(1-Math.abs(i%2-1)),s=0,l=0,u=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,u=a):i>=3&&i<4?(l=a,u=o):i>=4&&i<5?(s=a,u=o):i>=5&&i<6&&(s=o,u=a);let c=n-o/2;return[s+c,l+c,u+c].map(th)};var tg=e=>0===Object.keys(e).length,tv=(e,t,r)=>{let n=function(e,t,r,n,i){for(t=t.split?t.split("."):t,n=0;n<t.length;n++)e=e?e[t[n]]:void 0;return void 0===e?r:e}(e,`colors.${t}`,t);try{return!function(e){let[t,r,n,i]=to(e),o=e=>{let t=tn(0,255,e).toString(16);return 1===t.length?`0${t}`:t};o(t),o(r),o(n),i<1&&o(Math.round(255*i))}(n),n}catch{return null!=r?r:"#000000"}},ty=e=>{let[t,r,n]=to(e);return(299*t+587*r+114*n)/1e3},tx=e=>t=>128>ty(tv(t,e))?"dark":"light",tb=e=>t=>"dark"===tx(e)(t),tw=(e,t)=>r=>(function(e,t){var r;let[n,i,o,a]=to(e);return r=a-t,`rgba(${tn(0,255,n).toFixed()}, ${tn(0,255,i).toFixed()}, ${tn(0,255,o).toFixed()}, ${parseFloat(tn(0,1,r).toFixed(3))})`})(tv(r,e),1-t);function t_(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
    45deg,
    ${t} 25%,
    transparent 25%,
    transparent 50%,
    ${t} 50%,
    ${t} 75%,
    transparent 75%,
    transparent
  )`,backgroundSize:`${e} ${e}`}}var tj=()=>`#${Math.floor(16777215*Math.random()).toString(16).padEnd(6,"0")}`,tC=(0,I.gJ)("tabs-color"),tk=(0,I.gJ)("tabs-bg"),tE=(0,I.gJ)("tabs-border-color"),{defineMultiStyleConfig:tS,definePartsStyle:tN}=(0,I.D)(eI.keys),tP=(0,I.k0)(e=>{let{orientation:t}=e;return{display:"vertical"===t?"flex":"block"}}),tL=(0,I.k0)(e=>{let{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}}),tT=(0,I.k0)(e=>{let{align:t="start",orientation:r}=e;return{justifyContent:({end:"flex-end",center:"center",start:"flex-start"})[t],flexDirection:"vertical"===r?"column":"row"}}),tO=(0,I.k0)({p:4}),tR=tS({baseStyle:tN(e=>({root:tP(e),tab:tL(e),tablist:tT(e),tabpanel:tO})),sizes:{sm:tN({tab:{py:1,px:4,fontSize:"sm"}}),md:tN({tab:{fontSize:"md",py:2,px:4}}),lg:tN({tab:{fontSize:"lg",py:3,px:4}})},variants:{line:tN(e=>{let{colorScheme:t,orientation:r}=e,n="vertical"===r,i=n?"borderStart":"borderBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[n?"marginStart":"marginBottom"]:"-2px",_selected:{[tC.variable]:`colors.${t}.600`,_dark:{[tC.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[tk.variable]:"colors.gray.200",_dark:{[tk.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:tC.reference,bg:tk.reference}}}),enclosed:tN(e=>{let{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[tE.variable]:"transparent",_selected:{[tC.variable]:`colors.${t}.600`,[tE.variable]:"colors.white",_dark:{[tC.variable]:`colors.${t}.300`,[tE.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:tE.reference},color:tC.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),"enclosed-colored":tN(e=>{let{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[tk.variable]:"colors.gray.50",_dark:{[tk.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[tk.variable]:"colors.white",[tC.variable]:`colors.${t}.600`,_dark:{[tk.variable]:"colors.gray.800",[tC.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:tC.reference,bg:tk.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),"soft-rounded":tN(e=>{let{colorScheme:t,theme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:tv(r,`${t}.700`),bg:tv(r,`${t}.100`)}}}}),"solid-rounded":tN(e=>{let{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[tC.variable]:"colors.gray.600",_dark:{[tC.variable]:"inherit"},_selected:{[tC.variable]:"colors.white",[tk.variable]:`colors.${t}.600`,_dark:{[tC.variable]:"colors.gray.800",[tk.variable]:`colors.${t}.300`}},color:tC.reference,bg:tk.reference}}}),unstyled:tN({})},defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),tA=(0,I._6)("badge",["bg","color","shadow"]),tI=(0,I.k0)({px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:tA.bg.reference,color:tA.color.reference,boxShadow:tA.shadow.reference}),tM=(0,I.k0)(e=>{let{colorScheme:t,theme:r}=e,n=tw(`${t}.500`,.6)(r);return{[tA.bg.variable]:`colors.${t}.500`,[tA.color.variable]:"colors.white",_dark:{[tA.bg.variable]:n,[tA.color.variable]:"colors.whiteAlpha.800"}}}),tD=(0,I.k0)(e=>{let{colorScheme:t,theme:r}=e,n=tw(`${t}.200`,.16)(r);return{[tA.bg.variable]:`colors.${t}.100`,[tA.color.variable]:`colors.${t}.800`,_dark:{[tA.bg.variable]:n,[tA.color.variable]:`colors.${t}.200`}}}),tF=(0,I.k0)(e=>{let{colorScheme:t,theme:r}=e,n=tw(`${t}.200`,.8)(r);return{[tA.color.variable]:`colors.${t}.500`,_dark:{[tA.color.variable]:n},[tA.shadow.variable]:`inset 0 0 0px 1px ${tA.color.reference}`}}),tz=(0,I.fj)({baseStyle:tI,variants:{solid:tM,subtle:tD,outline:tF},defaultProps:{variant:"subtle",colorScheme:"gray"}}),{defineMultiStyleConfig:tB,definePartsStyle:tU}=(0,I.D)(eM.keys),tV=(0,I.gJ)("tag-bg"),t$=(0,I.gJ)("tag-color"),tH=(0,I.gJ)("tag-shadow"),tZ=(0,I.gJ)("tag-min-height"),tW=(0,I.gJ)("tag-min-width"),tq=(0,I.gJ)("tag-font-size"),tG=(0,I.gJ)("tag-padding-inline"),tY=tU({container:(0,I.k0)({fontWeight:"medium",lineHeight:1.2,outline:0,[t$.variable]:tA.color.reference,[tV.variable]:tA.bg.reference,[tH.variable]:tA.shadow.reference,color:t$.reference,bg:tV.reference,boxShadow:tH.reference,borderRadius:"md",minH:tZ.reference,minW:tW.reference,fontSize:tq.reference,px:tG.reference,_focusVisible:{[tH.variable]:"shadows.outline"}}),label:(0,I.k0)({lineHeight:1.2,overflow:"visible"}),closeButton:(0,I.k0)({fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}})}),tK={sm:tU({container:{[tZ.variable]:"sizes.5",[tW.variable]:"sizes.5",[tq.variable]:"fontSizes.xs",[tG.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:tU({container:{[tZ.variable]:"sizes.6",[tW.variable]:"sizes.6",[tq.variable]:"fontSizes.sm",[tG.variable]:"space.2"}}),lg:tU({container:{[tZ.variable]:"sizes.8",[tW.variable]:"sizes.8",[tq.variable]:"fontSizes.md",[tG.variable]:"space.3"}})},tX=tB({variants:{subtle:tU(e=>{var t;return{container:null==(t=tz.variants)?void 0:t.subtle(e)}}),solid:tU(e=>{var t;return{container:null==(t=tz.variants)?void 0:t.solid(e)}}),outline:tU(e=>{var t;return{container:null==(t=tz.variants)?void 0:t.outline(e)}})},baseStyle:tY,sizes:tK,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:tJ,defineMultiStyleConfig:tQ}=(0,I.D)(e_.keys),t0=(0,I.gJ)("input-height"),t1=(0,I.gJ)("input-font-size"),t2=(0,I.gJ)("input-padding"),t5=(0,I.gJ)("input-border-radius"),t4=tJ({addon:{height:t0.reference,fontSize:t1.reference,px:t2.reference,borderRadius:t5.reference},field:{width:"100%",height:t0.reference,fontSize:t1.reference,px:t2.reference,borderRadius:t5.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),t3={lg:(0,I.k0)({[t1.variable]:"fontSizes.lg",[t2.variable]:"space.4",[t5.variable]:"radii.md",[t0.variable]:"sizes.12"}),md:(0,I.k0)({[t1.variable]:"fontSizes.md",[t2.variable]:"space.4",[t5.variable]:"radii.md",[t0.variable]:"sizes.10"}),sm:(0,I.k0)({[t1.variable]:"fontSizes.sm",[t2.variable]:"space.3",[t5.variable]:"radii.sm",[t0.variable]:"sizes.8"}),xs:(0,I.k0)({[t1.variable]:"fontSizes.xs",[t2.variable]:"space.2",[t5.variable]:"radii.sm",[t0.variable]:"sizes.6"})};function t6(e){let{focusBorderColor:t,errorBorderColor:r}=e;return{focusBorderColor:t||e6("blue.500","blue.300")(e),errorBorderColor:r||e6("red.500","red.300")(e)}}var t8=tQ({baseStyle:t4,sizes:{lg:tJ({field:t3.lg,group:t3.lg}),md:tJ({field:t3.md,group:t3.md}),sm:tJ({field:t3.sm,group:t3.sm}),xs:tJ({field:t3.xs,group:t3.xs})},variants:{outline:tJ(e=>{let{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=t6(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:e6("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:tv(t,n),boxShadow:`0 0 0 1px ${tv(t,n)}`},_focusVisible:{zIndex:1,borderColor:tv(t,r),boxShadow:`0 0 0 1px ${tv(t,r)}`}},addon:{border:"1px solid",borderColor:e6("inherit","whiteAlpha.50")(e),bg:e6("gray.100","whiteAlpha.300")(e)}}}),filled:tJ(e=>{let{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=t6(e);return{field:{border:"2px solid",borderColor:"transparent",bg:e6("gray.100","whiteAlpha.50")(e),_hover:{bg:e6("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:tv(t,n)},_focusVisible:{bg:"transparent",borderColor:tv(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:e6("gray.100","whiteAlpha.50")(e)}}}),flushed:tJ(e=>{let{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=t6(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:tv(t,n),boxShadow:`0px 1px 0px 0px ${tv(t,n)}`},_focusVisible:{borderColor:tv(t,r),boxShadow:`0px 1px 0px 0px ${tv(t,r)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),unstyled:tJ({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"md",variant:"outline"}}),t7=(0,I.k0)({...null==(n=t8.baseStyle)?void 0:n.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"}),t9={outline:(0,I.k0)(e=>{var t,r;return null!=(r=null==(t=t8.variants)?void 0:t.outline(e).field)?r:{}}),flushed:(0,I.k0)(e=>{var t,r;return null!=(r=null==(t=t8.variants)?void 0:t.flushed(e).field)?r:{}}),filled:(0,I.k0)(e=>{var t,r;return null!=(r=null==(t=t8.variants)?void 0:t.filled(e).field)?r:{}}),unstyled:null!=(o=null==(i=t8.variants)?void 0:i.unstyled.field)?o:{}},re={xs:null!=(s=null==(a=t8.sizes)?void 0:a.xs.field)?s:{},sm:null!=(u=null==(l=t8.sizes)?void 0:l.sm.field)?u:{},md:null!=(d=null==(c=t8.sizes)?void 0:c.md.field)?d:{},lg:null!=(p=null==(f=t8.sizes)?void 0:f.lg.field)?p:{}},rt=(0,I.fj)({baseStyle:t7,sizes:re,variants:t9,defaultProps:{size:"md",variant:"outline"}}),rr=ez("tooltip-bg"),rn=ez("tooltip-fg"),ri=ez("popper-arrow-bg"),ro=(0,I.k0)({bg:rr.reference,color:rn.reference,[rr.variable]:"colors.gray.700",[rn.variable]:"colors.whiteAlpha.900",_dark:{[rr.variable]:"colors.gray.300",[rn.variable]:"colors.gray.900"},[ri.variable]:rr.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}),ra=(0,I.fj)({baseStyle:ro}),{defineMultiStyleConfig:rs,definePartsStyle:rl}=(0,I.D)(eN.keys),ru=(0,I.k0)(e=>{let{colorScheme:t,theme:r,isIndeterminate:n,hasStripe:i}=e,o=e6(t_(),t_("1rem","rgba(0,0,0,0.1)"))(e),a=e6(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
    to right,
    transparent 0%,
    ${tv(r,a)} 50%,
    transparent 100%
  )`;return{...!n&&i&&o,...n?{bgImage:s}:{bgColor:a}}}),rc=(0,I.k0)({lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"}),rd=(0,I.k0)(e=>({bg:e6("gray.100","whiteAlpha.300")(e)})),rf=(0,I.k0)(e=>({transitionProperty:"common",transitionDuration:"slow",...ru(e)})),rp=rl(e=>({label:rc,filledTrack:rf(e),track:rd(e)})),rh=rs({sizes:{xs:rl({track:{h:"1"}}),sm:rl({track:{h:"2"}}),md:rl({track:{h:"3"}}),lg:rl({track:{h:"4"}})},baseStyle:rp,defaultProps:{size:"md",colorScheme:"blue"}}),rm=e=>"function"==typeof e;function rg(e,...t){return rm(e)?e(...t):e}var{definePartsStyle:rv,defineMultiStyleConfig:ry}=(0,I.D)(ev.keys),rx=(0,I.gJ)("checkbox-size"),rb=(0,I.k0)(e=>{let{colorScheme:t}=e;return{w:rx.reference,h:rx.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:e6(`${t}.500`,`${t}.200`)(e),borderColor:e6(`${t}.500`,`${t}.200`)(e),color:e6("white","gray.900")(e),_hover:{bg:e6(`${t}.600`,`${t}.300`)(e),borderColor:e6(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:e6("gray.200","transparent")(e),bg:e6("gray.200","whiteAlpha.300")(e),color:e6("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:e6(`${t}.500`,`${t}.200`)(e),borderColor:e6(`${t}.500`,`${t}.200`)(e),color:e6("white","gray.900")(e)},_disabled:{bg:e6("gray.100","whiteAlpha.100")(e),borderColor:e6("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:e6("red.500","red.300")(e)}}}),rw=(0,I.k0)({_disabled:{cursor:"not-allowed"}}),r_=(0,I.k0)({userSelect:"none",_disabled:{opacity:.4}}),rj=(0,I.k0)({transitionProperty:"transform",transitionDuration:"normal"}),rC=ry({baseStyle:rv(e=>({icon:rj,container:rw,control:rg(rb,e),label:r_})),sizes:{sm:rv({control:{[rx.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:rv({control:{[rx.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:rv({control:{[rx.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:rk,definePartsStyle:rE}=(0,I.D)(eP.keys),rS=(0,I.k0)(e=>{var t;let r=null==(t=rg(rC.baseStyle,e))?void 0:t.control;return{...r,borderRadius:"full",_checked:{...null==r?void 0:r._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}}),rN=rk({baseStyle:rE(e=>{var t,r;return{label:null==(t=rC.baseStyle)?void 0:t.call(rC,e).label,container:null==(r=rC.baseStyle)?void 0:r.call(rC,e).container,control:rS(e)}}),sizes:{md:rE({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:rE({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:rE({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:rP,definePartsStyle:rL}=(0,I.D)(eL.keys),rT=(0,I.gJ)("select-bg"),rO=rL({field:(0,I.k0)({...null==(h=t8.baseStyle)?void 0:h.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:rT.reference,[rT.variable]:"colors.white",_dark:{[rT.variable]:"colors.gray.700"},"> option, > optgroup":{bg:rT.reference}}),icon:(0,I.k0)({width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}})}),rR=(0,I.k0)({paddingInlineEnd:"8"}),rA=rP({baseStyle:rO,sizes:{lg:{...null==(m=t8.sizes)?void 0:m.lg,field:{...null==(g=t8.sizes)?void 0:g.lg.field,...rR}},md:{...null==(v=t8.sizes)?void 0:v.md,field:{...null==(y=t8.sizes)?void 0:y.md.field,...rR}},sm:{...null==(x=t8.sizes)?void 0:x.sm,field:{...null==(b=t8.sizes)?void 0:b.sm.field,...rR}},xs:{...null==(w=t8.sizes)?void 0:w.xs,field:{...null==(_=t8.sizes)?void 0:_.xs.field,...rR},icon:{insetEnd:"1"}}},variants:t8.variants,defaultProps:t8.defaultProps}),rI=(0,I.gJ)("skeleton-start-color"),rM=(0,I.gJ)("skeleton-end-color"),rD=(0,I.k0)({[rI.variable]:"colors.gray.100",[rM.variable]:"colors.gray.400",_dark:{[rI.variable]:"colors.gray.800",[rM.variable]:"colors.gray.600"},background:rI.reference,borderColor:rM.reference,opacity:.7,borderRadius:"sm"}),rF=(0,I.fj)({baseStyle:rD}),rz=(0,I.gJ)("skip-link-bg"),rB=(0,I.k0)({borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[rz.variable]:"colors.white",_dark:{[rz.variable]:"colors.gray.700"},bg:rz.reference}}),rU=(0,I.fj)({baseStyle:rB}),{defineMultiStyleConfig:rV,definePartsStyle:r$}=(0,I.D)(eT.keys),rH=(0,I.gJ)("slider-thumb-size"),rZ=(0,I.gJ)("slider-track-size"),rW=(0,I.gJ)("slider-bg"),rq=(0,I.k0)(e=>{let{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...e8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}}),rG=(0,I.k0)(e=>({...e8({orientation:e.orientation,horizontal:{h:rZ.reference},vertical:{w:rZ.reference}}),overflow:"hidden",borderRadius:"sm",[rW.variable]:"colors.gray.200",_dark:{[rW.variable]:"colors.whiteAlpha.200"},_disabled:{[rW.variable]:"colors.gray.300",_dark:{[rW.variable]:"colors.whiteAlpha.300"}},bg:rW.reference})),rY=(0,I.k0)(e=>{let{orientation:t}=e;return{...e8({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:rH.reference,h:rH.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}}),rK=(0,I.k0)(e=>{let{colorScheme:t}=e;return{width:"inherit",height:"inherit",[rW.variable]:`colors.${t}.500`,_dark:{[rW.variable]:`colors.${t}.200`},bg:rW.reference}}),rX=rV({baseStyle:r$(e=>({container:rq(e),track:rG(e),thumb:rY(e),filledTrack:rK(e)})),sizes:{lg:r$({container:{[rH.variable]:"sizes.4",[rZ.variable]:"sizes.1"}}),md:r$({container:{[rH.variable]:"sizes.3.5",[rZ.variable]:"sizes.1"}}),sm:r$({container:{[rH.variable]:"sizes.2.5",[rZ.variable]:"sizes.0.5"}})},defaultProps:{size:"md",colorScheme:"blue"}}),rJ=ez("spinner-size"),rQ=(0,I.k0)({width:[rJ.reference],height:[rJ.reference]}),r0={xs:(0,I.k0)({[rJ.variable]:"sizes.3"}),sm:(0,I.k0)({[rJ.variable]:"sizes.4"}),md:(0,I.k0)({[rJ.variable]:"sizes.6"}),lg:(0,I.k0)({[rJ.variable]:"sizes.8"}),xl:(0,I.k0)({[rJ.variable]:"sizes.12"})},r1=(0,I.fj)({baseStyle:rQ,sizes:r0,defaultProps:{size:"md"}}),{defineMultiStyleConfig:r2,definePartsStyle:r5}=(0,I.D)(eO.keys),r4=r2({baseStyle:r5({container:{},label:(0,I.k0)({fontWeight:"medium"}),helpText:(0,I.k0)({opacity:.8,marginBottom:"2"}),number:(0,I.k0)({verticalAlign:"baseline",fontWeight:"semibold"}),icon:(0,I.k0)({marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"})}),sizes:{md:r5({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},defaultProps:{size:"md"}}),r3=(0,I.gJ)("kbd-bg"),r6=(0,I.k0)({[r3.variable]:"colors.gray.100",_dark:{[r3.variable]:"colors.whiteAlpha.100"},bg:r3.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),r8=(0,I.fj)({baseStyle:r6}),r7=(0,I.k0)({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}),r9=(0,I.fj)({baseStyle:r7}),{defineMultiStyleConfig:ne,definePartsStyle:nt}=(0,I.D)(ej.keys),nr=ne({baseStyle:nt({icon:(0,I.k0)({marginEnd:"2",display:"inline",verticalAlign:"text-bottom"})})}),{defineMultiStyleConfig:nn,definePartsStyle:ni}=(0,I.D)(eC.keys),no=(0,I.gJ)("menu-bg"),na=(0,I.gJ)("menu-shadow"),ns=(0,I.k0)({[no.variable]:"#fff",[na.variable]:"shadows.sm",_dark:{[no.variable]:"colors.gray.700",[na.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:no.reference,boxShadow:na.reference}),nl=(0,I.k0)({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[no.variable]:"colors.gray.100",_dark:{[no.variable]:"colors.whiteAlpha.100"}},_active:{[no.variable]:"colors.gray.200",_dark:{[no.variable]:"colors.whiteAlpha.200"}},_expanded:{[no.variable]:"colors.gray.100",_dark:{[no.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:no.reference}),nu=(0,I.k0)({mx:4,my:2,fontWeight:"semibold",fontSize:"sm"}),nc=(0,I.k0)({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),nd=(0,I.k0)({opacity:.6}),nf=(0,I.k0)({border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}),np=nn({baseStyle:ni({button:(0,I.k0)({transitionProperty:"common",transitionDuration:"normal"}),list:ns,item:nl,groupTitle:nu,icon:nc,command:nd,divider:nf})}),{defineMultiStyleConfig:nh,definePartsStyle:nm}=(0,I.D)(ek.keys),ng=(0,I.gJ)("modal-bg"),nv=(0,I.gJ)("modal-shadow"),ny=(0,I.k0)({bg:"blackAlpha.600",zIndex:"modal"}),nx=(0,I.k0)(e=>{let{isCentered:t,scrollBehavior:r}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:"inside"===r?"hidden":"auto",overscrollBehaviorY:"none"}}),nb=(0,I.k0)(e=>{let{isCentered:t,scrollBehavior:r}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:"inside"===r?"calc(100% - 7.5rem)":void 0,[ng.variable]:"colors.white",[nv.variable]:"shadows.lg",_dark:{[ng.variable]:"colors.gray.700",[nv.variable]:"shadows.dark-lg"},bg:ng.reference,boxShadow:nv.reference}}),nw=(0,I.k0)({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),n_=(0,I.k0)({position:"absolute",top:"2",insetEnd:"3"}),nj=(0,I.k0)(e=>{let{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:"inside"===t?"auto":void 0}}),nC=(0,I.k0)({px:"6",py:"4"});function nk(e){return"full"===e?nm({dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}):nm({dialog:{maxW:e}})}var nE=nh({baseStyle:nm(e=>({overlay:ny,dialogContainer:rg(nx,e),dialog:rg(nb,e),header:nw,closeButton:n_,body:rg(nj,e),footer:nC})),sizes:{xs:nk("xs"),sm:nk("sm"),md:nk("md"),lg:nk("lg"),xl:nk("xl"),"2xl":nk("2xl"),"3xl":nk("3xl"),"4xl":nk("4xl"),"5xl":nk("5xl"),"6xl":nk("6xl"),full:nk("full")},defaultProps:{size:"md"}}),{defineMultiStyleConfig:nS,definePartsStyle:nN}=(0,I.D)(eE.keys),nP=ez("number-input-stepper-width"),nL=ez("number-input-input-padding"),nT=eG(nP).add("0.5rem").toString(),nO=ez("number-input-bg"),nR=ez("number-input-color"),nA=ez("number-input-border-color"),nI=(0,I.k0)({[nP.variable]:"sizes.6",[nL.variable]:nT}),nM=(0,I.k0)(e=>{var t,r;return null!=(r=null==(t=rg(t8.baseStyle,e))?void 0:t.field)?r:{}}),nD=(0,I.k0)({width:nP.reference}),nF=(0,I.k0)({borderStart:"1px solid",borderStartColor:nA.reference,color:nR.reference,bg:nO.reference,[nR.variable]:"colors.chakra-body-text",[nA.variable]:"colors.chakra-border-color",_dark:{[nR.variable]:"colors.whiteAlpha.800",[nA.variable]:"colors.whiteAlpha.300"},_active:{[nO.variable]:"colors.gray.200",_dark:{[nO.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}});function nz(e){var t,r,n;let i=null==(t=t8.sizes)?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},a=null!=(n=null==(r=i.field)?void 0:r.fontSize)?n:"md",s=ee.fontSizes[a];return nN({field:{...i.field,paddingInlineEnd:nL.reference,verticalAlign:"top"},stepper:{fontSize:eG(s).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var nB=nS({baseStyle:nN(e=>{var t;return{root:nI,field:null!=(t=rg(nM,e))?t:{},stepperGroup:nD,stepper:nF}}),sizes:{xs:nz("xs"),sm:nz("sm"),md:nz("md"),lg:nz("lg")},variants:t8.variants,defaultProps:t8.defaultProps}),nU=(0,I.k0)({...null==(j=t8.baseStyle)?void 0:j.field,textAlign:"center"}),nV={lg:(0,I.k0)({fontSize:"lg",w:12,h:12,borderRadius:"md"}),md:(0,I.k0)({fontSize:"md",w:10,h:10,borderRadius:"md"}),sm:(0,I.k0)({fontSize:"sm",w:8,h:8,borderRadius:"sm"}),xs:(0,I.k0)({fontSize:"xs",w:6,h:6,borderRadius:"sm"})},n$={outline:(0,I.k0)(e=>{var t,r,n;return null!=(n=null==(r=rg(null==(t=t8.variants)?void 0:t.outline,e))?void 0:r.field)?n:{}}),flushed:(0,I.k0)(e=>{var t,r,n;return null!=(n=null==(r=rg(null==(t=t8.variants)?void 0:t.flushed,e))?void 0:r.field)?n:{}}),filled:(0,I.k0)(e=>{var t,r,n;return null!=(n=null==(r=rg(null==(t=t8.variants)?void 0:t.filled,e))?void 0:r.field)?n:{}}),unstyled:null!=(k=null==(C=t8.variants)?void 0:C.unstyled.field)?k:{}},nH=(0,I.fj)({baseStyle:nU,sizes:nV,variants:n$,defaultProps:t8.defaultProps}),{defineMultiStyleConfig:nZ,definePartsStyle:nW}=(0,I.D)(eS.keys),nq=ez("popper-bg"),nG=ez("popper-arrow-bg"),nY=ez("popper-arrow-shadow-color"),nK=nZ({baseStyle:nW({popper:(0,I.k0)({zIndex:10}),content:(0,I.k0)({[nq.variable]:"colors.white",bg:nq.reference,[nG.variable]:nq.reference,[nY.variable]:"colors.gray.200",_dark:{[nq.variable]:"colors.gray.700",[nY.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}}),header:(0,I.k0)({px:3,py:2,borderBottomWidth:"1px"}),body:(0,I.k0)({px:3,py:2}),footer:(0,I.k0)({px:3,py:2,borderTopWidth:"1px"}),closeButton:(0,I.k0)({position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2})})}),{definePartsStyle:nX,defineMultiStyleConfig:nJ}=(0,I.D)(ey.keys),nQ=(0,I.gJ)("drawer-bg"),n0=(0,I.gJ)("drawer-box-shadow");function n1(e){return"full"===e?nX({dialog:{maxW:"100vw",h:"100vh"}}):nX({dialog:{maxW:e}})}var n2=(0,I.k0)({bg:"blackAlpha.600",zIndex:"modal"}),n5=(0,I.k0)({display:"flex",zIndex:"modal",justifyContent:"center"}),n4=(0,I.k0)(e=>{let{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[nQ.variable]:"colors.white",[n0.variable]:"shadows.lg",_dark:{[nQ.variable]:"colors.gray.700",[n0.variable]:"shadows.dark-lg"},bg:nQ.reference,boxShadow:n0.reference}}),n3=(0,I.k0)({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),n6=(0,I.k0)({position:"absolute",top:"2",insetEnd:"3"}),n8=(0,I.k0)({px:"6",py:"2",flex:"1",overflow:"auto"}),n7=(0,I.k0)({px:"6",py:"4"}),n9=nJ({baseStyle:nX(e=>({overlay:n2,dialogContainer:n5,dialog:rg(n4,e),header:n3,closeButton:n6,body:n8,footer:n7})),sizes:{xs:n1("xs"),sm:n1("md"),md:n1("lg"),lg:n1("2xl"),xl:n1("4xl"),full:n1("full")},defaultProps:{size:"xs"}}),{definePartsStyle:ie,defineMultiStyleConfig:it}=(0,I.D)(ex.keys),ir=it({baseStyle:ie({preview:(0,I.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"}),input:(0,I.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),textarea:(0,I.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}})})}),{definePartsStyle:ii,defineMultiStyleConfig:io}=(0,I.D)(eb.keys),ia=(0,I.gJ)("form-control-color"),is=io({baseStyle:ii({container:{width:"100%",position:"relative"},requiredIndicator:(0,I.k0)({marginStart:"1",[ia.variable]:"colors.red.500",_dark:{[ia.variable]:"colors.red.300"},color:ia.reference}),helperText:(0,I.k0)({mt:"2",[ia.variable]:"colors.gray.600",_dark:{[ia.variable]:"colors.whiteAlpha.600"},color:ia.reference,lineHeight:"normal",fontSize:"sm"})})}),{definePartsStyle:il,defineMultiStyleConfig:iu}=(0,I.D)(ew.keys),ic=(0,I.gJ)("form-error-color"),id=iu({baseStyle:il({text:(0,I.k0)({[ic.variable]:"colors.red.500",_dark:{[ic.variable]:"colors.red.300"},color:ic.reference,mt:"2",fontSize:"sm",lineHeight:"normal"}),icon:(0,I.k0)({marginEnd:"0.5em",[ic.variable]:"colors.red.500",_dark:{[ic.variable]:"colors.red.300"},color:ic.reference})})}),ip=(0,I.k0)({fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}),ih=(0,I.fj)({baseStyle:ip}),im=(0,I.k0)({fontFamily:"heading",fontWeight:"bold"}),ig={"4xl":(0,I.k0)({fontSize:["6xl",null,"7xl"],lineHeight:1}),"3xl":(0,I.k0)({fontSize:["5xl",null,"6xl"],lineHeight:1}),"2xl":(0,I.k0)({fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]}),xl:(0,I.k0)({fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]}),lg:(0,I.k0)({fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]}),md:(0,I.k0)({fontSize:"xl",lineHeight:1.2}),sm:(0,I.k0)({fontSize:"md",lineHeight:1.2}),xs:(0,I.k0)({fontSize:"sm",lineHeight:1.2})},iv=(0,I.fj)({baseStyle:im,sizes:ig,defaultProps:{size:"xl"}}),{defineMultiStyleConfig:iy,definePartsStyle:ix}=(0,I.D)(eg.keys),ib=(0,I.gJ)("breadcrumb-link-decor"),iw=iy({baseStyle:ix({link:(0,I.k0)({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:ib.reference,[ib.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[ib.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}})})}),i_=(0,I.k0)({lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}}),ij=(0,I.k0)(e=>{let{colorScheme:t,theme:r}=e;if("gray"===t)return{color:e6("gray.800","whiteAlpha.900")(e),_hover:{bg:e6("gray.100","whiteAlpha.200")(e)},_active:{bg:e6("gray.200","whiteAlpha.300")(e)}};let n=tw(`${t}.200`,.12)(r),i=tw(`${t}.200`,.24)(r);return{color:e6(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:e6(`${t}.50`,n)(e)},_active:{bg:e6(`${t}.100`,i)(e)}}}),iC=(0,I.k0)(e=>{let{colorScheme:t}=e,r=e6("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:"gray"===t?r:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...rg(ij,e)}}),ik={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},iE=(0,I.k0)(e=>{var t;let{colorScheme:r}=e;if("gray"===r){let t=e6("gray.100","whiteAlpha.200")(e);return{bg:t,color:e6("gray.800","whiteAlpha.900")(e),_hover:{bg:e6("gray.200","whiteAlpha.300")(e),_disabled:{bg:t}},_active:{bg:e6("gray.300","whiteAlpha.400")(e)}}}let{bg:n=`${r}.500`,color:i="white",hoverBg:o=`${r}.600`,activeBg:a=`${r}.700`}=null!=(t=ik[r])?t:{},s=e6(n,`${r}.200`)(e);return{bg:s,color:e6(i,"gray.800")(e),_hover:{bg:e6(o,`${r}.300`)(e),_disabled:{bg:s}},_active:{bg:e6(a,`${r}.400`)(e)}}}),iS=(0,I.k0)(e=>{let{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:e6(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:e6(`${t}.700`,`${t}.500`)(e)}}}),iN=(0,I.k0)({bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}),iP={lg:(0,I.k0)({h:"12",minW:"12",fontSize:"lg",px:"6"}),md:(0,I.k0)({h:"10",minW:"10",fontSize:"md",px:"4"}),sm:(0,I.k0)({h:"8",minW:"8",fontSize:"sm",px:"3"}),xs:(0,I.k0)({h:"6",minW:"6",fontSize:"xs",px:"2"})},iL=(0,I.fj)({baseStyle:i_,variants:{ghost:ij,outline:iC,solid:iE,link:iS,unstyled:iN},sizes:iP,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}}),{definePartsStyle:iT,defineMultiStyleConfig:iO}=(0,I.D)(eD.keys),iR=(0,I.gJ)("card-bg"),iA=(0,I.gJ)("card-padding"),iI=(0,I.gJ)("card-shadow"),iM=(0,I.gJ)("card-radius"),iD=(0,I.gJ)("card-border-width","0"),iF=(0,I.gJ)("card-border-color"),iz=iT({container:{[iR.variable]:"colors.chakra-body-bg",backgroundColor:iR.reference,boxShadow:iI.reference,borderRadius:iM.reference,color:"chakra-body-text",borderWidth:iD.reference,borderColor:iF.reference},body:{padding:iA.reference,flex:"1 1 0%"},header:{padding:iA.reference},footer:{padding:iA.reference}}),iB={sm:iT({container:{[iM.variable]:"radii.base",[iA.variable]:"space.3"}}),md:iT({container:{[iM.variable]:"radii.md",[iA.variable]:"space.5"}}),lg:iT({container:{[iM.variable]:"radii.xl",[iA.variable]:"space.7"}})},iU=iO({baseStyle:iz,variants:{elevated:iT({container:{[iI.variable]:"shadows.base",_dark:{[iR.variable]:"colors.gray.700"}}}),outline:iT({container:{[iD.variable]:"1px",[iF.variable]:"colors.chakra-border-color"}}),filled:iT({container:{[iR.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[iA.variable]:0},header:{[iA.variable]:0},footer:{[iA.variable]:0}}},sizes:iB,defaultProps:{variant:"elevated",size:"md"}}),iV=ez("close-button-size"),i$=ez("close-button-bg"),iH=(0,I.k0)({w:[iV.reference],h:[iV.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[i$.variable]:"colors.blackAlpha.100",_dark:{[i$.variable]:"colors.whiteAlpha.100"}},_active:{[i$.variable]:"colors.blackAlpha.200",_dark:{[i$.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:i$.reference}),iZ={lg:(0,I.k0)({[iV.variable]:"sizes.10",fontSize:"md"}),md:(0,I.k0)({[iV.variable]:"sizes.8",fontSize:"xs"}),sm:(0,I.k0)({[iV.variable]:"sizes.6",fontSize:"2xs"})},iW=(0,I.fj)({baseStyle:iH,sizes:iZ,defaultProps:{size:"md"}}),{variants:iq,defaultProps:iG}=tz,iY=(0,I.k0)({fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:tA.bg.reference,color:tA.color.reference,boxShadow:tA.shadow.reference}),iK=(0,I.fj)({baseStyle:iY,variants:iq,defaultProps:iG}),iX=(0,I.k0)({w:"100%",mx:"auto",maxW:"prose",px:"4"}),iJ=(0,I.fj)({baseStyle:iX}),iQ=(0,I.k0)({opacity:.6,borderColor:"inherit"}),i0=(0,I.k0)({borderStyle:"solid"}),i1=(0,I.k0)({borderStyle:"dashed"}),i2=(0,I.fj)({baseStyle:iQ,variants:{solid:i0,dashed:i1},defaultProps:{variant:"solid"}}),{definePartsStyle:i5,defineMultiStyleConfig:i4}=(0,I.D)(ep.keys),i3=i4({baseStyle:i5({container:(0,I.k0)({borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}}),button:(0,I.k0)({transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"}),panel:(0,I.k0)({pt:"2",px:"4",pb:"5"}),icon:(0,I.k0)({fontSize:"1.25em"})})}),{definePartsStyle:i6,defineMultiStyleConfig:i8}=(0,I.D)(eh.keys),i7=(0,I.gJ)("alert-fg"),i9=(0,I.gJ)("alert-bg");function oe(e){let{theme:t,colorScheme:r}=e,n=tw(`${r}.200`,.16)(t);return{light:`colors.${r}.100`,dark:n}}var ot=i8({baseStyle:i6({container:{bg:i9.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:i7.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:i7.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}}),variants:{subtle:i6(e=>{let{colorScheme:t}=e,r=oe(e);return{container:{[i7.variable]:`colors.${t}.600`,[i9.variable]:r.light,_dark:{[i7.variable]:`colors.${t}.200`,[i9.variable]:r.dark}}}}),"left-accent":i6(e=>{let{colorScheme:t}=e,r=oe(e);return{container:{[i7.variable]:`colors.${t}.600`,[i9.variable]:r.light,_dark:{[i7.variable]:`colors.${t}.200`,[i9.variable]:r.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:i7.reference}}}),"top-accent":i6(e=>{let{colorScheme:t}=e,r=oe(e);return{container:{[i7.variable]:`colors.${t}.600`,[i9.variable]:r.light,_dark:{[i7.variable]:`colors.${t}.200`,[i9.variable]:r.dark},pt:"2",borderTopWidth:"4px",borderTopColor:i7.reference}}}),solid:i6(e=>{let{colorScheme:t}=e;return{container:{[i7.variable]:"colors.white",[i9.variable]:`colors.${t}.600`,_dark:{[i7.variable]:"colors.gray.900",[i9.variable]:`colors.${t}.200`},color:i7.reference}}})},defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:or,defineMultiStyleConfig:on}=(0,I.D)(em.keys),oi=(0,I.gJ)("avatar-border-color"),oo=(0,I.gJ)("avatar-bg"),oa=(0,I.gJ)("avatar-font-size"),os=(0,I.gJ)("avatar-size"),ol=(0,I.k0)({borderRadius:"full",border:"0.2em solid",borderColor:oi.reference,[oi.variable]:"white",_dark:{[oi.variable]:"colors.gray.800"}}),ou=(0,I.k0)({bg:oo.reference,fontSize:oa.reference,width:os.reference,height:os.reference,lineHeight:"1",[oo.variable]:"colors.gray.200",_dark:{[oo.variable]:"colors.whiteAlpha.400"}}),oc=(0,I.k0)(e=>{let{name:t,theme:r}=e,n=t?function(e){var t;let r=tj();return!e||tg(e)?r:e.string&&e.colors?function(e,t){let r=0;if(0===e.length)return t[0];for(let t=0;t<e.length;t+=1)r=e.charCodeAt(t)+((r<<5)-r),r&=r;return r=(r%t.length+t.length)%t.length,t[r]}(e.string,e.colors):e.string&&!e.colors?function(e){let t=0;if(0===e.length)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t&=t;let r="#";for(let e=0;e<3;e+=1){let n=t>>8*e&255;r+=`00${n.toString(16)}`.substr(-2)}return r}(e.string):e.colors&&!e.string?(t=e.colors)[Math.floor(Math.random()*t.length)]:r}({string:t}):"colors.gray.400",i=tb(n)(r),o="white";return i||(o="gray.800"),{bg:oo.reference,fontSize:oa.reference,color:o,borderColor:oi.reference,verticalAlign:"top",width:os.reference,height:os.reference,"&:not([data-loaded])":{[oo.variable]:n},[oi.variable]:"colors.white",_dark:{[oi.variable]:"colors.gray.800"}}}),od=(0,I.k0)({fontSize:oa.reference,lineHeight:"1"});function of(e){let t="100%"!==e?er[e]:void 0;return or({container:{[os.variable]:null!=t?t:e,[oa.variable]:`calc(${null!=t?t:e} / 2.5)`},excessLabel:{[os.variable]:null!=t?t:e,[oa.variable]:`calc(${null!=t?t:e} / 2.5)`}})}var op=on({baseStyle:or(e=>({badge:rg(ol,e),excessLabel:rg(ou,e),container:rg(oc,e),label:od})),sizes:{"2xs":of(4),xs:of(6),sm:of(8),md:of(12),lg:of(16),xl:of(24),"2xl":of(32),full:of("100%")},defaultProps:{size:"md"}}),oh={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},om={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},og={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},ov={semanticTokens:oh,direction:"ltr",...en,components:{Accordion:i3,Alert:ot,Avatar:op,Badge:tz,Breadcrumb:iw,Button:iL,Checkbox:rC,CloseButton:iW,Code:iK,Container:iJ,Divider:i2,Drawer:n9,Editable:ir,Form:is,FormError:id,FormLabel:ih,Heading:iv,Input:t8,Kbd:r8,Link:r9,List:nr,Menu:np,Modal:nE,NumberInput:nB,PinInput:nH,Popover:nK,Progress:rh,Radio:rN,Select:rA,Skeleton:rF,SkipLink:rU,Slider:rX,Spinner:r1,Stat:r4,Switch:e3,Table:tr,Tabs:tR,Tag:tX,Textarea:rt,Tooltip:ra,Card:iU,Stepper:ed},styles:om,config:og},oy={semanticTokens:oh,direction:"ltr",components:{},...en,styles:om,config:og},ox=(e,t)=>e.find(e=>e.id===t);function ob(e,t){let r=ow(e,t),n=r?e[r].findIndex(e=>e.id===t):-1;return{position:r,index:n}}function ow(e,t){for(let[r,n]of Object.entries(e))if(ox(n,t))return r}var o_=r(35155),oj=r(52366),oC=r(15947),ok=r(88361),oE=r(16914),oS={initial:e=>{let{position:t}=e,r=["top","bottom"].includes(t)?"y":"x",n=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(n=1),{opacity:0,[r]:24*n}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},oN=(0,A.memo)(e=>{let{id:t,message:r,onCloseComplete:n,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=oS,toastSpacing:c="0.5rem"}=e,[d,f]=(0,A.useState)(s),p=(0,oC.hO)();(0,oj.r)(()=>{p||null==n||n()},[p]),(0,oj.r)(()=>{f(s)},[s]);let h=()=>{p&&i()};(0,A.useEffect)(()=>{p&&o&&i()},[p,o,i]),function(e,t){let r=(0,o_.W)(e);(0,A.useEffect)(()=>{if(null==t)return;let e=null;return e=window.setTimeout(()=>{r()},t),()=>{e&&window.clearTimeout(e)}},[t,r])}(h,d);let m=(0,A.useMemo)(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),g=(0,A.useMemo)(()=>(function(e){let t=e.includes("right"),r=e.includes("left"),n="center";return t&&(n="flex-end"),r&&(n="flex-start"),{display:"flex",flexDirection:"column",alignItems:n}})(a),[a]);return(0,E.jsx)(ok.E.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:()=>f(null),onHoverEnd:()=>f(s),custom:{position:a},style:g,children:(0,E.jsx)(oE.m.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:m,children:(0,eB.Pu)(r,{id:t,onClose:h})})})});oN.displayName="ToastComponent";var oP=r(36948);function oL(e){return(0,E.jsx)(oP.J,{viewBox:"0 0 24 24",...e,children:(0,E.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var oT=r(55227),oO=r(81136),[oR,oA]=(0,oT.k)({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[oI,oM]=(0,oT.k)({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),oD={info:{icon:function(e){return(0,E.jsx)(oP.J,{viewBox:"0 0 24 24",...e,children:(0,E.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})},colorScheme:"blue"},warning:{icon:oL,colorScheme:"orange"},success:{icon:function(e){return(0,E.jsx)(oP.J,{viewBox:"0 0 24 24",...e,children:(0,E.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})},colorScheme:"green"},error:{icon:oL,colorScheme:"red"},loading:{icon:oO.$,colorScheme:"blue"}},oF=r(16554),oz=r(27603),oB=(0,oF.G)(function(e,t){var r;let{status:n="info",addRole:i=!0,...o}=(0,I.Lr)(e),a=null!=(r=e.colorScheme)?r:oD[n].colorScheme,s=(0,oz.jC)("Alert",{...e,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return(0,E.jsx)(oR,{value:{status:n},children:(0,E.jsx)(oI,{value:s,children:(0,E.jsx)(oE.m.div,{"data-status":n,role:i?"alert":void 0,ref:t,...o,className:(0,eB.cx)("chakra-alert",e.className),__css:l})})})});function oU(e){let{status:t}=oA(),r=oD[t].icon,n=oM(),i="loading"===t?n.spinner:n.icon;return(0,E.jsx)(oE.m.span,{display:"inherit","data-status":t,...e,className:(0,eB.cx)("chakra-alert__icon",e.className),__css:i,children:e.children||(0,E.jsx)(r,{h:"100%",w:"100%"})})}oB.displayName="Alert",oU.displayName="AlertIcon";var oV=(0,oF.G)(function(e,t){let r=oM(),{status:n}=oA();return(0,E.jsx)(oE.m.div,{ref:t,"data-status":n,...e,className:(0,eB.cx)("chakra-alert__title",e.className),__css:r.title})});oV.displayName="AlertTitle";var o$=(0,oF.G)(function(e,t){let r=oM(),{status:n}=oA(),i={display:"inline",...r.description};return(0,E.jsx)(oE.m.div,{ref:t,"data-status":n,...e,className:(0,eB.cx)("chakra-alert__desc",e.className),__css:i})});o$.displayName="AlertDescription";var oH=r(3949),oZ=function(e){let t=e,r=new Set,n=e=>{t=e(t),r.forEach(e=>e())};return{getState:()=>t,subscribe:t=>(r.add(t),()=>{n(()=>e),r.delete(t)}),removeToast:(e,t)=>{n(r=>({...r,[t]:r[t].filter(t=>t.id!=e)}))},notify:(e,t)=>{let r=function(e,t={}){var r,n;oW+=1;let i=null!=(r=t.id)?r:oW,o=null!=(n=t.position)?n:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>oZ.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:i,id:o}=r;return n(e=>{var t,n;let o=i.includes("top")?[r,...null!=(t=e[i])?t:[]]:[...null!=(n=e[i])?n:[],r];return{...e,[i]:o}}),o},update:(e,t)=>{e&&n(r=>{let n={...r},{position:i,index:o}=ob(n,e);return i&&-1!==o&&(n[i][o]={...n[i][o],...t,message:function(e={}){let{render:t,toastComponent:r=oq}=e;return n=>"function"==typeof t?t({...n,...e}):(0,E.jsx)(r,{...n,...e})}(t)}),n})},closeAll:({positions:e}={})=>{n(t=>(null!=e?e:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((e,r)=>(e[r]=t[r].map(e=>({...e,requestClose:!0})),e),{...t}))},close:e=>{n(t=>{let r=ow(t,e);return r?{...t,[r]:t[r].map(t=>t.id==e?{...t,requestClose:!0}:t)}:t})},isActive:e=>!!ob(oZ.getState(),e).position}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]}),oW=0,oq=e=>{let{status:t,variant:r="solid",id:n,title:i,isClosable:o,onClose:a,description:s,colorScheme:l,icon:u}=e,c=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return(0,E.jsxs)(oB,{addRole:!1,status:t,variant:r,id:null==c?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[(0,E.jsx)(oU,{children:u}),(0,E.jsxs)(oE.m.div,{flex:"1",maxWidth:"100%",children:[i&&(0,E.jsx)(oV,{id:null==c?void 0:c.title,children:i}),s&&(0,E.jsx)(o$,{id:null==c?void 0:c.description,display:"block",children:s})]}),o&&(0,E.jsx)(oH.P,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})},oG=r(12668),oY=r(1702),[oK,oX]=(0,oT.k)({name:"ToastOptionsContext",strict:!1}),oJ=e=>{let t=(0,A.useSyncExternalStore)(oZ.subscribe,oZ.getState,oZ.getState),{motionVariants:r,component:n=oN,portalProps:i}=e,o=Object.keys(t).map(e=>{let i=t[e];return(0,E.jsx)("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${e}`,id:`chakra-toast-manager-${e}`,style:function(e){let t=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,r=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,n=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",i=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===e||"bottom"===e?"0 auto":void 0,top:t,bottom:r,right:n,left:i}}(e),children:(0,E.jsx)(oG.M,{initial:!1,children:i.map(e=>(0,E.jsx)(n,{motionVariants:r,...e},e.id))})},e)});return(0,E.jsx)(oY.h,{...i,children:o})},oQ=e=>function({children:t,theme:r=e,toastOptions:n,...i}){return(0,E.jsxs)(Q,{theme:r,...i,children:[(0,E.jsx)(oK,{value:null==n?void 0:n.defaultOptions,children:t}),(0,E.jsx)(oJ,{...n})]})},o0=oQ(ov);oQ(oy);var o1=r(11163),o2=r(83253),o5=r.n(o2),o4=r(39371),o3=r(8891),o6=r.n(o3),o8=r(54167);function o7(e){let{id:t}=e,{imageData:r}=(0,o8.g)();return((0,A.useEffect)(()=>{t&&o6().track("Viewed Image",{imageId:t})},[t]),r)?(0,E.jsx)(o4.Z,{image:r,isInModal:!0},r?.id):null}var o9=r(62363),ae=r(84460),at=r.n(ae),ar=r(41664),an=r.n(ar),ai=r(33299),ao=r(57718),aa=r(93123),as=r(81810),al=r(87297),au=r(1233),ac=r(69306),ad=r(13346),af=r(17877),ap=r(32478);function ah(e){let{showNavbar:t}=e,r=(0,o1.useRouter)(),n=(0,ai.useSession)(),[i,o]=(0,A.useState)(!1),[a,s]=(0,A.useState)(null),{imageModalState:l,setImageModalState:u}=(0,o8.g)(),c="complete"===l,d=(0,as.OR)(r.query.postId),f=(0,A.useCallback)(()=>{u("loading"),o(!1);let e=localStorage.getItem("modal-return-to");r.asPath===e&&r.push("/feed"),"/"===e&&(e="/feed"),e?r.push(e,void 0,{shallow:!0}):r.back()},[r]);(0,A.useEffect)(()=>{let e=e=>{e.target===e.currentTarget&&f()},t=e=>{a&&"Escape"===e.key&&f()};return a?.addEventListener("click",e),document.addEventListener("keydown",t),()=>{a?.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[f,c,d,a]),!d&&i&&o(!1),(0,A.useEffect)(()=>(document.addEventListener("pai:modal:close",f),()=>{document.removeEventListener("pai:modal:close",f)}),[f]),(0,A.useEffect)(()=>{"undefined"!=typeof localStorage&&"true"!==localStorage.getItem("hide-modal-cta-banner")&&!n.data&&"loading"!==n.status&&c&&setTimeout(()=>{o(!0)},2e3)},[n,c]);let[p,h]=(0,A.useState)(!1);(0,A.useEffect)(()=>{h(!!d)},[d]);let m=(0,ac.OV)("xs"),g=(0,ao.T)()?"pt-[70px]":"pt-8",v=`md:pb-32 md:px-8 ${t?`${g} md:pt-14`:"md:pt-10"}`;return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(o5(),{shouldFocusAfterRender:!1,style:{overlay:{backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:aa.KN.FEED_IMAGE_MODAL,display:"flex",alignItems:"center",justifyContent:"center",...t?{marginTop:m?"44px":"64px"}:{}}},contentRef:e=>{s(e)},className:`outline-none will-change-transform transform-gpu w-screen h-screen overflow-auto ${v} flex justify-center min-h-screen ${p&&d&&"complete"===l?"open":""}`,onRequestClose:f,isOpen:!!d,children:(0,E.jsx)("div",{className:"my-auto mx-auto overflow-x-hidden md:overflow-x-visible",children:(0,E.jsx)("div",{className:(0,au.cn)("p-0 border-none relative md:rounded-lg","bg-background"),children:(0,E.jsxs)("div",{className:"relative",children:[(0,E.jsx)(oH.P,{style:{color:"white",opacity:.6,width:12,height:12,padding:16},width:16,height:16,className:`absolute right-4 top-4 z-40 !hidden md:!flex !transition-none ${c?"opacity-0":""}`,onClick:f}),(0,E.jsx)(o7,{id:d},d)]})})})}),!t&&d&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(al.h,{onClick:()=>{document.dispatchEvent(new Event("pai:modal:prev"))},className:"fixed z-[1000] hidden lg:flex left-4 top-1/2 -translate-y-1/2",children:(0,E.jsx)(o9.s$,{})}),(0,E.jsx)(al.h,{onClick:()=>{document.dispatchEvent(new Event("pai:modal:next"))},className:"fixed z-[1000] hidden lg:flex right-4 top-1/2 -translate-y-1/2",children:(0,E.jsx)(o9._Q,{})})]}),d&&(0,E.jsx)(am,{show:i,closeBanner:function(){localStorage.setItem("hide-modal-cta-banner","true"),o(!1)}})]})}function am(e){let{show:t,closeBanner:r}=e;return(0,E.jsx)("div",{className:`${at()["join-banner"]} ${t?"":at().closed}`,children:(0,E.jsxs)("div",{className:"flex items-center justify-center gap-2 w-full",children:[(0,E.jsx)(af.K,{className:"h-8 w-8 hidden md:block"}),(0,E.jsx)("p",{className:"text-pg-200 text-sm font-pg-medium",children:"Create your first image using Playground."}),(0,E.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,E.jsx)(ad.z,{variant:"create",asChild:!0,className:"gap-2",children:(0,E.jsxs)(an(),{href:"/login",children:[(0,E.jsx)(o9.Gq,{}),"Create"]})}),(0,E.jsx)(ad.z,{size:"icon",onClick:r,children:(0,E.jsx)(ap.Z,{})})]})]})})}var ag=r(9008),av=r.n(ag);r(39366);var ay=r(31630),ax=r(92323),ab=r(78358),aw=r(22543),a_=r(23659),aj=r(74371),aC=r(10404),ak=r(4298),aE=r.n(ak);function aS(){return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(aE(),{src:"https://www.googletagmanager.com/gtag/js?id=G-PLJRH784LG"}),(0,E.jsx)(aE(),{id:"google-analytics",strategy:"afterInteractive",children:`window.dataLayer = window.dataLayer || [];

        function gtag(){dataLayer.push(arguments);}

        gtag('js', new Date());

        gtag('config', 'G-PLJRH784LG');
        gtag('config', 'AW-16545035336');
        `})]})}function aN(){return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(aE(),{id:"meta-pixel",strategy:"afterInteractive",children:`!function(f,b,e,v,n,t,s)
      {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
      n.callMethod.apply(n,arguments):n.queue.push(arguments)};
      if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
      n.queue=[];t=b.createElement(e);t.async=!0;
      t.src=v;s=b.getElementsByTagName(e)[0];
      s.parentNode.insertBefore(t,s)}(window, document,'script',
      'https://connect.facebook.net/en_US/fbevents.js');
      fbq('init', '987513596183144');
      fbq('track', 'PageView');
      `}),(0,E.jsx)("noscript",{children:(0,E.jsx)("img",{height:"1",width:"1",style:{display:"none"},src:"https://www.facebook.com/tr?id=987513596183144&ev=PageView&noscript=1",alt:"meta pixel"})})]})}var aP=r(5152),aL=r.n(aP),aT=r(76581),aO=r(13383),aR=r(9454),aA=r(71864),aI=r(49582),aM=r(92890);let aD=aL()(()=>r.e(7531).then(r.bind(r,27531)),{loadableGenerated:{webpack:()=>[27531]},ssr:!1});function aF(e){let t=(0,o1.useRouter)(),{baseImage:r}=(0,aC.I)(),{setShowSidebars:n}=(0,aj.Z)();(0,A.useEffect)(()=>{aw.D.arePathsEqual("/create",t.asPath)&&n(!1)},[t.asPath,n]);let{disableTitle:i,useAppLayoutLoggedIn:o,useAppLayoutLoggedOut:a,headerConfig:s,className:l}=aw.D.findRoute(t.asPath),u=!!e.session?.user,c=(0,ac.c0)(768);return t.pathname?.startsWith("/design")||t.pathname?.startsWith("/templates")||"/login"===t.pathname?(0,E.jsx)(aR.ER,{hideSidebar:e.hideSidebar,children:e.children}):!e.is404&&(u?o:a)?(0,E.jsx)(a_.ZP,{disableTitle:i,headerConfig:s,liftHeaderZIndex:"/post/[postId]"===t.route||c,className:l,baseImage:r,children:e.children},r?.id):(0,E.jsx)(E.Fragment,{children:e.children})}function az(e){let{Component:t,pageProps:r}=e,{session:n}=r;o5().setAppElement("#__next");let i=(0,o1.useRouter)();(function(e){let t=(0,o1.useRouter)();(0,A.useEffect)(()=>{"1"===t.query.new_user&&e?.user.id&&(window.fbq&&window.fbq("track","CompleteRegistration",{external_id:e.user.id}),window.gtag&&window.gtag("event","conversion",{send_to:"AW-16545035336/kgBKCIuW6sMZEMjopNE9",event_callback:()=>{}}))},[t.query,e?.user.id]),(0,A.useEffect)(()=>{let{fbc:e}=(0,aI.JW)(t.query)??{};e&&(0,aM.u7)("fbc",e)},[t.query])})(n),function(e){let t=(0,o1.useRouter)();(0,A.useEffect)(()=>{let r=()=>{let t=window.location.pathname,r=document.title,n=new URLSearchParams(window.location.search),i=n.get("utm_source"),o=n.get("utm_medium"),a=n.get("utm_campaign"),s=n.get("utm_term"),l=n.get("utm_content"),u=n.get("source"),c=document.referrer,d={userId:e?.user.id,url:t,title:r,utm_source:i,utm_medium:o,utm_campaign:a,utm_term:s,utm_content:l,source:u,referrer:c,event_src:"app"};Object.keys(d).forEach(e=>void 0===d[e]&&delete d[e]),o6().track("Page view",d)};return t.events.on("routeChangeComplete",r),r(),()=>{t.events.off("routeChangeComplete",r)}},[t.events])}(n),function(e){let t=(0,ab.nR)(e?.user?.subscriptions??[]),r=(0,ab.fm)(e?.user?.subscriptions??[]),n=(0,ab.Gr)(e?.user?.subscriptions??[]);e?.user&&(o6().identify(e.user.id),o6().register({email:e.user.email})),(0,A.useEffect)(()=>{e?.user&&(o6().identify(e.user.id),o6().people.set({...e.user.db,$email:e.user.email,$name:e.user.db.displayName,isPro:t||r||n,plan:n?"Pro Design":r?"Turbo":t?"Pro":"Free",user_group:e.user.db.preferences.userGroup}))},[e?.user,t,r,n])}(n);let o=(0,ac.c0)(768);return(0,E.jsxs)(ai.SessionProvider,{refetchWhenOffline:!1,refetchOnWindowFocus:!1,session:n,children:[aD&&(0,E.jsx)(aD,{}),(0,E.jsxs)(av(),{children:[(0,E.jsx)("meta",{property:"og:type",content:"website"}),(0,E.jsx)("meta",{property:"og:site_name",content:"Playground"}),(0,E.jsx)("meta",{name:"keywords",content:"image generator,stable diffusion,DALL-E,graphic design software,free online image editing software,free design media and templates,Playground"}),(0,E.jsx)("meta",{name:"description",content:"Playground (official site) is a Free AI Image Generator. Use it to create art, social media posts, presentations, posters, videos, logos and more."})]}),(0,E.jsx)(aS,{}),(0,E.jsx)(aN,{}),(0,E.jsx)(aB,{}),(0,E.jsx)(aT.pn,{delayDuration:100,children:(0,E.jsx)(ay.bm,{children:(0,E.jsx)(o0,{disableGlobalStyle:!0,children:(0,E.jsx)(ax.D,{children:(0,E.jsxs)(o8.Z,{initialImage:r.image??null,children:[(0,E.jsx)(ah,{showNavbar:!!r.postId||o}),(0,E.jsx)(aA.u9,{children:(0,E.jsx)(aF,{is404:"Error404"===t.name||"/404"===i.pathname,session:n,hideSidebar:r.hideDesignSidebar,children:(0,E.jsx)(t,{...r})})}),(0,E.jsx)(aO.J,{})]})})})})})]})}function aB(){return!function(){let{update:e}=(0,ai.useSession)();(0,A.useEffect)(()=>{let t=async()=>{navigator.onLine&&await e()};return window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}},[e])}(),null}o6().init("6b1350e8b0f49e807d55acabb72f5739",{api_host:"https://mp.playground.com",track_pageview:"full-url"})},79408:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return j},default:function(){return P},hideReportedImage:function(){return k},privatizeReportedImage:function(){return C}});var n=r(85893),i=r(59820),o=r(24027),a=(0,o.I)({displayName:"ArrowLeftIcon",path:(0,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),(0,n.jsx)("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})}),s=(0,o.I)({displayName:"ArrowRightIcon",path:(0,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),(0,n.jsx)("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})}),l=r(53468),u=r(23659),c=r(46704),d=r(92323),f=r(62363),p=r(31630),h=r(41664),m=r.n(h),g=r(11163),v=r(67294),y=r(11923),x=r(82231);function b(e){let{data:t,setGroupByUser:r}=e,i=(0,g.useRouter)();return(0,n.jsx)("div",{className:"mx-auto max-w-screen-lg p-6 text-white",children:t.map(e=>(0,n.jsxs)("div",{onClick:async()=>{let t={pathname:i.pathname,query:{...i.query,id:e.id}};i.push(t,void 0,{shallow:!0}),r(!1)},className:"text-gray-50 justify-between flex gap-2 items-center hover:bg-gray-90 p-2.5 cursor-pointer px-4",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("img",{src:e.image||"/avatar.svg",className:"w-6 h-6 rounded-full bg-gray-80",alt:""})," ",(0,n.jsx)("p",{className:"text-gray-25 pl-1",children:e.name})]}),(0,n.jsxs)("div",{className:"pr-4 tabular-nums",children:[e.count," reported"]})]},e.id))})}var w=r(627);function _(e){let{reports:t}=e,[r,i]=(0,v.useState)(t),[o,l]=(0,v.useState)(!1),u=(0,g.useRouter)(),c=parseInt(u.query.page??0),d=(0,v.useMemo)(()=>o?r:r.filter(e=>!e.hide).reduce((e,t)=>{let r=e.find(e=>e.imageId===t.imageId);return r?r.numAddition=(r.numAddition||0)+1:e.push({...t}),e},[]),[r,o]),f=u.asPath.includes("unread");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("section",{className:"mx-auto max-w-screen-lg space-y-8 p-6 pt-0 text-white",children:[u.query.id&&(0,n.jsxs)("div",{className:"text-gray-25 text-xl",children:["Showing results for 1 user."," ",(0,n.jsx)("button",{type:"button",onClick:()=>{u.push(`/admin/reports/${f?"unread":"resolved"}`)},className:"underline",children:"Reset"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[!d.length&&(0,n.jsx)("span",{className:"text-gray-50",children:"No Reports."}),d.map(e=>(0,n.jsx)(E,{showAll:()=>l(!0),report:e,removeFromList:()=>{i(r.map(t=>t.id===e.id||t.imageId===e.imageId?{...t,hide:!0}:t))},removeAllFromUser:()=>{i(r.map(t=>t.image.userId===e.image.userId?{...t,hide:!0}:t))},addBackToList:()=>{i(r.map(t=>t.id===e.id?{...t,hide:!1}:t))}},e.id))]})]}),(0,n.jsxs)("footer",{className:"flex w-full flex-col items-center justify-center gap-4 text-gray-25 pb-10",children:[(0,n.jsxs)("p",{children:["Page ",c]}),(0,n.jsxs)("div",{className:"flex gap-4",children:[0!==c&&(0,n.jsxs)(m(),{replace:!0,href:`/admin/reports/${f?"unread":"resolved"}?page=${c-1}`,className:"flex items-center gap-2 hover:underline",children:[(0,n.jsx)(a,{}),"Previous Page"]}),r.length>0&&(0,n.jsxs)(m(),{replace:!0,href:`/admin/reports/${f?"unread":"resolved"}?page=${c+1}`,className:"flex items-center gap-2 hover:underline",children:["Next Page",(0,n.jsx)(s,{})]})]})]})]})}var j=!0;function C(e,t){return fetch(`/api/admin/image?id=${e}&action=private`,{method:"POST",body:JSON.stringify({reason:t})})}function k(e,t){return fetch(`/api/admin/image?id=${e}&action=hide`,{method:"POST",body:JSON.stringify({reason:t})})}function E(e){let{report:t,removeAllFromUser:r,removeFromList:i,addBackToList:o,showAll:a}=e,s=(0,p.T1)(),l=async e=>{try{i(),await C(t.imageId,e),s("Photo privatized",{time:3e3,clear:!1})}catch(e){o()}},u=async e=>{try{i(),await k(t.imageId,e),s("Photo hidden",{time:3e3,clear:!1})}catch(e){o()}},c=async(e,n)=>{try{if(r(),n?.disableIP&&!(await fetch("/api/admin/banned",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:t.image.userId})})).ok)throw Error("Failed to ban IP");if(!(await fetch(`/api/admin/disable-user?id=${t.image.userId}`,{method:"POST",body:JSON.stringify({reason:e})})).ok)throw Error("Failed to disable user");s("User disabled",{time:3e3,clear:!1})}catch(e){"object"==typeof e&&e&&"message"in e&&s(e.message,{time:3e3,clear:!1}),o()}},h=async()=>{try{i(),await fetch(`/api/admin/dismiss-report?id=${t.imageId}`),s("Report dismissed",{time:3e3,clear:!1})}catch(e){o()}},{setModalContent:g}=(0,d.d)(),v=(e,r)=>{let i="playground.com"===window.location.hostname;return o=>{g((0,n.jsx)(S,{type:o?.currentTarget?.innerText,report:t,action:e,allowBanIP:r&&i}),{transitionModal:!0,useBlurredBackground:!0})}};return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:" border border-white/10 bg-gray-95 p-6",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("div",{className:"space-y-1",children:(0,n.jsxs)("h2",{className:"flex items-center gap-x-1",children:[t.image.prompt?`"${(0,x.G)(t.image.prompt)}"`:"Image"," ","by"," ",(0,n.jsx)("a",{href:`/profile/${t.image.user.id}`,className:"font-bold hover:underline",rel:"noreferrer",children:t.image.user.name})," ",(0,n.jsxs)("span",{className:"text-sm text-gray-25",children:["• Created"," ",new Date(t.image.createdAt).toLocaleDateString("en-US",{dateStyle:"medium"})," "]})]})}),(0,n.jsxs)("p",{className:"text-sm text-gray-400",children:["Reported by"," ",(0,n.jsx)("a",{className:"font-bold hover:underline",href:`/profile/${t.reporterId}`,children:t.reporterUser.name})," ",(0,n.jsxs)("time",{className:"ml-1",title:t.createdAt.toString(),children:[new Date(t.createdAt).toLocaleDateString("en-US",{dateStyle:"medium"})," ",new Date(t.createdAt).toLocaleTimeString("en-US",{timeStyle:"medium"})]})]}),"PENDING"!==t.status?(0,n.jsxs)("div",{className:"text-sm text-gray-50",children:["Handled on"," ",new Date(t.handledAt)?.toLocaleDateString()," ","by"," ",(0,n.jsx)(m(),{href:"/profile/"+t.handledBy,className:"text-gray-25",children:t.handledByUser.displayName}),". Status: ",t.status,". ",t.reason&&(0,n.jsxs)(n.Fragment,{children:["Reason: ",t.reason]})]}):(0,n.jsxs)("div",{className:"flex gap-x-2 text-gray-300 pt-1",children:[(0,n.jsx)("button",{className:"button-basic",onClick:v(c,!0),children:"Disable Author"}),(0,n.jsx)("button",{className:"button-basic",onClick:v(u),children:"Delete Image"}),(0,n.jsx)("button",{className:"button-basic",onClick:v(l),children:"Make Image Private"}),(0,n.jsx)("button",{className:"button-basic",onClick:h,children:"Dismiss"})]})]}),(0,n.jsxs)("div",{className:"flex flex-none items-center justify-center gap-2",children:[(0,n.jsx)("button",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-white/10 p-1 hover:bg-white/10",onClick:()=>{g((0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("img",{src:t.image.url_jpeg||t.image.url}),(0,n.jsx)("p",{className:"max-w-md text-sm text-gray-25 p-3 pt-1",children:t.image.prompt??"(no prompt)"})]}))},children:(0,n.jsx)(f.Yq,{height:12,width:12})}),(0,n.jsx)(m(),{href:`/post/${t.imageId}`,target:"_blank",rel:"noreferrer",className:"flex-none",children:(0,n.jsx)("img",{src:t.image.url_jpeg||t.image.url,alt:"",className:"h-28 w-28 cursor-pointer rounded-md bg-cover object-cover"})})]})]},t.id)}),t.numAddition&&t.numAddition>0&&(0,n.jsxs)("p",{className:"ml-8 mt-2 text-sm text-gray-500",children:[t.numAddition," additional reports for this image."," ",(0,n.jsx)("button",{onClick:a,className:"inline underline",children:"Show all reports"})]})]})}function S(e){let{action:t,report:r,type:i,allowBanIP:o}=e,a="other",{closeModal:s}=(0,d.d)(),[u,f]=(0,v.useState)(!1);return(0,n.jsxs)("div",{className:"w-[600px] rounded-md bg-gray-900 p-8 text-white",children:[(0,n.jsxs)("div",{className:"-center mb-4 flex flex-col gap-2",children:[(0,n.jsx)("img",{src:r.image.url_jpeg??r.image.url,className:"h-12 w-12 rounded-md",alt:""}),(0,n.jsx)("h2",{className:"text-xl font-bold",children:i??"Report this image"})]}),(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault();let r=Object.fromEntries(new FormData(e.currentTarget));t(Object.keys(r).map(e=>e!==a?e:r[e]?`"${r[e]}"`:null).filter(Boolean).join(", "),{disableIP:u}),s()},className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,n.jsx)(l.X,{id:"child-pornography",name:"child-pornography"}),(0,n.jsx)("label",{htmlFor:"child-pornography",children:"Child Pornography"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,n.jsx)(l.X,{id:"sexual-content",name:"sexual-content"}),(0,n.jsx)("label",{htmlFor:"sexual-content",children:"Sexual/Nude Content"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,n.jsx)(l.X,{id:"racist-or-hateful-content",name:"racist-or-hateful-content"}),(0,n.jsx)("label",{htmlFor:"racist-or-hateful-content",children:"Racist/Hateful Content"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,n.jsx)(l.X,{id:"excess-gore-or-violence",name:"excess-gore-or-violence"}),(0,n.jsx)("label",{htmlFor:"excess-gore-or-violence",children:"Excess Gore/Violence"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,n.jsx)(l.X,{id:"Political",name:"politically-sensitive"}),(0,n.jsx)("label",{htmlFor:"politically-sensitive",children:"Politically Sensitive"})]}),(0,n.jsx)("div",{className:"flex items-center justify-start gap-2",children:(0,n.jsx)("input",{autoFocus:!0,type:"text",id:"other-text",name:a,placeholder:"Other",className:"pai-border rounded-md border-gray-85 bg-gray-90 px-2 py-1 outline-none placeholder:text-gray-25 focus:border-gray-75"})}),(0,n.jsxs)("div",{className:"flex justify-end pt-2 gap-4 items-center",children:[o&&(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2 ",children:[(0,n.jsx)("label",{className:"text-gray-25 text-sm",children:"Block future accounts (IP Ban)"}),(0,n.jsx)(c.Z,{checked:u,onChange:e=>{f(e.target.checked)}})]}),(0,n.jsx)("button",{type:"submit",className:"button button-primary",children:"Submit"})]})]})]})}function N(e){let{allowAutoMod:t,setAllowAutoMod:r,groupByUser:i,setGroupByUser:o}=e,a=(0,g.useRouter)().pathname.includes("unread");return(0,n.jsxs)("section",{className:"mx-auto max-w-screen-lg space-y-2  p-6 text-white",children:[(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)(m(),{href:"/admin/reports/unread",className:`text-2xl ${a?"opacity-100":"opacity-70"}`,children:"Unread Reports"}),(0,n.jsx)(m(),{href:"/admin/reports/resolved",className:`text-2xl ${a?"opacity-70":"opacity-100"}`,children:"Resolved Reports"})]}),(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsxs)("label",{className:"text-sm text-gray-25 flex items-center gap-2",htmlFor:"",children:["Include AutoMod",(0,n.jsx)(c.Z,{isChecked:t,onChange:()=>r(e=>!e)})]}),(0,n.jsxs)("label",{className:"text-sm text-gray-25 flex items-center gap-2",htmlFor:"",children:["Group By User",(0,n.jsx)(c.Z,{isChecked:i,onChange:()=>o(e=>!e)})]})]})]})}var P=(0,u.XC)(e=>{let t=(0,g.useRouter)(),r=t.pathname.includes("resolved"),[o,a]=(0,v.useState)(!0),[s,l]=(0,v.useState)(!1),u=(0,v.useMemo)(()=>{let e=new URLSearchParams;return e.set("pending",r?"false":"true"),o||e.set("autoMod","false"),t.query.id&&e.set("id",t.query.id),e.set("page",t.query.page??"0"),e},[r,o,t.query]),{data:c}=(0,i.ZP)(`/api/admin/reports/${s?"by-user":""}?${u.toString()}`,y.S);return c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(N,{allowAutoMod:o,setAllowAutoMod:a,groupByUser:s,setGroupByUser:l}),s?(0,n.jsx)(b,{data:c,setGroupByUser:l}):(0,n.jsx)(_,{reports:c},u.toString())]}):(0,n.jsx)("div",{className:"flex w-full justify-center pt-20 scale-50",children:(0,n.jsx)(w.ZP,{})})})},10443:function(e,t,r){"use strict";r.d(t,{$p:function(){return c},Vt:function(){return g},mB:function(){return v},q3:function(){return d},wz:function(){return m}});var n=r(46825);let i='Use a subject like a person at the beginning. (e.g. "60 year old man")',o='Use an object at the beginning of your prompt. (e.g. "a cup")',a='Use a character or person at the beginning of your prompt. (e.g. "a clown")',s='Use a character or person or object at the beginning of your prompt. (e.g. "a clown" or "a cup")',l='Use a scene, character, or object at the beginning of your prompt. (e.g. "the future," "a clown" or "a cup")';function u(e,t){return{prompt_callback:r=>`${e?`${e}, `:""}${r}${t?`, ${t}`:""}`,remove_prompt_callback:r=>{let n=r;return e&&(n=n.replace(RegExp(`^${e}, `),"")),t&&(n=n.replace(RegExp(`, ${t}$`),"")),n}}}let c={id:"none",name:"None",prompt:"",models:[n.Hn.STABLE_DIFFUSION,n.Hn.DALLE,n.Hn.STABLE_DIFFUSION_2,n.Hn.PLAYGROUND_V1,n.Hn.STABLE_DIFFUSION_XL,n.Hn.PLAYGROUND_V2,n.Hn.PLAYGROUND_V2_5,n.Hn.PLAYGROUND_V2_6,n.Hn.PLAYGROUND_V3],thumbnail_file:void 0},d=[n.Hn.STABLE_DIFFUSION,n.Hn.PLAYGROUND_V1,n.Hn.STABLE_DIFFUSION_XL,n.Hn.PLAYGROUND_V2,n.Hn.PLAYGROUND_V2_5],f=e=>({text:e,link:"https://www.youtube.com/watch?v=dkUjHPQ4nHA",linkText:"Learn how to make portraits"}),p={name:"Oil Painting",id:"olpntng_style",...u("olpntng style","oil painting, heavy strokes, paint dripping"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"olpntng.png",dream_booth_model:"olpntng",tip:f(i),steps:50,cfg_scale:7},h={name:"Photorealism",id:"photorealism",models:[n.Hn.PLAYGROUND_V2_5,n.Hn.PLAYGROUND_V2_6],controlnet_disabled:!0,hide_behind_feature_flag:!1,is_pro:!0,negativePrompt:"ugly, deformed, noisy, blurry, distorted, grainy, nudity, nude",thumbnail_file:"Photorealism.png"},m=[c,{name:"Realism Engine",id:"Realism_Engine_SDXL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"Realism_Engine_SDXL.png",dream_booth_model:"Realism_Engine_SDXL",controlnet_disabled:!0,hide_behind_feature_flag:!1,negativePrompt:"high contrast, over saturated, glossy, cartoon, 3d, 3d render, Photoshop, sketch, sketches, video game, draw, paint, painting, render, cgi, computer graphics, anime, manga, 2d art, 3d art, illustration, canvas frame, watermark, signature, username, artist name",cfg_scale:6,steps:40,scheduler_key:"EULER",refinement_disabled:!1},{name:"Real Cartoon XL",id:"Real_Cartoon_XL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"Real_Cartoon_XL.png",dream_booth_model:"Real_Cartoon_XL",controlnet_disabled:!0,hide_behind_feature_flag:!1,negativePrompt:"ugly, deformed, noisy, blurry, distorted, out of focus, bad anatomy, extra limbs, poorly drawn face, poorly drawn hands, missing fingers, photo, realistic, text, watermark, signature, username, artist name, nudity, nude",cfg_scale:7,steps:50,scheduler_key:"DPMPP_2M_K",refinement_disabled:!1},{name:"Blue Pencil XL",id:"Blue_Pencil_XL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"Blue_Pencil_XL.png",dream_booth_model:"Blue_Pencil_XL",controlnet_disabled:!0,hide_behind_feature_flag:!1,negativePrompt:"ugly, deformed, noisy, blurry, distorted, out of focus, bad anatomy, extra limbs, poorly drawn face, poorly drawn hands, missing fingers, photo, realistic, text, watermark, signature, username, artist name, nudity, nude",cfg_scale:6,steps:30,scheduler_key:"DPMPP_2M_K",refinement_disabled:!1},{name:"Starlight XL Animated",id:"Starlight_XL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"starlight_animated.png",dream_booth_model:"Starlight_XL",controlnet_disabled:!0},{name:"Juggernaut XL",id:"Juggernaut_XL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"juggernaut_xl.png",dream_booth_model:"Juggernaut_XL",controlnet_disabled:!0},{name:"RealVis XL",id:"RealVisXL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"real_vis_xl.png",dream_booth_model:"RealVisXL",controlnet_disabled:!0},{name:"Zavy Chroma XL",id:"ZavyChromaXL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"zavy_chroma.png",dream_booth_model:"ZavyChromaXL",controlnet_disabled:!0,refinement_disabled:!0},{name:"NightVision XL",id:"NightVision_XL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"nightvision_xl.png",dream_booth_model:"NightVision_XL",controlnet_disabled:!0,refinement_disabled:!0},{name:"Realistic Stock Photo",id:"Realistic_Stock_Photo",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"realistic_stock_photo.png",dream_booth_model:"Realistic_Stock_Photo",controlnet_disabled:!0,refinement_disabled:!0},{name:"Dreamshaper",id:"DreamShaper",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"dreamshaper.jpg",dream_booth_model:"DreamShaper",controlnet_disabled:!0,refinement_disabled:!0},{name:"MBBXL",id:"MBBXL_Ultimate",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"mbbxl.jpg",dream_booth_model:"MBBXL_Ultimate",controlnet_disabled:!0,refinement_disabled:!0},{name:"Mysterious",id:"Mysterious",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"mysterious.jpg",dream_booth_model:"Mysterious",prompt:"Mysterious",controlnet_disabled:!0},{name:"Copax Timeless",id:"Copax_TimeLessXL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"copax.jpg",dream_booth_model:"Copax_TimeLessXL",controlnet_disabled:!0},{name:"Niji SE",id:"SDXL_Niji",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"niji.jpg",dream_booth_model:"SDXL_Niji",controlnet_disabled:!0,refinement_disabled:!0},{name:"Pixel Art",id:"Pixel_Art_XL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"pixelart.jpg",dream_booth_model:"Pixel_Art_XL",controlnet_disabled:!0,refinement_disabled:!0},{name:"ProtoVision",id:"ProtoVision_XL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"protovision.jpg",dream_booth_model:"ProtoVision_XL",controlnet_disabled:!0,refinement_disabled:!0},{name:"DucHaiten",id:"DucHaiten_AIart_SDXL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"duchaiten.jpg",dream_booth_model:"DucHaiten_AIart_SDXL",controlnet_disabled:!0,refinement_disabled:!0},{name:"Counterfeit",id:"CounterfeitXL",models:[n.Hn.STABLE_DIFFUSION_XL],thumbnail_file:"counterfeit.jpg",dream_booth_model:"CounterfeitXL",controlnet_disabled:!0},h,{name:"Vibrant Glass",prompt:"Broken Glass effect, no background, stunning, something that even doesn't exist, mythical being, energy, molecular, textures, iridescent and luminescent scales, breathtaking beauty, pure perfection, divine presence, unforgettable, impressive, breathtaking beauty, Volumetric light, auras, rays, vivid colors reflects",id:"vibrant_glass",models:[n.Hn.STABLE_DIFFUSION_XL,n.Hn.PLAYGROUND_V2,n.Hn.PLAYGROUND_V2_5],thumbnail_file:"vibrant_glass.png",negativePrompt:"ugly, deformed, noisy, blurry, distorted, grainy, nudity, nude"},{name:"Bella's Dreamy Stickers",prompt:"sticker, 2d cute, fantasy, dreamy, vector illustration, 2d flat, centered, by Tim Burton, professional, sleek, modern, minimalist, graphic, line art, vector graphics",id:"dreamy_stickers",models:[n.Hn.STABLE_DIFFUSION_XL,n.Hn.PLAYGROUND_V2,n.Hn.PLAYGROUND_V2_5],thumbnail_file:"dreamy_stickers.png"},{name:"Ultra Lighting",prompt:"ultra hd, realistic, vivid colors, highly detailed, UHD drawing, pen and ink, perfect composition, beautiful detailed intricate insanely detailed octane render trending on artstation, 8k artistic photography, photorealistic concept art, soft natural volumetric cinematic perfect light",id:"ultra_lighting",models:[n.Hn.STABLE_DIFFUSION_XL,n.Hn.PLAYGROUND_V2,n.Hn.PLAYGROUND_V2_5],thumbnail_file:"ultra_lighting.png",negativePrompt:"ugly, deformed, noisy, blurry, distorted, grainy, nudity, nude"},{name:"Watercolor",prompt:"Watercolor, trending on artstation, sharp focus, studio photo, intricate details, highly detailed, by greg rutkowski",id:"watercolor",models:[n.Hn.STABLE_DIFFUSION_XL,n.Hn.PLAYGROUND_V2,n.Hn.PLAYGROUND_V2_5],thumbnail_file:"watercolor.png",negativePrompt:"ugly, deformed, noisy, blurry, distorted, grainy, nudity, nude"},{name:"Macro Realism",prompt:"Miki Asai Macro photography, close-up, hyper detailed, trending on artstation, sharp focus, studio photo, intricate details, highly detailed, by greg rutkowski",id:"macro_realism",models:[n.Hn.STABLE_DIFFUSION_XL,n.Hn.PLAYGROUND_V2,n.Hn.PLAYGROUND_V2_5],thumbnail_file:"macro_realism.png",negativePrompt:"ugly, deformed, noisy, blurry, distorted, grainy, nudity, nude"},{name:"Deliberate",id:"deliberate_2",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"deliberate.png",dream_booth_model:"deliberate_2",hide_behind_feature_flag:!1},{name:"Dreamshaper 8",id:"dream_shaper_8",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"dreamshaper.png",dream_booth_model:"dream_shaper_8",hide_behind_feature_flag:!1},{name:"RPG 4",id:"rpg_4",negativePrompt:"blurry, bad anatomy, extra limbs, poorly drawn face, poorly drawn hands, missing fingers, nudity, nude",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"RPG.png",dream_booth_model:"rpg_4",hide_behind_feature_flag:!1},{name:"Realistic Vision 2",id:"realistic_vision_2",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"realistic_vision_2.png",dream_booth_model:"realistic_vision_2",hide_behind_feature_flag:!1},{name:"ReVAnimated",id:"rev_animated",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"rev_animated.png",dream_booth_model:"rev_animated",hide_behind_feature_flag:!1},{name:"Counterfeit 3",id:"counterfeit_3",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"counterfeit_3.png",dream_booth_model:"counterfeit_3",hide_behind_feature_flag:!1},{name:"Protogen Photorealism 5.3",id:"protogen_53_photorealism",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"protogen_53_photorealism.png",dream_booth_model:"protogen_53_photorealism",hide_behind_feature_flag:!1},{name:"Protogen Anime 2.2",id:"protogen_22_anime",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"protogen_22_anime.png",dream_booth_model:"protogen_22_anime",hide_behind_feature_flag:!1},{name:"Protogen Photorealism 3.4",id:"protogen_34_photorealism",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"protogen_34_photorealism.png",dream_booth_model:"protogen_34_photorealism",hide_behind_feature_flag:!1},{name:"Geometrieva style",id:"geometrieva",...u("geo2099 style"),negativePrompt:"blur haze",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"geometrieva.png",dream_booth_model:"geometrieva",hide_behind_feature_flag:!1},{name:"Colorpop",id:"colorpop_style",...u("colorpop style"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"elizaport_style.png",dream_booth_model:"colorpop",cfg_scale:10,steps:50,tip:f(i)},{name:"Instaport",id:"instaport_style",...u("instaport style"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"instaport_style.png",dream_booth_model:"instaport",cfg_scale:7,steps:50,tip:f(a)},{name:"Playtoon",id:"pltn_style",...u("pltn style","cute big circular reflective eyes, Pixar render, unreal engine cinematic smooth, intricate detail"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"pltn-style.png",dream_booth_model:"pltn",cfg_scale:7,steps:50,tip:a},{name:"Polymode",id:"polymode_style",...u("polymode style","toy, soft smooth lighting, soft pastel colors, 3d blender render, polycount, modular constructivism, pop surrealism, physically based rendering"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"polymode-style.png",dream_booth_model:"polymode",cfg_scale:10,steps:50,tip:o},{name:"Woolitize",id:"woolitize",...u("woolitize","soft smooth lighting, soft pastel colors"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"woolitize.jpeg",dream_booth_model:"woolitize",cfg_scale:10,steps:50,tip:'Use an object or place at the beginning of your prompt. (e.g. "a cup" or "a park")'},{name:"App Icons",id:"appicon_style",...u("appicon style","flat icon"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"appicon-style.jpg",dream_booth_model:"appicon",steps:50,cfg_scale:7,tip:'Use a character or object at the beginning of your prompt. (e.g. "a clown" or "a cup")'},{name:"Retro Anime",id:"retroanime_style",...u("retroanime style"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"retroanime.png",dream_booth_model:"retroanime",steps:50,cfg_scale:7,tip:'Use a person or place at the beginning of your prompt. (e.g. "a person" or "a park")'},{name:"Retro Futurism",id:"retrofuturism_style",...u("retrofuturism style"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"retrofuturism.png",dream_booth_model:"retrofuturism",steps:50,cfg_scale:10,tip:'Use a scene, place, or object at the beginning of your prompt. (e.g. "the future," "a park" or "a cup")'},{name:"Origami",id:"origami_style",...u("origami style","studio lighting, white background, pastel colors"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"origami.png",dream_booth_model:"origami",steps:50,cfg_scale:7,tip:o},{name:"Analog Diffusion",id:"analogdiffusion_style",...u("analog style"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"analogdiffusion.png",dream_booth_model:"analogdiffusion",steps:50,cfg_scale:7},{name:"Playdoh",id:"playdoh_style",...u("playdoh style"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"playdoh.png",dream_booth_model:"playdoh",steps:50,cfg_scale:7},{name:"Polaroid",id:"polaroid_style",...u("polaroid style"),negativePrompt:"blur haze border",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"polaroid.png",dream_booth_model:"polaroid",steps:50,cfg_scale:7,tip:f(s)},{name:"Dream Haven",id:"lushill_style",negativePrompt:"blur haze",...u("lushill style"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"lushill.jpg",dream_booth_model:"lushill",steps:50,cfg_scale:7},{name:"Perfume",id:"prfm_style",...u("prfm style"),negativePrompt:"blur haze",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"prfm.png",dream_booth_model:"prfm",tip:f(i),steps:50,cfg_scale:7},{name:"Pixel",id:"pixel_style",...u("pixel style"),negativePrompt:"glitch blur haze",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"pixel.jpg",dream_booth_model:"pixel",steps:50,cfg_scale:7},{name:"Foodmade",id:"foodmade_style",...u("foodmade style"),models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"foodmade.png",dream_booth_model:"foodmade",tip:o,steps:50,cfg_scale:7},p,{name:"Pop Art",id:"popart_style",...u("popart style"),negativePrompt:"watermark photograph hands",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"popart.png",dream_booth_model:"popart",tip:l,steps:50,cfg_scale:7},{name:"Fashion Magazine",id:"vogue_style",...u("voguestyle","fashion magazine cover"),negativePrompt:"text, logo, wordmark, writing, heading, signature",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"voguestyle.png",dream_booth_model:"voguestyle",tip:f(a),steps:50,cfg_scale:7},{name:"Dark Comic",id:"blkmndy_style",...u("blkmndy","black and white, comic style"),negativePrompt:"text, logo, wordmark, writing, heading, signature",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"blkmndy.png",dream_booth_model:"blkmndy",tip:a,steps:50,cfg_scale:7},{name:"Mixpunk",id:"mixpunk_style",...u("mixpnk style"),negativePrompt:"blur haze",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"mixpnk.png",dream_booth_model:"mixpnk",tip:l,steps:50,cfg_scale:7},{name:"Storybook",id:"storybook_style",...u("strybk","kids story book style, muted colors, watercolor style"),negativePrompt:"text, logo, wordmark, writing, heading, signature",models:[n.Hn.STABLE_DIFFUSION],thumbnail_file:"strybk.png",dream_booth_model:"strybk",tip:s,steps:50,cfg_scale:7},{name:"Delicate detail",id:"delicate_detail",prompt:"trending on artstation, sharp focus, studio photo, intricate details, highly detailed, by greg rutkowski",models:d,thumbnail_file:"delicate_detail.png"},{name:"Radiant symmetry",id:"radiant_symmetry",prompt:"centered, symmetry, painted, intricate, volumetric lighting, beautiful, rich deep colors masterpiece, sharp focus, ultra detailed, in the style of dan mumford and marc simonetti, astrophotography",models:d,thumbnail_file:"radiant_symmetry.png"},{name:"Lush illumination",id:"lush_illustration",prompt:"unreal engine, greg rutkowski, loish, rhads, beeple, makoto shinkai and lois van baarle, ilya kuvshinov, rossdraws, tom bagshaw, alphonse mucha, global illumination, detailed and intricate environment",models:d,thumbnail_file:"lush_illumination.png"},{name:"Saturated Space",id:"saturated_space",prompt:"outer space, vanishing point, super highway, high speed, digital render, digital painting, beeple, noah bradley, cyril roland, ross tran, trending on artstation",models:d,thumbnail_file:"saturated_space.png"},{name:"Neon Mecha",id:"neon_mecha",prompt:"neon ambiance, abstract black oil, gear mecha, detailed acrylic, grunge, intricate complexity, rendered in unreal engine, photorealistic",models:d,thumbnail_file:"neon_mecha.png"},{name:"Ethereal Low poly",id:"ethereal_low_poly",prompt:"low poly, isometric art, 3d art, high detail, artstation, concept art, behance, ray tracing, smooth, sharp focus, ethereal lighting",models:d,thumbnail_file:"ethereal_low_poly.png"},{name:"Warm box",id:"warm_box",prompt:"golden ratio, fake detail, trending pixiv fanbox, acrylic palette knife, style of makoto shinkai studio ghibli genshin impact james gilleard greg rutkowski chiho aoshima",models:d,thumbnail_file:"warm_box.png"},{name:"Cinematic",id:"cinematic",prompt:"perfect composition, beautiful detailed intricate insanely detailed octane render trending on artstation, 8 k artistic photography, photorealistic concept art, soft natural volumetric cinematic perfect light, chiaroscuro, award - winning photograph, masterpiece, oil on canvas, raphael, caravaggio, greg rutkowski, beeple, beksinski, giger",models:d,thumbnail_file:"cinematic.png"},{name:"Cinematic (warm)",id:"cinematic_warm",prompt:"sharp focus, emitting diodes, smoke, artillery, sparks, racks, system unit, motherboard, by pascal blanche rutkowski repin artstation hyperrealism painting concept art of detailed character design matte painting, 4 k resolution blade runner",models:d,thumbnail_file:"cinematic_warm.png"},{name:"Wasteland",id:"wasteland",prompt:"isometric, digital art, smog, pollution, toxic waste, chimneys and railroads, 3 d render, octane render, volumetrics, by greg rutkowski",models:d,thumbnail_file:"wasteland.png"},{name:"Flat palette",id:"flat_palette",prompt:"acrylic painting, trending on pixiv fanbox, palette knife and brush strokes, style of makoto shinkai jamie wyeth james gilleard edward hopper greg rutkowski studio ghibli genshin impact",models:d,thumbnail_file:"flat_palette.png"},{name:"Ominous escape",id:"ominous_escape",prompt:"professional ominous concept art, by artgerm and greg rutkowski, an intricate, elegant, highly detailed digital painting, concept art, smooth, sharp focus, illustration, in the style of simon stalenhag, wayne barlowe, and igor kieryluk.",models:d,thumbnail_file:"ominous_escape.png"},{name:"Spielberg",id:"spielberg",prompt:"cinematic, 4k, epic Steven Spielberg movie still, sharp focus, emitting diodes, smoke, artillery, sparks, racks, system unit, motherboard, by pascal blanche rutkowski repin artstation hyperrealism painting concept art of detailed character design matte painting, 4 k resolution blade runner",models:d,thumbnail_file:"spielberg.png"},{name:"Royalistic",id:"royalistic",prompt:"epic royal background, big royal uncropped crown, royal jewelry, robotic, nature, full shot, symmetrical, Greg Rutkowski, Charlie Bowater, Beeple, Unreal 5, hyperrealistic, dynamic lighting, fantasy art",models:d,thumbnail_file:"royalistic.png"},{name:"Masterpiece",id:"masterpiece",prompt:"sf, intricate artwork masterpiece, ominous, matte painting movie poster, golden ratio, trending on cgsociety, intricate, epic, trending on artstation, by artgerm, h. r. giger and beksinski, highly detailed, vibrant, production cinematic character render, ultra high quality model",models:d,thumbnail_file:"masterpiece.png"},{name:"Wall Art",id:"wall_art",prompt:"by Jacob Lawrence and Francis picabia, perfect composition, beautiful detailed intricate insanely detailed octane render trending on artstation, 8 k artistic photography, photorealistic concept art, soft natural volumetric cinematic perfect light, chiaroscuro, award - winning photograph, masterpiece, oil on canvas, raphael, caravaggio, greg rutkowski, beeple, beksinski, giger",models:d,thumbnail_file:"wall_art.png"},{name:"Haze",id:"haze",prompt:"haze, ultra-detailed, film photography, light leaks, Larry Bud Melman, trending on artstation, sharp focus, studio photo, intricate details, highly detailed, by greg rutkowski",models:d,thumbnail_file:"haze.png"},{name:"Black and white (3D)",id:"black_and_white_3d",prompt:"black and white still, digital Art, perfect composition, beautiful detailed intricate insanely detailed octane render trending on artstation, 8 k artistic photography, photorealistic concept art, soft natural volumetric cinematic perfect light, chiaroscuro, award - winning photograph, masterpiece, oil on canvas, raphael, caravaggio, greg rutkowski, beeple, beksinski, giger",models:d,thumbnail_file:"black_and_white.png"},{name:"Cinematic dimensions",id:"cinematic_dimensions",prompt:"perfect composition, beautiful detailed intricate insanely detailed octane render trending on artstation, 8 k artistic photography, photorealistic concept art, soft natural volumetric cinematic perfect light, chiaroscuro, award - winning photograph, masterpiece, oil on canvas, raphael, caravaggio, greg rutkowski, beeple, beksinski, giger",models:[n.Hn.DALLE],thumbnail_file:"cinematic_dimensions.png"},{name:"Futuristic illumination",id:"futuristic_illumination",prompt:"futuristic illumination, Art Deco, Full colors, Greg rutkowski, Trending artstation, cinematogr\xe1fic",models:[n.Hn.DALLE],thumbnail_file:"futuristic_illumination.png"},{name:"Photorealistic",id:"photorealistic",prompt:"digital Art, perfect composition, beautiful detailed intricate insanely detailed octane render trending on artstation, 8 k artistic photography, photorealistic concept art, soft natural volumetric cinematic perfect light, chiaroscuro, award - winning photograph, masterpiece, oil on canvas, raphael, caravaggio, greg rutkowski, beeple, beksinski, giger",models:[n.Hn.DALLE],thumbnail_file:"photorealistic.png"},{name:"Cinematic (cold)",id:"cinematic_cold",prompt:"sf, intricate artwork masterpiece, ominous, matte painting movie poster, golden ratio, trending on cgsociety, intricate, epic, trending on artstation, by artgerm, h. r. giger and beksinski, highly detailed, vibrant, production cinematic character render, ultra high quality model",models:[n.Hn.DALLE],thumbnail_file:"cinematic_cold.png"},{name:"Cute low poly 3D",id:"cute_low_poly_3d",prompt:"cute isometric low polygon 3d render, white background, ambient occlusion, chibi, angular",models:[n.Hn.DALLE],thumbnail_file:"cute_low_poly.png"},{name:"Nikon mode",id:"nikon_mode",prompt:"Nikon D3100 | ISO 450 | focal length 50 mm (Sigma 50mm f1.5) | aperture f/4 | exposure time 1/250 Sec (DRI)",models:[n.Hn.DALLE],thumbnail_file:"nikon_mode.png"},{name:"Yellow fog",id:"yellow_fog",prompt:"futuristic, yellow theme fog, unreal engine, centered, symmetry, painted, intricate, volumetric lighting, beautiful, rich deep colors masterpiece, sharp focus, ultra detailed, in the style of dan mumford and marc simonetti, astrophotography",models:[n.Hn.DALLE],thumbnail_file:"yellow_fog.png"},{name:"Moody impressions",id:"moody_impressions",prompt:"moody lighting, 8 k resolution, octane render, trending on artstation, by h. r. giger and greg rutkowski , haze, ultra-detailed, film photography, light leaks, Larry Bud Melman, trending on artstation, sharp focus, studio photo, intricate details, highly detailed, by greg rutkowski",models:[n.Hn.DALLE],thumbnail_file:"moody_impressions.png"},{name:"Portrait",id:"portrait",prompt:"a 70mm portrait, iso 100, focus mode, f/100, smiling brightly, waist up photo, locs, blasian, perfect composition, beautiful detailed intricate insanely detailed octane render trending on artstation, 8 k artistic photography, photorealistic concept art, soft natural volumetric cinematic perfect light, chiaroscuro, award - winning photograph, masterpiece, oil on canvas, raphael, caravaggio, greg rutkowski, beeple, beksinski, giger",models:[n.Hn.DALLE],thumbnail_file:"portrait.png"},{name:"Hypersonic",id:"hypersonic",prompt:"hypersonic, 8k, stunning quality, octane render, trending on artstation, sharp focus, studio photo, intricate details, highly detailed, by greg rutkowski",models:[n.Hn.DALLE],thumbnail_file:"hypersonic.png"},{name:"Close up portrait",id:"closeup",prompt:"close up portrait photo by Annie Leibovitz, film, studio lighting, detailed skin, ultra realistic, bokeh, sharp features",negativePrompt:"cartoon, 3d, disfigured, bad art, deformed, poorly drawn, extra limbs, close up, b&w, weird colors, blurry, watermark",models:[n.Hn.STABLE_DIFFUSION_2],thumbnail_file:"closeup.jpeg"},{name:"Old timey",id:"old-timey",prompt:"a black and white photo, inspired by Bert Hardy, pexels contest winner, inspired by Vivian Maier, flickr, 1940s, high quality photo, afp",negativePrompt:"lowres, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, picture frame",models:[n.Hn.STABLE_DIFFUSION_2],thumbnail_file:"old-timey.png"},{name:"Cartoon",id:"cartoon",prompt:"2d cartoon style, animated, cel-shaded, flat, hand-drawn, comic, stylized, simplistic, colorful, exaggerated, whimsical, playful, vibrant, sketch",models:[],thumbnail_file:"cartoon.png"}],g=new Map;for(let e of m)g.set(e.id,e);function v(e){return g.get(e)??c}},46302:function(e,t,r){"use strict";r.d(t,{HH:function(){return u},O7:function(){return c},YF:function(){return d},b0:function(){return f}});var n=r(1604),i=r(67294),o=r(18794),a=r(44746);let s=[{samplerId:9,key:"DPMPP_2M_K",name:"DPM++ 2M Karras"},{samplerId:0,key:"DDIM",name:"DDIM"},{samplerId:1,key:"PLMS",name:"PNDM (PLMS)"},{samplerId:2,key:"EULER",name:"Euler"},{samplerId:3,key:"EULER_A",name:"Euler a"},{samplerId:5,key:"DPM2",name:"DPM2"},{samplerId:6,key:"DPM2_A",name:"DPM2 a"},{samplerId:7,key:"LMS",name:"LMS"},{samplerId:4,key:"HEUN",name:"Heun",proOnly:!0},{samplerId:8,key:"DPMPP_2M",name:"DPM++ 2M",proOnly:!0},{samplerId:10,key:"DPMPP_2M_SDE",name:"DPM++ 2M SDE",proOnly:!0},{samplerId:11,key:"DPMPP_2M_SDE_K",name:"DPM++ 2M SDE Karras",proOnly:!0},{samplerId:12,key:"DPMPP_SDE",name:"DPM++ SDE",proOnly:!0},{samplerId:13,key:"DPMPP_SDE_K",name:"DPM++ SDE Karras",proOnly:!0,featureFlag:"internal",disabled:!0},{samplerId:14,key:"LMS_K",name:"LMS Karras",proOnly:!0}];class l{fromSamplerId(e){if(null!==e)return this.SCHEDULERS.find(t=>t.samplerId===e)}fromKey(e){return this.SCHEDULERS.find(t=>t.key===e)}getValidSamplerIds(){return this.SCHEDULERS.map(e=>e.samplerId)}getMaxSamplerId(){return this.SCHEDULERS[this.SCHEDULERS.length-1].samplerId}getKeySchema(){let e=this.SCHEDULERS.map(e=>e.key);return n.z.enum([e[0],...e])}getVisibleSchedulers(e){let{isPaidPlan:t,isPlaygroundv2dot5:r,betaFeatureFlag:n,internalFeatureFlag:i}=e;return this.SCHEDULERS.filter(e=>{if(e.disabled)return!1;let t=!this.PLAYGROUND_v2_5_VALID_SCHEDULERS.has(e);if(r&&t)return!1;let o="featureFlag"in e?e.featureFlag:"none";return(!!i||"internal"!==o)&&(!!n||"beta"!==o)})}to_sampler_string(e){return this.fromSamplerId(e)?.key}constructor(){this.SCHEDULERS=s,this.PLAYGROUND_v2_5_VALID_SCHEDULERS=new Set([this.fromKey("EULER"),this.fromKey("HEUN"),this.fromKey("DPMPP_2M_K")])}}let u=new l,c=u.getKeySchema();function d(e){let{isPlaygroundv2dot5:t}=e,r=(0,a.sA)(),n=(0,o.z0)(),s=(0,o.l6)();return(0,i.useMemo)(()=>u.getVisibleSchedulers({isPlaygroundv2dot5:t,isPaidPlan:r,internalFeatureFlag:n,betaFeatureFlag:s}),[t,r,n,s])}function f(e){let t=(0,a.sA)(),r=d(e);return(0,i.useMemo)(()=>r.filter(e=>!("proOnly"in e)||!e.proOnly||t),[t,r])}},11959:function(e,t,r){"use strict";r.d(t,{W:function(){return s}});var n=r(46302),i=r(46825),o=r(10443);let a=["none","Playground_v2","Playground_v2.5",null,void 0];function s(e){let{height:t,width:r,modelType:s,filter:l,sampler:u,mask_image:c,dream_booth_model:d,controlnet_images:f}=e;if(![i.Hn.STABLE_DIFFUSION_XL,i.Hn.PLAYGROUND_V2,i.Hn.PLAYGROUND_V2_5,"default"].includes(s))return!1;let p=o.Vt.get(l??d??""),h=!!f?.length,m=!!p?.dream_booth_model&&!a.includes(p?.dream_booth_model),g=r/t,v=s===i.Hn.STABLE_DIFFUSION_XL&&r<=1024&&t<=1024||s!==i.Hn.STABLE_DIFFUSION_XL&&r<=1280&&t<=1280,y=a.includes(p?.dream_booth_model),x=[n.HH.fromKey("DDIM"),n.HH.fromKey("PLMS")].some(e=>e.samplerId===u);return!c&&!h&&v&&g<=16/9&&g>=9/16&&!x&&y&&!m}},22220:function(e,t,r){"use strict";r.d(t,{N:function(){return i},l:function(){return o}});var n=r(51879);function i(e,t){if(void 0===e)return null;let r="Failed to create image",i=null,o={};switch(e){case"NOT_AUTHORIZED":r="Failed to create image",i="An authentication error occurred. Please try again later.";break;case"BAD_REQUEST_DATA":r="Invalid parameters",i="Please try again with different parameters.";break;case"SAFETY_FILTER":r="Safety issue detected",i=t?.isEdit?"Your edit may have included unsafe content. Please adjust the prompt or seed.":"The generated image may have included unsafe content. Please adjust the prompt or seed.";break;case"SAFETY_FILTER_PROMPT":r="This prompt may violate our policy",i="We detected that your prompt might be against our content guidelines. Continued attempts might result in your account being disabled.";break;case"SAFETY_FILTER_IMAGE":r="This image may violate our policy",i="We detected that your image might be against our content guidelines. Continued attempts might result in your account being disabled.";break;case"SAFETY_FILTER_MULTI":r="Safety issue detected",i="Some of the images may have included unsafe content.";break;case"UNSUPPORTED_MODEL":r="Unsupported model",i="Please try again with a different model.";break;case"INCOMPATIBLE_IMAGE_DIMS":r="Incompatible image dimensions",i="Please try again with a differnet image size.";break;case"RATE_LIMITED":if(t?.isDesign){r="You've reached your current usage cap for designs",i="You've reached your limit of image edits per 3 hours. Please try again later.";break}r=`You've exceeded ${t?.isPaidPlan?"your":"the free"} plan`,t?.maxEditsPerDay&&(r="Out of edits"),t?.maxImagesPerDay?i=`You've made over ${t.maxImagesPerDay.toLocaleString("en-US")} images in the last 24 hours. You'll have to wait ${t.resetTimeSeconds?`${t.resetTimeSeconds} seconds`:""} to make more.`:t?.maxEditsPerDay?i=`You've hit the limit of ${t.maxEditsPerDay.toLocaleString("en-US")} images a day. Buy a paid plan to unlock this limit.`:t?.maxPhotorealismGensPerMonth?(i=`You've generated over ${t.maxPhotorealismGensPerMonth.toLocaleString("en-US")} images with Photorealism this month.`,o.isPhotorealism=!0):i="Rate limited";break;case"NON_PRO_STEP_RATE_LIMIT":r="Step limit reached",i="To create more images at higher quality & detail, please buy a paid plan.";break;case"MULTIPLE_ACCOUNTS":i="Please do not use multiple accounts. Buy a paid plan to increase your limit.";break;case"RESULT_TOO_LARGE":i="The generated image was too large. It might not be possible to outpaint here.";break;case"CLUSTER_OVERLOADED":i="Our servers are currently overloaded. Please try again.";break;case"EDIT_ERROR":r="Failed to edit image",i="Please try again or contact support if the problem persists.";break;case"EDIT_IMAGE_TOO_LARGE":r="Image too large",i=`${t?.tool??"Inpainting"} currently only supports 2048x2048 or smaller images. Please try again with a smaller image.`;break;case"UPSCALE_IMAGE_TOO_LARGE":r="Image too large",i="Upscaling only supports 1024x1024 or smaller images. Please try again with a smaller image.";break;case"UPSCALE_LIMIT_EXCEEDED":r="Upscale Limit Exceeded",i="You've reached your upscale limit per month. Try again later.";break;case"CREATIVE_UPSCALE_LIMIT_EXCEEDED":r="You've run out of creative upscales",i=t?.maxCreativeUpscalesPerMonth?`You've used ${t.maxCreativeUpscalesPerMonth} out of ${t.maxCreativeUpscalesPerMonth} upscales on your plan.`:"You've used all your creative upscales for this month.";break;case"CAPTIONER_LIMIT_EXCEEDED":r="You've run out of image descriptions",i=t?.maxCaptionsPerDay?`You've used ${t.maxCaptionsPerDay} out of ${t.maxCaptionsPerDay} image descriptions on your plan.`:"You've used all your image descriptions for today.";break;case"EXPAND_PROMPT_LIMIT_EXCEEDED":r="Prompt expansion limit exceeded",i="You have exceeded your prompt expansion limit. Please try again later.";break;case"EXPAND_PROMPT_ERROR":r="Prompt expansion failed",i="Prompt expansion failed. Please try again later.";break;case"NON_PRO_SCHEDULER_NOT_ALLOWED":r="Sampler not allowed",i="To use this sampler, please buy a paid plan. Otherwise, please try again with a different scheduler.";break;case"NON_PAID_PRIVATIZE_NOT_ALLOWED":r="Privatize not allowed",i="To privatize this image, please buy a paid plan.";break;case"GENERATION_CANCELLED":r="Generation cancelled";break;case"DIMENSIONS_TOO_LARGE":r="Image too large",i="Please reduce the width or height so the image is below 1M pixels (e.g. 1024x1024).";break;case"GATEWAY_TIMEOUT":r="Request timeout",i="This request was cancelled because it took too long. Please try again later.";break;case"NO_FACE_DETECTED":r="No face detected",i="No face was detected in the image.";break;case"SAFETY_FILTER_RATE_LIMITED":r="Too many NSFW violations",i=`Your account cannot generate images for ${n.cN} hour. If you have any questions, please contact support.`;break;case"SIMULTANEOUS_GENS_DISABLED":r="Simultaneous generations disabled";break;default:r="Unknown error",i="Please try again later or contact support if it continues."}return{errorMessage:i,errorCode:e,errorTitle:r,meta:o}}let o="The generated image may have included unsafe content. Please adjust the prompt or seed and try again. Occasionally, this can occur even when the initial prompt seems safe."},49582:function(e,t,r){"use strict";let n;r.d(t,{JW:function(){return m},d2:function(){return h}});var i="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,a=function(){for(var e=document.querySelectorAll('script[src^="'.concat(i,'"]')),t=0;t<e.length;t++){var r=e[t];if(o.test(r.src))return r}return null},s=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(i).concat(t);var n=document.head||document.body;if(!n)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r},l=function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:t})},u=null,c=function(e,t,r){if(null===e)return null;var n=e.apply(void 0,t);return l(n,r),n},d=Promise.resolve().then(function(){return null!==u?u:u=new Promise(function(e,t){if("undefined"==typeof window||"undefined"==typeof document){e(null);return}if(window.Stripe,window.Stripe){e(window.Stripe);return}try{var r=a();r||(r=s(null)),r.addEventListener("load",function(){window.Stripe?e(window.Stripe):t(Error("Stripe.js not available"))}),r.addEventListener("error",function(){t(Error("Failed to load Stripe.js"))})}catch(e){t(e);return}})}),f=!1;d.catch(function(e){f||console.warn(e)});var p=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];f=!0;var n=Date.now();return d.then(function(e){return c(e,t,n)})};let h=()=>(n||(n=p("pk_live_51LrrrRD42RHTsAynvBvJtL3t0tmZszLEtgiOuiZ1GQezdwYbZXbU41ImawMcJCKeLcUmklnpyixmtGE50Q1gOd8L00bCQjLnEq")),n);function m(e){if(!window.fbq)return;let t=document.cookie.split("; ").find(e=>e.startsWith("_fbp="))?.split("=")[1],r=document.cookie.split("; ").find(e=>e.startsWith("_fbc="))?.split("=")[1];return!r&&e.fbclid&&(r=e.fbclid),{fbp:t,fbc:r}}},78358:function(e,t,r){"use strict";r.d(t,{Bc:function(){return l},Gr:function(){return h},Ht:function(){return g},Ij:function(){return v},Q5:function(){return s},QI:function(){return a},fl:function(){return c},fm:function(){return p},nR:function(){return f},ps:function(){return d},wv:function(){return m}});var n=r(51879),i=r(96486),o=r.n(i);let a=Object.freeze({FREE:{name:"Free",productId:"dummy_product_id_123",prices:[],isFree:!0},PRO:{name:"Pro",productId:n.v9?"prod_Mbcg1IpW7eg93K":"prod_Mbz8mnO1WEke6P",prices:[{term:"monthly",price:15,active:!1,_description:"Old monthly price with 2k/day image limit",imagesPerDayLimit:2e3,priceId:n.v9?"price_1LsPRZD42RHTsAynAzslreVd":"price_1Lsl9rD42RHTsAynCO6STTRa"},{term:"monthly",price:15,active:!1,imagesPerDayLimit:1e3,_description:"New Pro monthly price with 1k images per day limit (Previously was 2k/day)",priceId:n.v9?"price_1O1aOeD42RHTsAynojlEUg1y":"price_1O1y9zD42RHTsAyniXLI1Rur"},{term:"monthly",price:15,active:!0,imagesPerDayLimit:200,_description:"New Pro monthly price with 200 images per day limit (Previously was 1k/day)",priceId:n.v9?"price_1Pw4BSD42RHTsAyni7WLeYxQ":"price_1Pw3qBD42RHTsAyndP8eRJOh"},{term:"annual",price:144,active:!1,imagesPerDayLimit:2e3,_description:"Old yearly price with 2k/day image limit",priceId:n.v9?"price_1No9qTD42RHTsAyniHbovRs4":"price_1No9ivD42RHTsAyny8y5lceI"},{term:"annual",price:144,active:!1,imagesPerDayLimit:1e3,_description:"New Pro yearly price with 1k images per day limit (Previously was 2k/day)",priceId:n.v9?"price_1O1agQD42RHTsAynDeu3ttaX":"price_1O1yAND42RHTsAynKbT16XHO"},{term:"annual",price:144,active:!0,imagesPerDayLimit:200,_description:"New Pro yearly price with 200 images per day limit (Previously was 1k/day)",priceId:n.v9?"price_1Pw4B4D42RHTsAynkpFXyhD0":"price_1Pw3r5D42RHTsAynbug9lidt"}]},TURBO:{name:"Turbo",productId:n.v9?"prod_OT7ed4nSlwsnvr":"prod_OT7VM7qXMCYQzI",prices:[{term:"monthly",price:45,active:!0,imagesPerDayLimit:2e3,priceId:n.v9?"price_1NgBPID42RHTsAynbpY4o7Oh":"price_1NgBG6D42RHTsAynpj8z8GpG"},{term:"annual",price:432,active:!0,imagesPerDayLimit:2e3,priceId:n.v9?"price_1No9plD42RHTsAynVl0FwHMG":"price_1No9oMD42RHTsAyn4kI2tNkK"}],isAddon:!1},PRO_DESIGN:{name:"Pro Design",productId:n.v9?"prod_QefmYdUQ0tHZ7l":"prod_QeOn0Bv0Xd89Qk",prices:[{term:"monthly",price:15,active:!0,priceId:n.v9?"price_1PnMRGD42RHTsAynpKzlrf9k":"price_1Pn5znD42RHTsAynlq8X26EZ"},{term:"annual",price:144,active:!0,priceId:n.v9?"price_1PnMRGD42RHTsAynj4tzv8t2":"price_1Pn5znD42RHTsAynYNhhN6TZ",numDesignImagesPer3HoursLimit:120},{term:"daypass",price:8,active:!0,priceId:n.v9?"price_1Q6CtJD42RHTsAyn522pufwy":"price_1Q6CsCD42RHTsAyn0E4L3alO"}]}}),s=a.PRO_DESIGN.prices.find(e=>e.active&&"annual"===e.term),l=(e,t)=>e.map(e=>e.stripePriceId).map(g).filter(Boolean).map(e=>{let r=e?.name||"";return t?.includeAnnual&&e?.term&&(r+=` ${e?.term}`),t?.includePrice&&e?.price&&(r+=` | $${e?.price}`),r}),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return o().some(e,e=>o().some(t,t=>t===e?.stripePriceId))},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(u(e,[t]))return!0;let{product:r,term:n}=g(t)||{};for(let t of e){let{product:e,term:i}=g(t.stripePriceId)||{};if(r===e&&n===i)return!0}return!1},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return u(e,t.flatMap(e=>e.prices.map(e=>e.priceId)))},f=e=>d(e,[a.PRO]),p=e=>d(e,[a.TURBO]),h=e=>d(e,[a.PRO_DESIGN])||e?.some(e=>"active"===e.revcatStatus),m=e=>e?Object.values(a).find(t=>t.prices.map(e=>e.priceId).includes(e)):null,g=e=>{let t=m(e);if(!t)return null;let r=t.prices.find(t=>t.priceId===e);return r?{product:t,name:t.name,price:r?.price,term:r?.term}:null},v=[{couponId:"FsUkYvbo",description:"100% Discount - 6 mos"},{couponId:"huQnJFJs",description:"100% Discount - 3 mos"},{couponId:"1NqTqsxu",description:"100% Discount - Once"}]},9695:function(e,t,r){"use strict";var n,i;r.d(t,{l:function(){return n}}),(i=n||(n={}))[i.RemovedLike=0]="RemovedLike",i[i.Like=1]="Like"},46825:function(e,t,r){"use strict";var n,i,o,a,s,l,u,c;r.d(t,{Dt:function(){return o},Hn:function(){return a},I5:function(){return n},mY:function(){return i}}),(s=n||(n={})).Newest="Newest",s.Oldest="Oldest",s.MostLiked="MostLiked",(l=i||(i={})).All="All",l.Private="Private",l.Public="Public",(u=o||(o={})).Images="Images",u.Likes="Likes",(c=a||(a={})).DALLE="dalle-2",c.PLAYGROUND_V1="playground-v1",c.STABLE_DIFFUSION_2="stable-diffusion-2",c.STABLE_DIFFUSION="stable-diffusion",c.STABLE_DIFFUSION_XL="stable-diffusion-xl",c.PLAYGROUND_V2="Playground_v2",c.PLAYGROUND_V2_5="Playground_v2.5",c.PLAYGROUND_V2_6="Playground_v2.6",c.PLAYGROUND_V3="Playground_v3"},98511:function(e,t,r){"use strict";r.r(t),r.d(t,{DesignPage:function(){return J},DesignSearchResults:function(){return ei},__N_SSP:function(){return Y},default:function(){return X},useDesignContext:function(){return K},useSearchQuery:function(){return en}});var n=r(85893),i=r(67294),o=r(48105),a=r(65105),s=r(41664),l=r.n(s),u=r(65481),c=r(1233),d=r(8891),f=r.n(d),p=r(90644),h=r(50886),m=r(38372),g=r(79986);function v(){let e=(0,g.useMyDesignsQuery)("mine");return(0,n.jsx)("div",{className:"flex gap-1 items-center overflow-x-auto no-scrollbar",children:e.data?.slice(0,10)?.map(e=>{let t=e.DesignFileVersion?.[0]?.width/e.DesignFileVersion?.[0]?.height;return n.jsx(l(),{href:`/design/${e.id}`,children:n.jsx("div",{className:"h-32 w-fit active:scale-[98%] duration-75 transition-all",style:{aspectRatio:t},children:n.jsx("img",{className:"rounded-3xl h-full w-fit",src:e?.DesignFileVersion?.[0]?.content?.background?.url,alt:e.id})},e.id)},e.id)})})}var y=r(57755),x=r(60505),b=r(97233),w=r(21426),_=r(14126),j=r(77922),C=r(49870),k=r(69198),E=r(3567),S=r(2220),N=r(46192),P=r(5266),L=r(43222),T=r(69306),O=r(52271);function R(e){return(0,n.jsx)("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.30595 8.45578L13.1356 7.70901C13.6854 10.1179 15.8411 11.9154 18.4166 11.9154C18.4391 11.9154 18.4617 11.9152 18.4842 11.915L19.2415 18.8414C19.3228 19.5848 18.786 20.2534 18.0425 20.3347L7.72812 21.4625C6.98467 21.5438 6.31608 21.007 6.23479 20.2635L5.107 9.94911C5.02571 9.20566 5.5625 8.53707 6.30595 8.45578ZM21.3953 18.6059L20.6131 11.4515C22.5102 10.6089 23.8333 8.70832 23.8333 6.4987C23.8333 3.50716 21.4081 1.08203 18.4166 1.08203C15.754 1.08203 13.5401 3.00318 13.0854 5.53493L6.07045 6.30195C4.13747 6.5133 2.74181 8.25163 2.95317 10.1846L4.08096 20.499C4.29232 22.432 6.03064 23.8277 7.96362 23.6163L18.278 22.4885C20.211 22.2772 21.6067 20.5388 21.3953 18.6059ZM13.2063 14.7596C13.1963 14.774 13.1865 14.7886 13.177 14.8037L12.2388 16.2924C12.1296 16.4658 11.889 16.4959 11.7402 16.3549L10.9852 15.6387C10.4963 15.175 9.67312 15.265 9.29599 15.8234L7.93234 17.8427C7.66507 18.2384 7.49101 18.7658 7.84695 19.0853C8.06958 19.2851 8.38148 19.3934 8.7128 19.3572L16.6449 18.4898C16.9898 18.4521 17.2803 18.2662 17.4524 18.0071C17.7041 17.6283 17.4422 17.1757 17.1226 16.8528L14.9077 14.6144C14.428 14.1297 13.5938 14.2074 13.2063 14.7596ZM15.5939 18.3894C15.5936 18.3895 15.59 18.3859 15.584 18.3784L15.5907 18.3854C15.593 18.3881 15.594 18.3894 15.5939 18.3894ZM9.74988 13.5404C10.6473 13.5404 11.3749 12.8128 11.3749 11.9154C11.3749 11.0179 10.6473 10.2904 9.74988 10.2904C8.85242 10.2904 8.12488 11.0179 8.12488 11.9154C8.12488 12.8128 8.85242 13.5404 9.74988 13.5404ZM18.4165 3.61393C18.8144 3.61393 19.137 3.93647 19.137 4.33435V5.7806H20.5833C20.9811 5.7806 21.3037 6.10314 21.3037 6.50102C21.3037 6.89889 20.9811 7.22143 20.5833 7.22143H19.137V8.66768C19.137 9.06556 18.8144 9.3881 18.4165 9.3881C18.0187 9.3881 17.6961 9.06556 17.6961 8.66768V7.22143H16.2499C15.852 7.22143 15.5295 6.89889 15.5295 6.50102C15.5295 6.10314 15.852 5.7806 16.2499 5.7806L17.6961 5.7806V4.33435C17.6961 3.93647 18.0187 3.61393 18.4165 3.61393Z",fill:"currentColor"})})}var A=r(51879),I=r(50497),M=r(24011),D=r(85518),F=r(62469),z=r(77832);function B(e){let{href:t,mixpanelKey:r,children:i,...o}=e;return(0,n.jsx)(l(),{...o,href:t,className:(0,c.cn)("pl-6 h-[76px] pr-3 py-3.5 bg-bg-secondary rounded-design-md flex gap-2 justify-between w-[21rem] items-center mx-auto sticky mt-auto group hover:bg-bg-tertiary",o.className),target:"_blank",onClick:()=>{f().track("Design footer promotion clicked",{content:r})},children:i})}let U=(0,M.L)("strong","text-fg-primary font-semibold"),V=(0,M.L)("p","text-base text-fg-tertiary group-hover:text-fg-secondary"),$={ios:{component:function(){let[e,t]=(0,i.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(I.X,{open:e,setOpen:t}),(0,n.jsxs)(B,{mixpanelKey:"ios app download",href:A.jB,children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(U,{children:"Download iOS App"}),(0,n.jsx)(V,{children:"Use Playground from anywhere"})]}),(0,n.jsx)("div",{role:"button",onClick:e=>{e.stopPropagation(),e.preventDefault(),f().track("Clicked QR code on design footer promotion"),t(!0)},className:"p-0.5 max-md:hidden rounded-lg bg-white w-12",children:(0,n.jsx)("img",{src:"https://cdn.playground.com/cms-media/download-app-qr-code.png",className:"",alt:""})})]})]})},show:()=>!D.Dt},creator:{component:function(){return(0,n.jsxs)(B,{mixpanelKey:"become a creator",href:"/become-a-creator",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(U,{children:"Become a creator"}),(0,n.jsx)(V,{children:"Earn passive income with what you love"})]}),(0,n.jsx)(F.kDh,{className:"text-fg-tertiary group-hover:text-fg-secondary w-4 h-4 mr-1"})]})},show:()=>!0},christmas:{component:function(){return(0,n.jsxs)(B,{className:"justify-start",mixpanelKey:"christmas",href:"/templates/s/christmas",children:[(0,n.jsx)("span",{className:"mr-1.5 text-2xl",children:"\uD83C\uDF84"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(U,{children:"Tis the season"}),(0,n.jsx)(V,{children:"See our latest designs for Christmas"})]})]})},show:()=>!0}};function H(){let[e,t]=(0,i.useState)(null),r=(0,i.useMemo)(()=>Object.keys($).filter(e=>{let{show:t}=$[e];return!t||t()}),[]);if((0,i.useEffect)(()=>{t(r[Math.floor(Math.random()*r.length)]);let e=setInterval(()=>{t(e=>{if(!e)return null;let t=(r.indexOf(e)+1)%r.length;return r[t]})},3e4);return()=>{clearInterval(e)}},[r]),(0,z.K)("r",()=>null),!e)return null;let o=$[e].component;return(0,n.jsx)(o,{})}var Z=r(11163),W=r(49405);let q=(0,i.createContext)(null),G=e=>(0,n.jsx)(q.Provider,{value:e,children:e.children});var Y=!0;let K=()=>{let e=i.useContext(q);if(!e)throw Error("useDesignContext must be used within a DesignContextProvider");return e};function X(e){return e.data.initialQuery?(0,n.jsx)(O.default,{data:{description:null,query:e.data.initialQuery,slug:e.data.initialQuery},results:e.data.results,recommendedPages:e.data.recommendedPages}):(0,n.jsx)(J,{...e})}function J(e){var t;let r=(0,m.Z)(),o=(0,T.OV)("sm",{initialValue:e.isMobile}),[a,s]=(0,b.Q)(),l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,Z.useRouter)(),[r,n]=(0,i.useState)(t.query.q??""),[o,a]=(0,i.useState)(t.query.q??""),s=(0,i.useCallback)(e=>{if(e){if(e.length>250)return;a(e);let r=new URLSearchParams(t.asPath.split("?")[1]);r.set("q",e),r.delete("f"),t.replace(`/design?${r.toString()}`,void 0,{shallow:!0})}else{a("");let e=new URLSearchParams(t.asPath.split("?")[1]);e.delete("q"),e.delete("f"),t.replace(`/design?${e.toString()}`,void 0,{shallow:!0})}},[t]),l=(0,i.useMemo)(()=>t.query.f,[t.query.f]),u=function(e){if(!e.trim())return null;let t=e.split(" "),r="";for(let e of t){if(r.length+e.length>50)break;let t=e.replace(/^[^a-zA-Z]*([a-zA-Z])/,(e,t)=>e.replace(t,t.toUpperCase()));r=r.concat(" ",t)}return r}(o),c=u?`${u} Template Designs`:null,d=!!o.trim()||void 0!==t.query.q&&!!e.length,f=!o.trim()&&void 0!==t.query.q&&d;return(0,i.useMemo)(()=>({showNewestTemplates:f,searchedFrom:l,searchQueryTitle:c,searchQueryInnerTitle:u,searchQuery:o,internalSearchQuery:r,updateSearchQuery:s,shouldShowSearchResults:d,setInternalSearchQuery:n}),[f,l,c,u,o,r,s,d,n])}(e.data.results);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_.Z,{title:`${l.searchQueryTitle??"Design"} - Playground`}),(0,n.jsxs)(G,{...e,children:[(0,n.jsx)(w.k,{}),(0,n.jsxs)("main",{className:"mx-auto px-3 w-full flex flex-col gap-6 lg:gap-10 pb-8 h-full",children:[(0,n.jsxs)(u.R,{children:[(0,n.jsx)(u.K,{className:"text-design-3xl",suppressHydrationWarning:!0,children:o?(0,n.jsx)("span",{className:"flex",children:"Create"}):(0,n.jsx)("span",{className:"flex",children:l.shouldShowSearchResults?l.searchQueryTitle??`${l.showNewestTemplates?"Newest ":""}Template Designs`:"What do you want to design today?"})}),o?(0,n.jsx)("div",{className:"flex",children:(0,n.jsx)(p.K,{children:(0,n.jsxs)(h.qE,{className:"h-8 w-8",children:[(0,n.jsx)(h.F$,{src:r?.image??""}),(0,n.jsx)(h.Q5,{className:"text-xs",children:(t=r?.name??r?.displayName??r?.email?.split("@")[0]??"",t?.split(" ").map(e=>e[0]).join(""))})]})})}):(0,n.jsx)("div",{className:"flex max-w-[350px] flex-grow",children:(0,n.jsx)(j.Z,{value:l.internalSearchQuery,onChange:e=>l.setInternalSearchQuery(e.target.value),onSubmit:e=>l.updateSearchQuery(e??"")})})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-8",children:[o&&(0,n.jsx)("div",{className:"max-w-lg",children:(0,n.jsx)(j.Z,{value:l.internalSearchQuery,onChange:e=>l.setInternalSearchQuery(e.target.value),onSubmit:e=>l.updateSearchQuery(e??"")})}),l.shouldShowSearchResults&&(0,n.jsx)(ei,{initialData:e.data.results,query:l.searchQuery.trim(),searchedFrom:l.searchedFrom,initialQuery:e.data.initialQuery})]}),!l.shouldShowSearchResults&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(et,{}),(0,n.jsx)(Q,{}),(0,n.jsx)(H,{})]})]})]})]})}function Q(){let e=(0,g.useMyDesignsQuery)("mine");return(e?.data?.length??0)>0?(0,n.jsxs)("div",{className:"md:hidden flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(y.P,{}),(0,n.jsx)("h2",{className:"text-design-lg font-semibold",children:"My Designs"}),(0,n.jsx)(o.z,{asChild:!0,variant:"ghost",className:"ml-auto",children:(0,n.jsx)(l(),{href:"/design/my-designs",children:"See all"})})]}),(0,n.jsx)(v,{})]}):null}function ee(e){return(0,n.jsx)("button",{type:"button",...e,className:(0,c.cn)("text-left group",e.className),children:(0,n.jsxs)(a.Zb,{className:"flex flex-col gap-3 relative overflow-hidden aspect-[14/10] group cursor-pointer bg-bg-secondary",children:[(0,n.jsxs)("h2",{className:"font-[600]",children:["Start ",(0,n.jsx)("span",{className:"max-md:hidden",children:"design"})," from image"]}),(0,n.jsx)("div",{className:"border-[3px] border-dashed rounded-design-base border-bg-quaternary group-hover:border-fg-quaternary h-full -mb-9",children:(0,n.jsx)("div",{className:"flex w-full h-full items-center justify-center text-fg-secondary",children:(0,n.jsx)(R,{className:"group-hover:scale-110 group-hover:rotate-6 transition-transform"})})})]})})}function et(){let{data:e}=K(),t=function(){let[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{t(N.G6)},[]),e}(),[,r]=(0,b.Q)();return(0,n.jsx)("div",{children:(0,n.jsxs)("ul",{className:"grid gap-1 grid-cols-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:[(0,n.jsx)(ee,{onClick:()=>r(!0)}),e.categories.map(e=>(0,n.jsx)("li",{className:"relative",children:(0,n.jsx)(l(),{href:`design/c/${(0,x.bS)(e)}`,onClick:()=>f().track("Category selected",{name:e.name,id:e.id}),"data-testid":`design-category-${e.id}`,children:(0,n.jsxs)(a.Zb,{className:"flex flex-col gap-3 relative overflow-hidden aspect-[14/10] group",children:[(0,n.jsx)("div",{className:"absolute inset-0 p-0",children:(0,n.jsx)("img",{src:e.previewImageUrls?.[0],alt:e.name,className:(0,c.cn)("object-top","h-full w-full object-cover rounded-design-sm","blur-xl opacity-20")})}),(0,n.jsxs)("h2",{className:"relative font-[600] inline-flex items-center gap-2",children:[e.name,"beta"===e.visibility||"internal"===e.visibility?(0,n.jsx)(W.Z,{}):null]}),(0,n.jsx)("div",{className:(0,c.cn)("absolute top-16 rotate-[6deg] left-1/2 -translate-x-1/2 w-1/2 flex items-center justify-center","aspect-[10/14] rounded-design-sm","shadow-design-sm",!t&&"transition duration-150",!t&&"md:group-hover:shadow-design-md md:group-hover:rotate-[5deg] md:group-hover:scale-105"),children:(0,n.jsx)("img",{src:e.previewImageUrls?.[0],alt:e.name,className:(0,c.cn)("pointer-events-none","object-top","h-full object-cover w-full rounded-design-sm","aspect-[10/14]")})})]})})},e.id))]})})}let er=e=>fetch(e).then(e=>e.json());function en(e,t,r,n){return(0,C.Z)(e?`/api/templates/search?query=${e}${t?`&searchedFrom=${t}`:""}`:null,er,r&&n?{fallbackData:e===r?n:void 0}:void 0)}function ei(e){let{query:t,searchedFrom:r,initialData:o,initialQuery:a,extraMixpanelProps:s,showCategory:l=!0,filter:u,columnsCount:c=null,context:d}=e,{data:f,isLoading:p}=en(t,r,a,o),h=(0,i.useMemo)(()=>u?f?.filter(u):f,[f,u]);return(0,n.jsx)("div",{className:"min-h-[80vh]",children:p?(0,n.jsx)(k.T,{}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"min-h-[80vh]",children:(0,n.jsx)(P.ZP,{columnsCountBreakPoints:c?{0:c}:E.F,fallbackColumnsCount:c??4,children:(0,n.jsx)(L.R,{gutter:"4px",autoPlace:!0,children:h?.map((e,r)=>{let n=e.TemplatePresets.find(e=>"original"===e.presetConfigSlug);return i.createElement(S._C,{...e,key:e.id,shouldTile:!1,showCategory:l,showCount:!0,extraMixpanelProps:{fromSearch:t,searchPosition:r,...s},"data-aspect-ratio":(n?.width??1)/(n?.height??1),context:d})})})})})})})}},79986:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return z},default:function(){return U},useMyDesignsQuery:function(){return B}});var n=r(85893),i=r(67294),o=r(59820),a=r(41664),s=r.n(a),l=r(3567),u=r(65481),c=r(90644),d=r(50886),f=r(38372),p=r(10397),h=r(27071),m=r(69198),g=r(48105),v=r(14126),y=r(13583),x=r(5266),b=r(43222),w=r(59480),_=r(2113),j=r(1233),C=r(28908),k=r(71864),E=r(8891),S=r.n(E),N=r(57718),P=r(27418),L=r(69306),T=r(73800),O=r(31630),R=r(86047);function A(e){return(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("ellipse",{cx:"4.16667",cy:"10.0007",rx:"1.66667",ry:"1.66667",fill:"currentColor"}),(0,n.jsx)("circle",{cx:"9.99992",cy:"10.0007",r:"1.66667",fill:"currentColor"}),(0,n.jsx)("ellipse",{cx:"15.8334",cy:"10.0007",rx:"1.66667",ry:"1.66667",fill:"currentColor"})]})}var I=r(49338),M=r(64372);let D=e=>{let{design:t}=e,r=(0,f.Z)(),a=t.userId===r?.id,l=a?t.Template?.tags[0].tag:{name:"Shared"},u=(0,O.T1)(),c=(0,i.useCallback)(async()=>{await fetch(`/api/design/files/${t.id}`,{method:"PATCH",body:JSON.stringify({userDeleted:!1}),headers:{"Content-Type":"application/json"}}),(0,o.JG)("/api/design/files/list?type=mine")},[t.id]),d=(0,i.useCallback)(async()=>{await fetch(`/api/design/files/${t.id}`,{method:"DELETE"}),(0,o.JG)("/api/design/files/list?type=mine"),u("Design deleted",{button:"Undo",onPress:c})},[t,u,c]),p=(0,C.b)(),{setUpgradeDialogMeta:h}=(0,k.mr)(),m=(0,P.N)(),g=(0,I.C)(),v=(0,L.OV)("md"),[y,x]=(0,i.useState)(!1),b=(0,M.Ru)({context:"my-designs",templateId:t.templateId,designFile:t,designVersion:t?.DesignFileVersion?.[0]}),E=(0,i.useCallback)(()=>{b("Download");let e=t?.DesignFileVersion?.[0]?.content?.background?.url;if(!e)return;let r=t?.templateId;return p?(r&&m.trigger({templateId:r}),g.trigger(),(async()=>{try{let r=await fetch(e),n=await r.blob(),i=t?.name||"Playground Design",o=new File([n],`${i}.png`,{type:"image/png"}),a=(0,N.T)();if(!(navigator?.share&&navigator.canShare({files:[o]}))||!v||!a)return(0,T.GN)(e,i);try{return await navigator.share({title:i,text:"Check out my design",files:[o]})}catch(e){}}catch(e){console.error("Error in shareOrDownload:",e),S().track("Problem downloading design",{detail:"Error in shareOrDownload",error:e,templateId:r,designId:t?.id,designVersionId:t?.DesignFileVersion?.[0]?.id}),u("An error occurred while processing the image. Please try again.")}})()):(S().track("Problem downloading design",{detail:"canDownload is false",templateId:r,designId:t?.id,designVersionId:t?.DesignFileVersion?.[0]?.id}),x(!1),h({open:!0,context:"download"}))},[t,p,h,m,g,v,u,b]);return(0,n.jsxs)("div",{className:"relative group inline m-[2px]",children:[(0,n.jsx)(s(),{href:`/design/${t.id}`,className:"relative",children:(0,n.jsxs)("div",{className:"rounded-design-lg overflow-hidden active:scale-[98%] duration-75 transition-all",children:[(0,n.jsx)("img",{src:t?.DesignFileVersion?.[0]?.content?.background?.url,alt:t.id,className:"inline-block transform transition-transform duration-300 ease-in-out hover:scale-105"}),l&&(0,n.jsx)("div",{className:"absolute bottom-4 right-4 bg-bg-tertiary mix-blend-luminosity backdrop-blur-sm text-fg-tertiary text-design-sm font-pg-medium px-[8px] py-[4px] rounded-full",children:l.name})]})}),a?(0,n.jsxs)(_.fC,{open:y,onOpenChange:x,children:[(0,n.jsx)(_.xz,{asChild:!0,children:(0,n.jsx)("button",{onClick:d,type:"button",className:(0,j.cn)("absolute top-4 right-4 bg-bg-secondary hover:bg-bg-tertiary mix-blend-luminosity backdrop-blur-sm text-fg-tertiary text-design-sm font-pg-medium p-1 rounded-full active:scale-[95%] duration-75 transition-all",y?"opacity-100":"opacity-0 group-hover:opacity-100"),children:(0,n.jsx)(A,{})})}),(0,n.jsxs)(_.VY,{align:"start",className:"p-1 z-50 bg-bg-primary rounded-design-md shadow-design-md min-w-[180px]",sideOffset:4,alignOffset:-8,children:[(0,n.jsxs)(F,{onClick:E,children:[(0,n.jsx)(R._,{}),"Download"]}),(0,n.jsxs)(F,{onClick:d,className:"text-[rgb(241,31,0)] hover:text-[rgb(241,31,0)]",children:[(0,n.jsx)(w.X,{})," Delete"]})]})]}):null]})},F=e=>{let{children:t,...r}=e;return(0,n.jsx)(_.ck,{className:"!outline-none w-full",children:(0,n.jsx)("button",{...r,type:"button",className:(0,j.cn)("px-[14px] py-[10px] text-fg-secondary hover:text-fg-primary rounded-full hover:bg-bg-secondary !outline-none w-full flex justify-start gap-[10px] active:focus:scale-[98%] transition-all duration-75",r.className),children:t})})};var z=!0;function B(e){let t=(0,o.ZP)(`/api/design/files/list?type=${e}`,e=>fetch(e).then(e=>e.json()));return{...t,data:t?.data?.filter?.(e=>!e.templateId&&!e.createdFromPublicVersionId||e.DesignFileVersion.length>1)}}function U(e){let{type:t}=e,r=B(t),i=(0,f.Z)(),o="shared"===t?"Shared with me":"My Designs";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v.Z,{title:`${o} - Playground`}),(0,n.jsxs)("main",{className:"mx-auto px-3 w-full flex flex-col gap-3",children:[(0,n.jsxs)(u.R,{children:[(0,n.jsx)(p.D,{size:"icon",className:"md:hidden",children:(0,n.jsx)(h.Z,{className:"h-5 w-5"})}),(0,n.jsx)(u.K,{className:"md:mr-auto",children:o}),(0,n.jsx)("div",{className:"flex md:hidden",children:(0,n.jsx)(c.K,{children:(0,n.jsxs)(d.qE,{className:"h-8 w-8",children:[(0,n.jsx)(d.F$,{src:i?.image??""}),(0,n.jsx)(d.Q5,{className:"text-xs",children:(0,y.Q)(i)})]})})})]}),(0,n.jsx)("div",{className:"flex items-center justify-start mb-4"}),(0,n.jsx)("div",{className:"min-h-[80vh]",children:r.isLoading?(0,n.jsx)(m.T,{}):Array.isArray(r.data)&&r.data?.length>0?(0,n.jsx)(x.ZP,{columnsCountBreakPoints:l.F,children:(0,n.jsx)(b.R,{gutter:"0px",autoPlace:!0,children:r.data?.map(e=>{let t=e?.DesignFileVersion?.[0]?.width/e?.DesignFileVersion?.[0]?.height;return n.jsx(D,{design:e,"data-aspect-ratio":t},e.id)})})}):r.error?(0,n.jsxs)("div",{className:"flex flex-col gap-3 items-center py-24",children:[(0,n.jsx)("h3",{className:"text-fg-primary text-2xl font-bold",children:"Oops!"}),(0,n.jsx)("p",{className:"text-fg-secondary",children:"An error has occured"}),(0,n.jsx)(g.z,{variant:"secondary",onClick:()=>r.mutate(),children:"Try again"})]}):(0,n.jsxs)("div",{className:"flex flex-col gap-4 items-center py-24",children:[(0,n.jsx)("img",{className:"w-56 h-auto object-contain",src:"/images/design/design-empty-state.png"}),(0,n.jsx)("p",{className:"text-fg-secondary",children:"mine"===t?"Your designs will show up here":"Designs shared with you will show up here"}),(0,n.jsx)(g.z,{variant:"secondary",asChild:!0,children:(0,n.jsx)(s(),{href:"/design",children:"Start creating"})})]})})]})]})}},52271:function(e,t,r){"use strict";r.r(t),r.d(t,{RecommendedPages:function(){return b},__N_SSP:function(){return y},default:function(){return x}});var n=r(85893),i=r(17402),o=r(97597),a=r(62363),s=r(65481),l=r(14126),u=r(98511),c=r(5152),d=r.n(c),f=r(67294),p=r(41664),h=r.n(p),m=r(69306);let g=d()(()=>Promise.resolve().then(r.bind(r,23078)),{loadableGenerated:{webpack:()=>[23078]}});function v(e){let t=[{title:"Home",href:"/design"},{title:"Templates",href:"/design?q="},{title:e.title,href:`/templates/s/${e.slug}`}];return(0,n.jsx)("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:t.map((e,r)=>(0,n.jsxs)(f.Fragment,{children:[r>0&&(0,n.jsx)(a._Q,{}),(0,n.jsx)(h(),{href:e.href,className:`hover:text-gray-700 ${r===t.length-1?"font-semibold":""}`,children:e.title})]},e.href))})}var y=!0;function x(e){let{data:t,results:r,recommendedPages:a}=e,[c,d]=(0,f.useState)(!1),p=(0,m.OV)("md"),h=`Free and customizeable ${t.query.toLowerCase()} templates`;return(0,n.jsxs)("div",{children:[(0,n.jsx)(l.Z,{title:`${h} - Playground`,description:`Explore professionally designed ${t.query.toLowerCase()} templates you can customize and share from Playground.`}),(0,n.jsx)(g,{open:c,onOpenChange:d}),(0,n.jsx)("nav",{children:(0,n.jsx)(o.Z,{login:()=>d(!0),variant:"search-landing-page"})}),(0,n.jsxs)("main",{className:"mx-auto px-3 w-full flex flex-col gap-0 lg:gap-0 pb-8",children:[(0,n.jsxs)("header",{className:"px-3 pt-8 pb-4",children:[(0,n.jsx)(v,{title:t.query,slug:t.slug}),(0,n.jsx)(s.K,{className:"text-design-3xl mt-4",children:(0,n.jsxs)("span",{className:"",children:[t.query," templates"]})}),(0,n.jsx)("p",{className:"text-pg-ds-600",children:`Browse our free templates for ${t.query.toLowerCase()} designs you can easily customize and share.`})]}),(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsx)(u.DesignSearchResults,{initialData:r,query:t.query.trim(),initialQuery:t.query,extraMixpanelProps:{searchLandingPage:"true",searchLandingPageSlug:t.slug},showCategory:!p})}),t.description&&(0,n.jsx)("div",{className:"px-3",children:(0,n.jsxs)("div",{className:"bg-bg-secondary rounded-pg-lg p-5 px-6 mt-8",children:[(0,n.jsxs)("h2",{className:"text-xl font-bold mb-2",children:[t.query," by Playground"]}),(0,n.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:t.description})]})}),(0,n.jsx)(b,{recommendedPages:a})]}),(0,n.jsx)("footer",{className:"bg-black overflow-hidden",children:(0,n.jsx)(i.Z,{})})]})}function b(e){let{recommendedPages:t}=e;return(0,n.jsxs)("section",{className:"px-3 pt-8",children:[(0,n.jsx)("h2",{className:"text-xl font-bold mb-2",children:"Browse templates"}),(0,n.jsx)("ul",{className:"flex flex-wrap gap-2",children:t.map(e=>(0,n.jsx)("li",{className:"mt-2",children:(0,n.jsx)(h(),{href:`/templates/s/${e.slug}`,className:"rounded-full bg-bg-secondary py-1.5 px-2.5 text-[14px]",children:e.query})},e.slug))})]})}},51879:function(e,t,r){"use strict";r.d(t,{Ci:function(){return F},Cz:function(){return T},D2:function(){return U},Ew:function(){return Z},Fl:function(){return $},Hq:function(){return G},Il:function(){return d},Kk:function(){return B},MZ:function(){return l},N$:function(){return C},NM:function(){return o},NP:function(){return u},NQ:function(){return c},Oq:function(){return j},QA:function(){return _},QN:function(){return b},R$:function(){return I},Rp:function(){return i},Sq:function(){return s},XP:function(){return x},Y1:function(){return H},YT:function(){return R},ZI:function(){return S},_n:function(){return V},a3:function(){return E},cK:function(){return W},cN:function(){return q},co:function(){return M},d_:function(){return p},g5:function(){return g},gF:function(){return m},gO:function(){return k},jB:function(){return N},mZ:function(){return D},mm:function(){return A},mw:function(){return z},oS:function(){return P},rA:function(){return h},sY:function(){return L},ui:function(){return O},v3:function(){return a},v9:function(){return f},vt:function(){return w}});var n=r(46825);let i=3,o=100,a=!1,s={FREE:{imagesPerDayLimit:10,editsPerDayLimit:20,upscalesPerMonthLimit:30,creativeUpscalesPerMonthLimit:5,faceRestoresPerMonthLimit:30,concurrentGenerationsLimit:4,concurrentPhotorealismGensLimit:4,promptExpansionsPerMonthLimit:30,photorealismGensPerMonthLimit:30,presetsLimit:3,captionerLimit:5,numDesignImagesPer3HoursLimit:15,designDownloadsPerDay:10},PRO:{imagesPerDayLimit:200,editsPerDayLimit:5e3,upscalesPerMonthLimit:1/0,creativeUpscalesPerMonthLimit:100,faceRestoresPerMonthLimit:1/0,concurrentGenerationsLimit:4,concurrentPhotorealismGensLimit:4,promptExpansionsPerMonthLimit:1/0,photorealismGensPerMonthLimit:1/0,presetsLimit:1/0,captionerLimit:200,numDesignImagesPer3HoursLimit:15,designDownloadsPerDay:10},TURBO:{imagesPerDayLimit:2e3,editsPerDayLimit:5e3,upscalesPerMonthLimit:1/0,creativeUpscalesPerMonthLimit:250,faceRestoresPerMonthLimit:1/0,concurrentGenerationsLimit:16,concurrentPhotorealismGensLimit:8,promptExpansionsPerMonthLimit:1/0,photorealismGensPerMonthLimit:1/0,presetsLimit:1/0,captionerLimit:400,numDesignImagesPer3HoursLimit:15,designDownloadsPerDay:10},PRO_DESIGN:{imagesPerDayLimit:10,editsPerDayLimit:20,upscalesPerMonthLimit:1/0,creativeUpscalesPerMonthLimit:5,faceRestoresPerMonthLimit:30,concurrentGenerationsLimit:4,concurrentPhotorealismGensLimit:4,promptExpansionsPerMonthLimit:30,photorealismGensPerMonthLimit:30,presetsLimit:3,captionerLimit:200,numDesignImagesPer3HoursLimit:75,designDownloadsPerDay:1/0}},l=-1,u={[n.Hn.STABLE_DIFFUSION]:{name:"Stable Diffusion 1.5",shortName:"SD 1.5",url:"https://stability.ai/"},[n.Hn.STABLE_DIFFUSION_2]:{name:"Stable Diffusion 2",url:"https://stability.ai/blog/stable-diffusion-v2-release",deprecated:!0},[n.Hn.DALLE]:{name:"DALL-E 2",url:"https://openai.com/dall-e-2/",deprecated:!0},midjourney:{name:"Midjourney",url:"https://www.midjourney.com",deprecated:!0},[n.Hn.PLAYGROUND_V1]:{name:"Playground v1",url:"https://playground.com/home",deprecated:!0},[n.Hn.STABLE_DIFFUSION_XL]:{name:"Stable Diffusion XL",shortName:"SDXL",url:"https://stability.ai/blog/sdxl-09-stable-diffusion"},[n.Hn.PLAYGROUND_V2]:{name:"Playground v2",url:"https://playground.com/blog/playground-v2"},[n.Hn.PLAYGROUND_V2_5]:{name:"Playground v2.5",url:"https://playground.com/blog/playground-v2-5"},[n.Hn.PLAYGROUND_V2_6]:{name:"Playground v2.6",url:"https://playground.com/blog",isUnreleased:!0},[n.Hn.PLAYGROUND_V3]:{name:"Playground v3 (beta)",url:"https://playground.com/blog"}},c={regular:"Tiny underwater complete world in large glass bowl, water, omnilight, Sharp, detailed and intricate environment"},d="goldfish, pink, blurry",f=!1,p=8,h=50,m=100,g=60,v=e=>e===n.Hn.PLAYGROUND_V3,y=e=>e!==n.Hn.PLAYGROUND_V3,x=[{width:512,height:512},{width:1024,height:1024},{width:640,height:384},{width:384,height:640},{width:768,height:512},{width:512,height:768}],b=[{height:1280,width:720,disabled:v},{height:1344,width:768,disabled:y},{height:1168,width:876,disabled:v},{height:1024,width:768,disabled:y},{height:1254,width:836,disabled:v},{width:832,height:1216,disabled:y},{height:1024,width:1024},{height:836,width:1254},{width:1254,height:836,disabled:v},{height:832,width:1216,disabled:y},{height:876,width:1168,disabled:v},{height:768,width:1024,disabled:y},{height:720,width:1280,disabled:v},{height:768,width:1344,disabled:y}],w=[...b],_=[{width:768,height:768}],j=7,C="https://twitter.com/playground_ai",k="http://help.playgroundai.com",E="https://status.playground.com",S="https://tally.so/r/nW56ee",N="https://apps.apple.com/us/app/playground-ai-art-generator/id6478421458",P="https://www.youtube.com/watch?v=Ggx1EmteavI",L="https://arxiv.org/html/2409.10695v1",T="https://dapper-glove-b11.notion.site/Working-at-Playground-e90f8b72558748dcb77dcf4384410d7a",O=1.45,R=1,A=100,I=1,M=50,D=()=>Math.floor(1e9*Math.random()),F=5,z=5,B=240,U="ugly, deformed, noisy, blurry, distorted, out of focus, bad anatomy, extra limbs, poorly drawn face, poorly drawn hands, missing fingers, nudity, nude",V="https://playground.com",$=[{name:"Fast",stepCount:30},{name:"High Quality",stepCount:75}],H=[{name:"Low",[n.Hn.PLAYGROUND_V2]:1,[n.Hn.PLAYGROUND_V2_5]:1,[n.Hn.STABLE_DIFFUSION_XL]:3,[n.Hn.STABLE_DIFFUSION]:3},{name:"Medium",[n.Hn.PLAYGROUND_V2]:3,[n.Hn.PLAYGROUND_V2_5]:3,[n.Hn.STABLE_DIFFUSION_XL]:7,[n.Hn.STABLE_DIFFUSION]:7},{name:"High",[n.Hn.PLAYGROUND_V2]:7,[n.Hn.PLAYGROUND_V2_5]:7,[n.Hn.STABLE_DIFFUSION_XL]:12,[n.Hn.STABLE_DIFFUSION]:12}],Z=200,W=2e4,q=1,G=64},18957:function(e,t,r){"use strict";r.d(t,{KO:function(){return d},lY:function(){return u},mD:function(){return c}});let n="en-US",i=new Intl.RelativeTimeFormat(n,{numeric:"auto",style:"long"}),o=new Intl.RelativeTimeFormat(n,{numeric:"auto",style:"narrow"}),a=new Intl.RelativeTimeFormat(n,{numeric:"always",style:"narrow"}),s={year:315576e5,month:26298e5,day:864e5,hour:36e5,minute:6e4,second:1e3},l={week:6048e5,day:864e5,hour:36e5,minute:6e4};function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,n=e-Date.now(),l="narrow"===t?o:"narrowNumeric"===t?a:i;for(let[e,t]of Object.entries(r)){let r=Math.ceil(n/t);if(r)return l.format(r,e)}let u=Object.keys(r)[Object.keys(r).length-1],c=Math.floor(n/r[u]);return l.format(c,u)}function c(e){let t=e-Date.now();for(let[e,r]of Object.entries(l)){let n=Math.abs(Math.ceil(t/r));if(n)return`${n}${e[0].charAt(0)}`}let r=Object.keys(l)[Object.keys(l).length-1],n=Math.abs(Math.floor(t/l[r]));return`${n}${r[0].charAt(0)}`}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",r=Date.now()-e;if(r<s.minute)return"Just now";if(r<s.day)return u(e,t);{let i=r>s.year;return e.toLocaleDateString(n,{year:i?"numeric":void 0,month:"narrow"===t?"numeric":"long",day:"numeric"})}}},72690:function(e,t,r){"use strict";r.d(t,{J:function(){return a},h:function(){return s}});var n=r(67294),i=r(38372),o=r(73800);function a(){let e=(0,i.Z)(),t=(0,n.useCallback)(()=>{let t=`<html>
    <head>
    <style>
    *:not(pre) {
      font-family: sans-serif;
    }
    </style>
    <title>Diagnostics</title>
    </head>
    <body>
    <h1>Diagnostics</h1>

    ${s(e)}

    </body>
    </html>`;(0,o.Sv)(`pg-diagnostics-${Date.now()}.html`,t)},[e]);return e?t:null}function s(e){let t=window.performance.memory;return`
  <h2>User Data</h2>
  <p>User agent: ${navigator.userAgent}</p>

  <pre>${JSON.stringify(e,null,2)}</pre>
  
  <h2>Local storage</h2>

  <pre id="localstorage">${JSON.stringify(localStorage,null,2)}</pre>

  <h2>Other</h2>
  <p>
    Export time ${Date.now()} ${new Date().toUTCString()}
  </p>
  <p>
    Window.performance
    <pre>${JSON.stringify(window.performance,null,2)}</pre>
    <!-- For some reason this isn't stringified in window.performance -->
    ${t&&`
    <p>memory.totalJSHeapSize: ${t.totalJSHeapSize}</p>
    <p>memory.jsHeapSizeLimit: ${t.jsHeapSizeLimit}</p>
    <p>memory.usedJSHeapSize: ${t.usedJSHeapSize}</p>
    `}
  </p>`}},73800:function(e,t,r){"use strict";r.d(t,{GN:function(){return m},Sv:function(){return o},k6:function(){return i}});var n=r(53416);let i=e=>e.substring(0,100).toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"");function o(e,t){let r=document.createElement("a");"string"==typeof t?r.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)):t instanceof Blob&&r.setAttribute("href",URL.createObjectURL(t)),r.setAttribute("download",e),r.style.display="none",document.body.appendChild(r),r.click(),setTimeout(()=>{URL.revokeObjectURL(r.href),r.parentNode&&r.parentNode.removeChild(r)},0)}let a=e=>34/168*e,s=e=>157/168*e,l=e=>25/168*e,u=e=>10/168*e,c=e=>38/241*e,d=e=>225/241*e,f=e=>30/241*e,p=e=>10/241*e;async function h(e){let{wide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{wide:!1},r=new Image;return r.crossOrigin="anonymous",r.src=e,new Promise(n=>{let i=Math.max(252,.2*r.width),o=a(i),h=s(i),m=l(i),g=u(i);t&&(o=c(i=Math.max(313,.2*r.width)),h=d(i),m=f(i),g=p(i)),r.onload=()=>{let a=document.createElement("canvas"),s=a.getContext("2d");if(!s)return;a.width=r.width,a.height=r.height,s.drawImage(r,0,0),s.filter="blur(4px)",s.drawImage(a,a.width-i-g,a.height-o-g,i,o,a.width-i-g,a.height-o-g,i,o),s.filter="none",s.globalCompositeOperation="destination-in",s.fillStyle="#000",s.beginPath(),s.roundRect(a.width-i-g,a.height-o-g,i,o,6),s.fill(),s.roundRect(a.width-i-g,a.height-o-g,i,o,6),s.fill(),s.fillStyle="rgba(5,2,14,0.48)",s.globalCompositeOperation="source-over",s.fill(),s.globalCompositeOperation="destination-over",s.drawImage(r,0,0,a.width,a.height),s.globalCompositeOperation="source-over";let l=new Image;l.crossOrigin="anonymous",l.src=t?"https://cdn.playground.com/cms-media/face_logo_for_watermark.svg":"https://cdn.playground.com/cms-media/logo_for_watermark",l.onload=()=>{let t=(i-h)/2,r=(o-m)/2;s.drawImage(l,0,0,l.width,l.height,a.width-i-g+t,a.height-o-g+r,h,m);let u=e.split(";")[0].split("/")[1];n(a.toDataURL(`image/${u}`))}}})}t.ZP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withWatermark:!1,wideWatermark:!1};(t.withWatermark?h(e.url,{wide:t.wideWatermark??!1}):Promise.resolve(e.url)).then(e=>fetch(e,{method:"GET",headers:{}})).then(e=>e.arrayBuffer()).then(t=>{let r=window.URL.createObjectURL(new Blob([t])),o=document.createElement("a"),a=`${i(e.prompt)}${e.seed?`-${e.seed}`:""}`||`playground-image-${(0,n.x0)(5)}`;o.href=r,a=e.url.startsWith("data:")?`${a}.${e.url.split(";")[0].split("/")[1]}`:`${a}.${e.url.split(".").pop()}`,o.setAttribute("download",a),document.body.appendChild(o),o.click()}).catch(e=>{console.log(e)})};let m=(e,t)=>{let r=document.createElement("a");r.download=`${t||"image"}.png`,fetch(e).then(e=>e.blob()).then(e=>{let t=URL.createObjectURL(e);r.href=t,r.click(),URL.revokeObjectURL(t)}).catch(e=>console.error("Failed to download image:",e))}},13583:function(e,t,r){"use strict";function n(e){return e?.split(" ").map(e=>e[0]).join("")}function i(e){return"string"==typeof e?n(e):n(e?.name??e?.displayName??e?.email?.split("@")[0]??"")}r.d(t,{Q:function(){return i}})},49325:function(e,t,r){"use strict";r.d(t,{t5:function(){return u}});var n=r(33299),i=r(59820),o=r(11923);function a(e){return(0,i.ZP)("/api/admin/plan",async t=>await (0,o.S)(t,{id:e}))}var s=r(86709);function l(e){let t=(0,n.useSession)();return u.sessionIsAuthorized(t.data,e)}class u{static #e=this.useUserPlans=a;static #t=this.useUserHasPermission=l;static userIsAuthorized(e,t){return this.sessionIsAuthorized({user:{db:e}},t)}static sessionIsAuthorized(e,t){if(!e)return!1;let r=e.user.db.role,n=s.Y[r];return!!n&&n.filter(e=>new RegExp(e).test(t)).length>0}}},12526:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(598);function i(e){let{children:t}=e;return(0,n.Z)()?t:null}},31630:function(e,t,r){"use strict";r.d(t,{T1:function(){return u},bm:function(){return d},vj:function(){return c}});var n=r(85893),i=r(11163),o=r(67294),a=r(37914),s=r(1233);let l=(0,o.createContext)({editToast:()=>{},addToast:()=>{},toasts:[]});function u(){return o.useContext(l)?.addToast}function c(){return(0,o.useContext)(l)}function d(e){let{children:t}=e,[r,u]=(0,o.useState)([]),[c,d]=(0,o.useState)(!1),p=(0,i.useRouter)(),h=e=>{d(!0),setTimeout(()=>{d(!1),u(t=>t.filter(t=>t.id!==e))},300)};return(0,n.jsxs)(l.Provider,{value:{toasts:r,addToast(e){let{time:t=3e3,clear:n=!0,button:i,onPress:o,onClear:s,id:l,meta:c,icon:d}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(l&&r.find(e=>e.id===l))throw Error("Toast with that id already exists");let f=setTimeout(()=>{h(p.id),s?.()},t),p={title:e,id:l||(0,a.Y)(10),time:t,endDate:Date.now()+t,button:i,onPress:o,meta:c,onClearTimeout:f,icon:d};u(e=>n?[p]:[...e,p])},editToast(e,t){let n=r.find(t=>t.id===e);n.onClearTimeout&&clearTimeout(n.onClearTimeout);let i=setTimeout(()=>{h(n.id),t.onClear?.()},t.time??n.time),o={...n,...t,endDate:Date.now()+(t.time??n.time),onClearTimeout:i};u(t=>t.map(t=>t.id===e?o:t))}},children:[(0,n.jsx)("div",{className:(0,s.cn)(`fixed w-full flex justify-center pointer-events-none ${p.query.postId?"z-[1001]":"z-[100]"} left-[50%] -translate-x-1/2 top-18`),children:[,,,,,].fill(null).map((e,t)=>r[t]).map((e,t)=>{let i=t<r.length-(c?1:0);return e?(0,n.jsxs)("div",{className:"text-white text-base pointer-events-auto flex items-center bg-gray-90 backdrop-blur-md py-2 px-4 rounded-xl z-[1001] shadow-lg transition-transform will-change-transform ease-in overflow-hidden",style:{transform:i?`translateY(${10+10*t}px)`:"translateY(-112px)"},children:[(0,n.jsx)(f,{endTime:e.endDate,totalTime:e.time}),e.icon&&(0,n.jsx)("span",{className:"mr-3 text-[#FF6767]",children:e.icon}),(0,n.jsx)("span",{className:"flex-none",children:e.title}),e.button&&(0,n.jsx)("button",{className:"ml-3 pl-3 z-[1001] text-gray-50 hover:text-white transition-all",onClick:()=>{e.onPress(e),h(e.id)},children:e.button})]},t):(0,n.jsx)("div",{className:"transition-transform will-change-transform ease-out -translate-y-28"},t)})}),t]})}function f(e){let{endTime:t,totalTime:r}=e,[i,a]=(0,o.useState)(0);return(0,o.useEffect)(()=>{let e=setInterval(()=>{a(1-(t-Date.now())/r)},10);return()=>clearInterval(e)},[t,r]),(0,n.jsx)("progress",{value:i,className:"absolute inset-0 h-full -z-10 subtle",children:i})}},86709:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});let n={ADMIN:[".*"],RESEARCHER:["userrankings:manage","annoucements:add","research:*","api-keys:manage","design:view-template-prompts"],RESEARCHBASE_UPLOADER:["research:images:upload","research:labels:category:read"],TEMPLATE_CREATOR:["design:create-template"]}},30286:function(e,t,r){"use strict";r.d(t,{K:function(){return n}});let n=e=>(t,r)=>{let n="increment"===r?t+1:t-1;return n>e-1?0:n<0?e-1:n}},11923:function(e,t,r){"use strict";r.d(t,{S:function(){return i},W:function(){return o}});var n=r(82449);let i=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=Array.isArray(e)?e[0]:e,i=null;i=t?fetch(r,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}):fetch(r),(0,n.assert)(null!==i,"Promise should not be null");let o=await i;return await o.json()},o=e=>async t=>{let r=await i(t),n=e.safeParse(r);if(n.success)return n.data;throw console.error(`Invalid data: ${n.error}`,r),Error("Invalid data")}},19311:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(44746),i=r(33299),o=r(92890),a=r(79134),s=r(49325);function l(){(0,i.useSession)();let e=(0,n.sA)(),t=s.t5.useUserHasPermission("moderation:images:private"),[r]=(0,o.Iw)(a.Hv,!1);return e||t||!r}},11615:function(e,t,r){"use strict";r.d(t,{EG:function(){return h},FF:function(){return v},Ou:function(){return p},Rj:function(){return m},jg:function(){return y},oC:function(){return i}});var n,i,o=r(10443),a=r(1604),s=r(51879),l=r(88246),u=r(14892),c=r(46302),d=r(57632),f=r(46825);(n=i||(i={})).Default="default",n.PlaygroundV2="playground-v2",n.PlaygroundV2_5="playground-v2.5",n.StableDiffusionXL="stable-diffusion-xl";let p=e=>{switch(e){case"playground-v2":return f.Hn.PLAYGROUND_V2;case"stable-diffusion-xl":return f.Hn.STABLE_DIFFUSION_XL;case"playground-v2.5":return f.Hn.PLAYGROUND_V2_5;default:return"default"}},h=e=>{switch(e){case f.Hn.PLAYGROUND_V2_5:return"playground-v2.5";case f.Hn.PLAYGROUND_V2:return"playground-v2";case f.Hn.STABLE_DIFFUSION_XL:return"stable-diffusion-xl";default:return"default"}},m={guidance_scale:{min:0,max:30,default:7},steps:{min:10,max:150,default:50},startSchedule:{min:0,max:1,default:.7},high_noise_frac:{min:0,max:1,default:.6}},g=Object.keys(m).reduce((e,t)=>{let r=m[t];return e[t]=a.z.number().min(r.min).max(r.max).default(r.default),e},{}),v=a.z.object({...g,model:a.z.nativeEnum(i).default("default").catch("default"),prompt:a.z.string().default(""),original_prompt:a.z.string().optional(),negativePrompt:a.z.string().default("ugly, deformed, noisy, blurry, distorted, out of focus, bad anatomy, extra limbs, poorly drawn face, poorly drawn hands, missing fingers, nudity, nude"),negativePromptType:a.z.nativeEnum(u.x).default(u.x.Custom),imageToImage:a.z.object({url:a.z.string(),width:a.z.number(),height:a.z.number(),pencilImageUrl:a.z.string().optional(),pencilStrokes:a.z.array(a.z.object({points:a.z.array(a.z.array(a.z.number())),color:a.z.string(),diameter:a.z.number()})).optional()}).optional(),initImage:a.z.string().optional(),initImageSize:a.z.array(a.z.number()).optional(),maskImage:a.z.string().optional(),seed:a.z.number().default(s.mZ),useRandomSeed:a.z.boolean().default(!0),filter_id:a.z.string().default(o.$p.id),sampler:c.O7.default("DPMPP_2M_K"),num_images:a.z.number().int().min(1).max(8).default(1),controlnet:a.z.array(a.z.nativeEnum(l.sU)).default([]),controlnet_conditioning_scale:a.z.array(a.z.number()).default([]),controlnet_images:a.z.array(a.z.string()).default([]),preprocessor_settings:a.z.array(a.z.object({high_threshold:a.z.number().optional(),low_threshold:a.z.number().optional()})).default([]),generate_from_draft:a.z.boolean().default(!1),shouldExpandImageDetails:a.z.boolean().default(!0),shouldExpandLightAndColor:a.z.boolean().default(!0),expandPrompt:a.z.boolean().default(!1)}),y=v.omit({useRandomSeed:!0}).and(a.z.object({statusUUID:a.z.string().optional().default(d.Z)}))},75266:function(e,t,r){"use strict";r.d(t,{_:function(){return f}});var n=r(85893),i=r(94562),o=r(85604),a=r(37182),s=r(85944),l=r(22220),u=r(83307),c=r(11163),d=r.n(c);class f{static showError(e,t,r){let n=u.Zk.safeParse(e);if(n.success)return this.showKnownError(n.data,t,r);this.showKnownError("UNKNOWN_ERROR",t,r)}static getCta(e,t){return u.mf.has(e)?{label:(0,n.jsx)(a.H,{}),onClick(){d().push("/pricing")}}:u.hK.has(e)?(0,i.W)({filter_id:t?.filter,negativePrompt:t?.negativePrompt,prompt:t?.prompt,steps:t?.steps??0,imageToImage:void 0,initImage:t?.init_image,maskImage:t?.mask_image}):"SAFETY_FILTER_RATE_LIMITED"===e?{label:(0,n.jsx)("a",{href:"mailto:support@playgroundai.com",children:"Contact support"}),onClick(){}}:void 0}static showKnownError(e,t,r){let n=(0,l.N)(e,t),i=this.getCta(e,r),a=n?.errorMessage??void 0;["RATE_LIMITED","CREATIVE_UPSCALE_LIMIT_EXCEEDED","SIMULTANEOUS_GENS_DISABLED","CAPTIONER_LIMIT_EXCEEDED"].includes(e)&&t.errBody&&(a=t.errBody);let u=s.k[n?.errorCode??""]??a;(0,o.mv)({header:n?.errorTitle??"Failed to create image",type:t.type||"error",body:u,timeout:!1,meta:{errorCode:n?.errorCode,isImageGenerationError:!0},cta:i})}}},10404:function(e,t,r){"use strict";r.d(t,{I:function(){return n}});let n=(0,r(64529).Ue)(e=>({baseImage:void 0,setBaseImage:t=>e({baseImage:t})}))},95295:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(86076),i=r(44746),o=r(33299),a=r(51879),s=r(67294);function l(e,t,r){let l=(0,o.useSession)(),[u,c]=(0,s.useState)((r?.getTime()??0)>Date.now()?(r?.getTime()??0)-Date.now():0);(0,s.useEffect)(()=>{if((r?.getTime()??0)>Date.now()){let e=setInterval(()=>{let t=(r?.getTime()??0)-Date.now();t<=0&&clearInterval(e),c(t)},1e3);return()=>clearInterval(e)}},[r]);let d=e.imageOptions.num_images??1,f=(0,s.useMemo)(()=>e.imageHistory.filter(e=>e.loading&&e.createdAt).length,[e.imageHistory]),p=(0,s.useMemo)(()=>e.imageHistory.filter(e=>e.loading&&e.createdAt&&e.meta?.options.filter==="photorealism").length,[e.imageHistory]),h=(0,n.Pp)(l.data)-a.rA,m=!(e.usage?.numImagesInLastDay>h&&f>0),g=(0,i.WI)(),v=(0,i.s4)()?a.Sq.TURBO.concurrentGenerationsLimit:g?a.Sq.PRO.concurrentGenerationsLimit:a.Sq.FREE.concurrentGenerationsLimit,y=p+d>(0,n._N)("concurrentPhotorealismGensLimit",l.data)&&"photorealism"===e.imageOptions.filter,x=e.promptLoading;return{isDisabled:0===t.length||u>0||f&&f+d>v||!m||y||x,imagesRemaining:Math.max((0,n.Pp)(l.data)-e.usage?.numImagesInLastDay,0),canSimultaneouslyGenerate:m,timeRemaining:u,imagesPerDayLimit:(0,n.Pp)(l.data)}}},23878:function(e,t,r){"use strict";r.d(t,{CX:function(){return h},Cs:function(){return s},GT:function(){return p},HB:function(){return g},V8:function(){return f},c9:function(){return c},e_:function(){return m},rT:function(){return l}});var n=r(10443),i=r(42897),o=r(46825),a=r(88246);let s=e=>{if(!e?.prompt)return"";if(e.parent_image?.prompt)return e.parent_image.prompt;let t=u(e);if(!t)return e.prompt;if(t.remove_prompt_callback)return t.remove_prompt_callback(e.prompt);let r=`, ${t.prompt}`;return e.prompt.endsWith(r)?e.prompt.slice(0,-r.length):e.prompt},l=e=>e.sort((e,t)=>"none"===e.id?-1:"none"===t.id?1:e.is_pro&&!t.is_pro?-1:!e.is_pro&&t.is_pro?1:e.dream_booth_model&&!t.dream_booth_model?-1:!e.dream_booth_model&&t.dream_booth_model?1:0),u=e=>{for(let t of n.wz)if(t.id===e?.filter)return t;return null},c=e=>{if(!e)return null;for(let t of n.wz)if(t.id===e&&t.dream_booth_model)return t.dream_booth_model;return null};function d(e,t,r){return Math.min(Math.max(e,t),r)}function f(e){let[t,r]=e;if(isNaN(t)||isNaN(r)||t<=0||r<=0)return console.warn("Invalid dimensions passed to convertToSafeDimms",t,r),[1024,1024];let n=t/1024,i=r/1024,o=1;(n>1||i>1)&&(o=Math.max(n,i));let a=t/256,s=r/256;(a<1||s<1)&&(o=Math.min(a,s));let l=[Math.round(t/o),Math.round(r/o)];return l[0]=d(l[0],256,1024),l[1]=d(l[1],256,1024),l}function p(e){return e?i.yB[e]??"Unknown":"Regular"}function h(e){if(e.modelType===o.Hn.PLAYGROUND_V2)return o.Hn.PLAYGROUND_V2;if(e.modelType===o.Hn.PLAYGROUND_V2_5)return o.Hn.PLAYGROUND_V2_5;if(e.modelType===o.Hn.STABLE_DIFFUSION_XL)return o.Hn.STABLE_DIFFUSION_XL;if(e.modelType===o.Hn.PLAYGROUND_V3)return o.Hn.PLAYGROUND_V3;if(e.controlnet?.length&&e.controlnet_images?.some(e=>e))return o.Hn.STABLE_DIFFUSION_XL;if("photorealism"===e.filter)return o.Hn.PLAYGROUND_V2_5;let t=e.filter?(0,n.mB)(e.filter):n.$p;return t.models.includes(o.Hn.STABLE_DIFFUSION_XL)||t.models.includes(o.Hn.PLAYGROUND_V2)?t.models.includes(o.Hn.PLAYGROUND_V2)?o.Hn.PLAYGROUND_V3:o.Hn.STABLE_DIFFUSION_XL:o.Hn.STABLE_DIFFUSION}function m(e){let t=e.filter,r=t?(0,n.mB)(t):null,i=!1;if(e.controlNetOptions)for(let t=0;t<a.L5;t++){let r=e.controlNetOptions[t];r?.type&&r?.base64Image&&(i=!0)}let s=r?.refinement_disabled,l=h(e);return[i||s||l===o.Hn.PLAYGROUND_V2||l===o.Hn.PLAYGROUND_V2_5,`Unavailable with ${i?"Control Traits":s?"the selected filter":"the selected model"}`]}function g(e,t){return`${parseInt(e)+parseInt(t)}px`}},81810:function(e,t,r){"use strict";r.d(t,{OR:function(){return d},R5:function(){return s},Td:function(){return p},V6:function(){return l},ZJ:function(){return v},cp:function(){return h},op:function(){return u},rV:function(){return g},xf:function(){return m}});var n=r(11163),i=r.n(n),o=r(59820),a=r(51879);let s=()=>{let e=(0,n.useRouter)();return!e.query.slug||"/canvas/[slug]"!==e.pathname||Array.isArray(e.query.slug)?null:c(e.query.slug)};function l(e){return(e.startsWith("/canvas/")?c(e.split("?")[0]?.split("/").pop()):null)??null}function u(e){let t=s(),r=e??t;return(0,o.ZP)(r?`/api/canvas/get?id=${r}`:null,e=>fetch(e).then(e=>e.json()))}function c(e){let t=e?.split("-").pop()??null;return"files"===t?null:t}function d(e){return e?.split("-").pop()}s.get=()=>l(i().asPath);let f=(e,t)=>e.toLowerCase().substring(0,t).replace(/ /g,"-").replace(/[^\w-]+/g,""),p=e=>e.createdAt&&new Date(e.createdAt)<new Date("2023-11-30")?e.id:[f(e.title||e.prompt||"",a.g5),e.id].filter(e=>e).join("-");function h(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=r?`${window.location.protocol}//${window.location.host}`:"";return e?n+`/canvas/${f(e)}-${t}`:n+`/canvas/${t}`}function m(e){return`${f(e)}.pg`}function g(e){if(!e||!e.trim())return null;let t=e.split("-"),r="";for(let e=0;e<t.length;e++){let n=t[e];r+=n.charAt(0).toUpperCase()+n.slice(1)+" "}return r.trim()}function v(){return!!s.get()}},56888:function(e,t,r){"use strict";r.d(t,{h:function(){return a}});var n=r(67294),i=r(77690),o=r(39109);function a(){let[e,t]=(0,n.useState)(null),[r,a]=(0,n.useState)({width:0,height:0}),s=(0,n.useCallback)(()=>{a({width:e?.offsetWidth||0,height:e?.offsetHeight||0})},[e?.offsetHeight,e?.offsetWidth]);return(0,o.O)("resize",s),(0,i.L)(()=>{s()},[e?.offsetHeight,e?.offsetWidth]),[t,r]}},39109:function(e,t,r){"use strict";r.d(t,{O:function(){return o}});var n=r(67294),i=r(77690);function o(e,t,r,o){let a=(0,n.useRef)(t);(0,i.L)(()=>{a.current=t},[t]),(0,n.useEffect)(()=>{let t=r?.current??window;if(!(t&&t.addEventListener))return;let n=e=>a.current(e);return t.addEventListener(e,n,o),()=>{t.removeEventListener(e,n,o)}},[e,r,o])}},95012:function(e,t,r){"use strict";r.d(t,{V:function(){return a},z:function(){return s}});var n=r(64529),i=r(782);let o=(0,n.Ue)()((0,i.tJ)(e=>({plan:"FREE",setPlan:t=>e(e=>({...e,plan:t})),shouldForcePlan:!1,setShouldForcePlan:t=>e(e=>({...e,shouldForcePlan:t}))}),{name:"pai:force-plan-store"}));function a(){let[e,t]=o(e=>[e.plan,e.setPlan]);return[e,t]}function s(){let[e,t]=o(e=>[e.shouldForcePlan,e.setShouldForcePlan]);return[e,t]}},598:function(e,t,r){"use strict";r.d(t,{a:function(){return i}});var n=r(67294);function i(e){let[t,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let t=setTimeout(()=>{r(!0)},e);return()=>clearTimeout(t)},[e]),t}t.Z=()=>{let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t(!0)},[]),e}},77832:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(67294);function i(e,t){(0,n.useEffect)(()=>{if(!e)return;let r=r=>{r.key===e&&t()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t])}},63778:function(e,t,r){"use strict";r.d(t,{Mw:function(){return o}});var n=r(59820);function i(e){return`/api/images/image?id=${e.id}`}function o(e,t){return{...(0,n.ZP)(i(e),()=>e.id?a(e.id).then(e=>e.data):null,{revalidateIfStale:!1,revalidateOnReconnect:!1,revalidateOnFocus:!1,revalidateOnMount:!1,refreshInterval:3e5,...t}),queryKey:i(e)}}async function a(e){return fetch(`/api/images/image?id=${e}`).then(e=>e.json())}},95995:function(e,t,r){"use strict";r.d(t,{gw:function(){return s},h3:function(){return o},l:function(){return a},uo:function(){return l}});var n=r(67294),i=r(59820);function o(e){let[t,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let t=new Image;t.src=e,t.onload=()=>r(!0)},[e]),t}function a(e){async function t(e){return new Promise((t,r)=>{let n=new Image;n.src=e,n.onload=()=>t({width:n.width,height:n.height})})}return(0,i.ZP)(["image-size",e],"string"==typeof e?()=>t(e):null,{revalidateOnFocus:!0})}function s(e){let[t,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let t=new Image;t.src=e,t.onload=()=>r([t.width,t.height])},[e]),t}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[r,i]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{i(!1);let r=Date.now(),n=new Image,o=!1;return n.src=e,n.onload=()=>{let a=Date.now()-r,s={url:e,size:[n.width,n.height]};a<t?setTimeout(()=>!o&&i(s),t-a):o||i(s)},()=>{o=!0}},[t,e]),r}},44871:function(e,t,r){"use strict";r.d(t,{Y:function(){return i}});var n=r(67294);function i(e,t){let[r,i]=n.useState(!1);return n.useEffect(()=>{if(!e.current)return;let r=new IntersectionObserver(e=>{let[t]=e;i(t.isIntersecting)},t);return r.observe(e.current),()=>{r.disconnect()}},[e,t]),r}},11320:function(e,t,r){"use strict";var n=r(67294);t.Z=(e,t)=>{let[r,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(e.current&&"function"==typeof IntersectionObserver){let r=new IntersectionObserver(e=>{i(e[0])},t);return r.observe(e.current),()=>{i(null),r.disconnect()}}return()=>{}},[e.current,t.threshold,t.root,t.rootMargin]),r}},24581:function(e,t,r){"use strict";r.d(t,{s:function(){return o}});var n=r(67294),i=r(46192);function o(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t(function(){if(!window.matchMedia)return!1;if(i._1)return!0;if(i.VW||i.ED)return!1;let e=!!("ontouchstart"in window||window.DocumentTouch&&"undefined"!=typeof document&&document instanceof window.DocumentTouch)||!!("undefined"!=typeof navigator&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)),t=window.matchMedia("(pointer: coarse)").matches;return e&&t}())},[]),e}},77690:function(e,t,r){"use strict";r.d(t,{L:function(){return n}});let n=r(67294).useLayoutEffect},35362:function(e,t,r){"use strict";r.d(t,{i:function(){return i}});var n=r(67294);function i(e,t){(0,n.useEffect)(()=>{function r(r){if(t?.force){e(r);return}let n=r.target;"INPUT"===n.tagName||"TEXTAREA"===n.tagName||e(r)}return window.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",r)}},[e,t])}},17701:function(e,t,r){"use strict";r.d(t,{E:function(){return o},L:function(){return i}});var n=r(44746);let i={paid:150,free:30};function o(){return(0,n.sA)()?i.paid:i.free}},69306:function(e,t,r){"use strict";r.d(t,{OV:function(){return s},c0:function(){return i},r$:function(){return o}});var n=r(67294);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"max",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=`(${t}-width: ${e}px)`,o=r??(window.matchMedia?.(i)?.matches||!1),[a,s]=(0,n.useState)(o);return(0,n.useEffect)(()=>{if(!window.matchMedia)return;let e=window.matchMedia(i),t=e=>{e.matches!==a&&s(e.matches)},r=()=>t(e);return t(e),e.addEventListener("change",r),()=>{e.removeEventListener("change",r)}},[a,i]),a}function o(){return s("lg")}let a={"2xs":380,xs:440,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920};function s(e,t){return i(a[e]-1,"max")}},35758:function(e,t,r){"use strict";r.d(t,{J:function(){return s},X:function(){return a}});var n=r(64529),i=r(11163),o=r.n(i);let a=(0,n.Ue)(()=>!1);function s(){let e=a();return!!e&&e.includes("/canvas/")&&"/canvas/files"!==e}o().events.on("routeChangeStart",e=>{e!==a.getState()&&a.setState(e)}),o().events.on("routeChangeComplete",e=>{e===a.getState()&&a.setState(!1)})},48563:function(e,t,r){"use strict";r.d(t,{K:function(){return o}});var n=r(59820),i=r(11923);function o(){let{data:e,mutate:t}=(0,n.ZP)("/api/notifications/count",i.S);return e?.count_unread_notifications??0}},5787:function(e,t,r){"use strict";var n=r(67294);t.Z=e=>{let t=(0,n.useRef)(),r=(0,n.useRef)(!1),i=(0,n.useRef)(!1),[o,a]=(0,n.useState)(0);r.current&&(i.current=!0),(0,n.useEffect)(()=>(r.current||(t.current=e(),r.current=!0),a(e=>e+1),()=>{i.current&&t.current&&t.current()}),[])}},49296:function(e,t,r){"use strict";r.d(t,{p:function(){return i}});var n=r(67294);function i(e,t){(0,n.useEffect)(()=>{function r(r){e.current&&!e.current.contains(r.target)&&t(r)}return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[e,t])}},44746:function(e,t,r){"use strict";r.d(t,{WI:function(){return l},kM:function(){return p},pz:function(){return d},rP:function(){return c},s4:function(){return u},sA:function(){return f}});var n=r(17330),i=r(78358),o=r(33299),a=r(67294),s=r(95012);function l(){let e=(0,o.useSession)(),t=e.data?.user.subscriptions,r=(0,i.nR)(t??[]),[n]=(0,s.V)(),[a]=(0,s.z)(),l="PRO"===n;return a?l:r||l}function u(){let e=(0,o.useSession)(),t=e.data?.user.subscriptions,r=(0,i.fm)(t??[]),a=(0,n.N)(e=>e.forceTurbo),[l]=(0,s.V)(),[u]=(0,s.z)();return u?"TURBO"===l:a||r}function c(){let e=(0,o.useSession)(),t=e.data?.user.subscriptions;return(0,i.Gr)(t??[])}function d(){let e=(0,o.useSession)(),t=e.data?.user.subscriptions;return t?.some(e=>{let{term:t,product:r}=i.Ht(e.stripePriceId)||{};return"daypass"===t&&r===i.QI.PRO_DESIGN})}function f(){let e=l(),t=u(),r=c(),[n]=(0,s.V)(),[i]=(0,s.z)();return i?"FREE"!==n:e||t||r}function p(){let e=(0,o.useSession)(),t=e.data?.user.subscriptions;return(0,a.useMemo)(()=>t?.some(e=>"active"===e.revcatStatus),[t])}},97416:function(e,t,r){"use strict";r.d(t,{g:function(){return c}});var n=r(59820),i=r(1604),o=r(51879),a=r(67294),s=r(85604);async function l(){try{let t=(await r.e(9883).then(r.bind(r,39883))).default,n={origin:{y:.5}};function e(e,r){t(Object.assign({},n,r,{particleCount:Math.floor(200*e),zIndex:9999}))}e(.25,{spread:26,startVelocity:55}),e(.2,{spread:60}),e(.35,{spread:100,decay:.91,scalar:.8}),e(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),e(.1,{spread:120,startVelocity:45})}catch(e){console.error("Error loading confetti:",e)}}let u=i.z.object({streak:i.z.number(),num_images_today:i.z.number()});function c(){let{data:e,mutate:t}=(0,n.ZP)("/api/images/pairs/streak",async e=>{let t=new URL(e,window.location.origin);t.searchParams.set("time_zone",Intl.DateTimeFormat().resolvedOptions().timeZone);let r=await fetch(t).then(e=>e.json());return u.parse(r)}),r=(0,a.useCallback)(()=>{t(e=>{if(!e)return e;let t=e.num_images_today===o.Ci-1?e.streak+1:e.streak;return t>e.streak&&(l(),s.mv.success("You've earned a new streak! \uD83C\uDF89")),{streak:t,num_images_today:e.num_images_today+1}},!1)},[t]);return(0,a.useMemo)(()=>({data:e,incrementNumImagesToday:r}),[e,r])}},86245:function(e,t,r){"use strict";r.d(t,{B:function(){return a},q:function(){return s}});var n=r(67294);let[i,o]=[1024,1024];function a(e){return`https://us-central1-serious-case-360818.cloudfunctions.net/rbimx?url=${e}&width=${i}&height=${o}`}function s(e){return(0,n.useMemo)(()=>a(e),[e])}},78603:function(e,t,r){"use strict";r.d(t,{e:function(){return o}});var n=r(67294);function i(){return{width:window.innerWidth,height:window.innerHeight}}function o(){let[e,t]=(0,n.useState)(i());return(0,n.useEffect)(()=>{let e=()=>{t(i())};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),e}},81410:function(e,t,r){"use strict";r.d(t,{C:function(){return i}});var n=r(67294);function i(e){let[t,r]=n.useState("none");return n.useEffect(()=>{let t;let n=window,i=window.scrollY,o=0,a=()=>{let n=window.scrollY;clearTimeout(t),t=setTimeout(()=>{i=n},150),window.requestAnimationFrame(()=>{let t="down"==(n>o?"down":"up")?e?.scrollDownDelta:e?.scrollUpDelta;Math.abs(n-i)>=(t||0)&&(n>o?r("down"):n<o&&r("up"),o=n)})};return n.addEventListener("scroll",a),()=>{n.removeEventListener("scroll",a),clearTimeout(t)}},[e?.scrollDownDelta,e?.scrollUpDelta]),t}},74371:function(e,t,r){"use strict";let n=(0,r(64529).Ue)(e=>({showSidebars:!1,setShowSidebars:t=>e({showSidebars:t})}));t.Z=n},45563:function(e,t,r){"use strict";r.d(t,{pV:function(){return d},rX:function(){return c},zq:function(){return u}});var n=r(85893),i=r(33299),o=r(11163),a=r(67294),s=r(33268),l=r(92323);let u=()=>{let e=(0,i.useSession)(),t=(0,o.useRouter)(),{setModalContent:r}=(0,l.d)();return(0,a.useCallback)(function(){let i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];"loading"!==e.status&&"/login"!==t.asPath&&r((0,n.jsx)(s.f,{redirectTo:i?t.asPath:"/create"}),{useBlurredBackground:!0,transitionModal:!0})},[e.status,t,r])};function c(e){let t=(0,i.useSession)(),r=(0,o.useRouter)(),{setModalContent:u}=(0,l.d)();return(0,a.useCallback)(()=>{if("loading"===t.status)return;let i=e??"/create";if("authenticated"===t.status){r.push(i);return}"/login"!==r.asPath&&u((0,n.jsx)(s.f,{redirectTo:i}),{useBlurredBackground:!0,transitionModal:!0})},[t.status,r,u,e])}function d(){let e=(0,i.useSession)(),t=(0,o.useRouter)(),r=(0,a.useRef)(!1);return"loading"!==e.status&&("unauthenticated"!==e.status||(r.current||(r.current=!0,t.push(`/login?redirect=${t.asPath}`)),!1))}},73751:function(e,t,r){"use strict";r.d(t,{n:function(){return c}});var n=r(85893),i=r(28456),o=r(92323),a=r(41664),s=r.n(a);function l(e){let{header:t,body:r}=e,{closeModal:a}=(0,o.d)();return(0,n.jsxs)(i.Z,{onSubmit:e=>{e.preventDefault(),a()},children:[(0,n.jsx)(i.Z.Header,{children:(0,n.jsx)(i.Z.HeaderTitle,{children:t})}),(0,n.jsx)(i.Z.Body,{children:r}),(0,n.jsxs)(i.Z.Footer,{children:[(0,n.jsx)(i.Z.Cancel,{onClick:a}),(0,n.jsx)(s(),{href:"/pricing",onClick:()=>{setTimeout(()=>{a()},100)},className:"bg-purple-primary1 hover:bg-purple-hover active:bg-purple-primary1 transition-all rounded-md py-2 px-6 font-semibold text-white text-sm block text-center",children:"Upgrade"})]})]})}var u=r(67294);function c(e,t){let{setModalContent:r}=(0,o.d)();return(0,u.useCallback)(()=>r((0,n.jsx)(l,{header:e,body:t}),{transitionModal:!0,showCloseButton:!1}),[r,e,t])}},158:function(e,t,r){"use strict";r.d(t,{H:function(){return a},d:function(){return s}});var n=r(59820),i=r(86076),o=r(33299);function a(){return(0,n.ZP)("/api/user/usage",async e=>fetch(e).then(async e=>await e.json()),{refreshInterval:3e5,fallbackData:{numImagesInLastDay:0,upscalesThisMonth:0,creativeUpscalesThisMonth:0,faceRestorationsThisMonth:0,photorealismGensThisMonth:0}})}function s(){let e=a()?.data,t=(0,o.useSession)();return e?(0,i._N)("photorealismGensPerMonthLimit",t.data)-e.photorealismGensThisMonth:0}},38372:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(33299);function i(){let e=(0,n.useSession)();return e.data?.user.db}},82231:function(e,t,r){"use strict";function n(e){let t=e;for(let r of[",",";",":"])if(e.includes(r)){let n=e.split(r);n.length>1&&(t=n[0].trim());break}return t.length>60?t=t.substring(0,60)+"...":e.length<25&&(t=e),t=t.charAt(0).toUpperCase()+t.slice(1)}r.d(t,{G:function(){return n}})},47435:function(e,t,r){"use strict";r.d(t,{JO:function(){return a},Kk:function(){return p},LK:function(){return l},Wv:function(){return h},YO:function(){return g},d4:function(){return u},e5:function(){return c},gu:function(){return m},mm:function(){return s},sq:function(){return f},vn:function(){return d}});var n=r(76770),i=r.n(n),o=r(82449);let a=e=>e+32&-64,s=e=>e+16&-32,l=e=>8*Math.floor(e/8),u=e=>new Promise((t,r)=>{let n=new XMLHttpRequest;n.onload=function(){let e=new FileReader;e.onloadend=function(){e.result?t(e.result.toString()):t("")},e.readAsDataURL(n.response)},n.open("GET",e),n.responseType="blob",n.send()}),c=e=>((0,o.assert)(e.startsWith("data:image/png;base64,"),"[base64ToUrl]: Invalid base64, cannot be used as image src"),fetch(e).then(e=>e.blob()).then(e=>URL.createObjectURL(e)));async function d(e){let t=new Image;return t.src=e,await t.decode(),[t.width,t.height]}let f=e=>new Promise(t=>{i().imageFileResizer(e,1024,1024,"PNG",100,0,e=>{t(e)},"base64")});async function p(e){return await new Promise((t,r)=>{let n=new FileReader;n.onload=e=>{t(e.target?.result)},n.onerror=e=>{r(e)},n.readAsDataURL(e)})}let h=async e=>new Promise((t,r)=>{let n=new Image;n.onload=()=>t(n),n.onerror=()=>r(),n.src=e}),m=async(e,t,r)=>{let n=await h(e),i=document.createElement("canvas"),o=i.getContext("2d");if(i.width=t,i.height=r,!o)throw Error("Could not get canvas context");return o.drawImage(n,0,0,t,r),i.toDataURL("image/png")},g=async function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=await h(e);if(n&&i.width<=t&&i.height<=r)return e;let o=document.createElement("canvas"),a=Math.min(t/i.width,r/i.height);o.width=i.width*a,o.height=i.height*a;let s=o.getContext("2d");if(!s)throw Error("Could not get canvas context");return s.drawImage(i,0,0,o.width,o.height),o.toDataURL("image/png")}},58309:function(e,t,r){"use strict";async function n(e){if("undefined"==typeof document)return!1;let t=await r.e(2812).then(r.bind(r,99382));if(e instanceof File){let t=e.name.split(".").pop()?.toLowerCase();if("jpg"!==t&&"jpeg"!==t&&"png"!==t)return!1}let n=await t.parse(e);return n?.pg==="1"||n?.Software==="pg"}r.d(t,{N:function(){return n}})},66144:function(e,t,r){"use strict";r.d(t,{Wg:function(){return a},ao:function(){return i},gO:function(){return n},xR:function(){return o}});let n=async(e,t)=>{let r=new URL("/api/images/image",window.location.origin);r.searchParams.append("id",e),await fetch(r.toString(),{method:"PATCH",body:JSON.stringify(t)})},i=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return fetch(`/api/admin/image?id=${e}&action=hide`,{method:"POST",body:JSON.stringify({reason:"Quick-hide"})});let r=new URL("/api/images/image",window.location.origin);r.searchParams.append("id",e),await fetch(r.toString(),{method:"DELETE"})},o=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Promise.all(e.map(e=>i(e,t)))},a=async(e,t)=>Promise.all(e.map(e=>n(e,{private:t})))},77428:function(e,t,r){"use strict";r.d(t,{j:function(){return i},s:function(){return o}});var n=r(85893);r(67294);let i={animals:{name:"Animals",id:"animals",matches:[{category:"animals",similarity_threshold:.21}],icon:(0,n.jsx)(function(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M12 14V16.25M12 16.25C10 16.25 8.75 14.75 8.75 14.75M12 16.25C14 16.25 15.25 14.75 15.25 14.75M5.65249 9.26243L4.75 4.75L8.92438 6.41975C9.85807 6.01301 10.9004 5.78571 12 5.78571C13.0996 5.78571 14.1419 6.01301 15.0756 6.41975L19.25 4.75L18.3475 9.26243C18.9226 10.2272 19.25 11.337 19.25 12.5179C19.25 16.2359 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.2359 4.75 12.5179C4.75 11.337 5.07739 10.2272 5.65249 9.26243Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10.5 11C10.5 11.2761 10.2761 11.5 10 11.5C9.72386 11.5 9.5 11.2761 9.5 11C9.5 10.7239 9.72386 10.5 10 10.5C10.2761 10.5 10.5 10.7239 10.5 11Z",stroke:"currentColor",strokeWidth:"0.9",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14.5 11C14.5 11.2761 14.2761 11.5 14 11.5C13.7239 11.5 13.5 11.2761 13.5 11C13.5 10.7239 13.7239 10.5 14 10.5C14.2761 10.5 14.5 10.7239 14.5 11Z",stroke:"currentColor",strokeWidth:"0.9",strokeLinecap:"round",strokeLinejoin:"round"})]})},{}),url:"/c/animals"},anime:{name:"Anime",id:"anime",matches:[{category:"anime",similarity_threshold:.2}],negative_matches:[{category:"threedrender",similarity_threshold:.19}],icon:(0,n.jsx)(function(){return(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M8.75 9.75H10.25M13.75 9.75H15.25M19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12ZM8.75 12.75C8.75 12.75 9 16.25 12 16.25C15 16.25 15.25 12.75 15.25 12.75H8.75Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),url:"/c/anime"},fashion:{name:"Fashion",id:"fashion",matches:[{category:"fashion",similarity_threshold:.18}],negative_matches:[{category:"animals",similarity_threshold:.18}],icon:(0,n.jsx)(function(){return(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M8.25 10.939L12.704 17.795C12.7948 17.9348 12.9192 18.0496 13.0657 18.1291C13.2122 18.2085 13.3763 18.2501 13.543 18.25H19.25V16.683C19.25 14.953 17.901 13.55 16.244 13.55C14.974 13.55 13.784 12.921 13.034 11.87C12.889 11.667 12.747 11.46 12.583 11.273L9.25 7.45601L6.197 5.86201C5.532 5.51401 4.75 6.01901 4.75 6.79601V10.939M8.25 10.939H4.75M8.25 10.939V17.206C8.25 17.782 7.802 18.25 7.25 18.25H6.617C6.12 18.25 5.697 17.868 5.627 17.353L4.75 10.939",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),url:"/c/fashion"},food:{name:"Food",id:"food",matches:[{category:"food",similarity_threshold:.19}],negative_matches:[{category:"boobs",similarity_threshold:.16},{category:"nudity",similarity_threshold:.16}],icon:(0,n.jsx)(function(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M18.6648 14.572L5.565 17.9569L10.3007 5.28269",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M11.2874 13.477C11.4926 13.2922 11.8088 13.3088 11.9935 13.514C12.1783 13.7192 12.1617 14.0354 11.9565 14.2201C11.7514 14.4049 11.4351 14.3883 11.2504 14.1831C11.0656 13.9779 11.0822 13.6617 11.2874 13.477Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10.7659 9.91057C10.9711 9.72582 11.2873 9.7424 11.4721 9.94758C11.6568 10.1528 11.6402 10.469 11.435 10.6537C11.2299 10.8385 10.9137 10.8219 10.7289 10.6167C10.5442 10.4115 10.5607 10.0953 10.7659 9.91057Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10.3009 5.281C15.2439 5.54005 18.9241 9.62735 18.665 14.5703",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.83297 7.45573C14.0736 7.60681 16.7501 10.5794 16.457 14.8125",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})},{}),url:"/c/food"},landscapes:{name:"Landscapes",id:"landscapes",matches:[{category:"landscapes",similarity_threshold:.2}],negative_matches:[{category:"boobs",similarity_threshold:.2}],icon:(0,n.jsx)(function(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M13.25 19.2515H4.75L7.14611 13.3317C7.8205 11.6655 10.1795 11.6655 10.8539 13.3317L13.25 19.2515Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.75 19.25H19.25L13 4.75L9.5 12",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})},{}),url:"/c/landscapes"},scifi:{name:"Sci-Fi",id:"scifi",matches:[{category:"scifi",similarity_threshold:.21}],negative_matches:[{category:"boobs",similarity_threshold:.2}],icon:(0,n.jsx)(function(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M8.75 15.75L6.75 19.25",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M15.25 15.75L17.25 19.25",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M15.25 8.75H8.75C7.09315 8.75 5.75 10.0931 5.75 11.75V12.25H18.25V11.75C18.25 10.0931 16.9069 8.75 15.25 8.75Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.75 8.75C7.75 6.40279 9.65279 4.75 12 4.75C14.3472 4.75 16.25 6.40279 16.25 8.75",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})},{}),url:"/c/scifi"},vehicles:{name:"Vehicles",id:"vehicles",matches:[{category:"vehicles",similarity_threshold:.175}],negative_matches:[{category:"landscapes",similarity_threshold:.2},{category:"animals",similarity_threshold:.18},{category:"boobs",similarity_threshold:.2}],icon:(0,n.jsx)(function(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M18.2502 17.25H5.75C5.19772 17.25 4.75 16.8023 4.75 16.25V12.75C4.75 11.6454 5.64543 10.75 6.75 10.75H17.2502C18.3548 10.75 19.2502 11.6454 19.2502 12.75V16.25C19.2502 16.8023 18.8025 17.25 18.2502 17.25Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8.5 14C8.5 14.2761 8.27614 14.5 8 14.5C7.72386 14.5 7.5 14.2761 7.5 14C7.5 13.7239 7.72386 13.5 8 13.5C8.27614 13.5 8.5 13.7239 8.5 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M16.5 14C16.5 14.2761 16.2761 14.5 16 14.5C15.7239 14.5 15.5 14.2761 15.5 14C15.5 13.7239 15.7239 13.5 16 13.5C16.2761 13.5 16.5 13.7239 16.5 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M18.2502 10.75H5.75L6.47147 6.4212C6.6322 5.45683 7.46657 4.75 8.44425 4.75H15.556C16.5337 4.75 17.368 5.45683 17.5288 6.4212L18.2502 10.75Z",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.75 17.75V19.25",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M17.25 17.75V19.25",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})},{}),url:"/c/vehicles"}},o=e=>e&&Object.keys(i).includes(e)?e:null},26440:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(46192);function i(e){return n.ED?e.ctrlKey:(n.eE,e.metaKey)}},37914:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});let n=e=>{let t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let n=0;n<e;n+=1)t+=r.charAt(Math.floor(Math.random()*r.length));return t}},89565:function(e,t,r){"use strict";r.d(t,{Ek:function(){return o},ws:function(){return a}});var n=r(10443),i=r(46825);let o=e=>[...n.q3,i.Hn.PLAYGROUND_V3,"default"].includes(e),a=e=>{let{modelType:t,filter:r}=e;return t!==i.Hn.STABLE_DIFFUSION_2&&"photorealism"!==r&&[i.Hn.STABLE_DIFFUSION,i.Hn.PLAYGROUND_V1,i.Hn.STABLE_DIFFUSION_XL,"default"].includes(t)}},37646:function(e,t,r){"use strict";r.d(t,{d:function(){return n}});let n={didClickStartDesignHomePage:!1,didHaveNoTour:!1}},46192:function(e,t,r){"use strict";r.d(t,{ED:function(){return n},G6:function(){return o},VW:function(){return a},_1:function(){return s},eE:function(){return i}});let n=window.navigator.userAgent.includes("Windows"),i=window.navigator.userAgent.includes("Macintosh"),o=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"),a=function(){let e=navigator.userAgent.indexOf("Windows")>-1;if(!e)return!1;let t=navigator.maxTouchPoints||navigator.msMaxTouchPoints,r="ontouchstart"in window||t>0||window.matchMedia&&matchMedia("(any-pointer: coarse)").matches;return e&&r}(),s=/Macintosh/i.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>1},11255:function(e,t,r){"use strict";r.d(t,{t:function(){return g}});var n=r(85893),i=r(59820),o=r(1604),a=r(51879);function s(){return(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M4.3125 3.5625H13.6875M5.0625 3.5625H12.9375V4.5C12.9375 6.67462 11.1746 8.4375 9 8.4375C6.82538 8.4375 5.0625 6.67462 5.0625 4.5V3.5625Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.75 7.5H11.25",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M4.3125 14.4375H13.6875M5.0625 14.4375H12.9375V13.125C12.9375 10.9504 11.1746 9.1875 9 9.1875C6.82538 9.1875 5.0625 10.9504 5.0625 13.125V14.4375Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}var l=r(8891),u=r.n(l),c=r(85604),d=r(41664),f=r.n(d),p=r(67294);function h(e){let t=e();return(0,i.ZP)(t,async e=>{let t=new URL("/api/models/v2/metrics/queue",window.location.origin);t.searchParams.set("apiType",e);let r=await fetch(t.toString());return o.z.object({queueTime:o.z.number(),priorityLevel:o.z.string()}).parse(await r.json())},{refreshInterval:8e3})}function m(e){return(0,p.useMemo)(()=>({isBlocked:(e.data?.queueTime??0)>a.Kk,priorityLevel:e.data?.priorityLevel??null}),[e.data?.priorityLevel,e.data?.queueTime])}class g{static #e=this.useBlockGenerationDueToHighQueueTime=m;static #t=this.useEstimatedQueueTime=h;static notifyUserThatGenerationWasBlockedDueToLongQueue(e){let{withToast:t=!0,priorityLevel:r,isPaidPlan:i}=e;u().track("Queue time too high notice shown",{priorityLevel:r,isPaidPlan:i}),t&&c.mv.info({header:"Your queue time is too high",body:(0,n.jsxs)("p",{className:"text-gray-25 text-[13px] flex-grow",children:["Your queue position is based on the number of images created and demand is high right now. Please try again later"," ",!i&&(0,n.jsxs)(n.Fragment,{children:["or"," ",(0,n.jsx)(f(),{href:"/pricing",className:"font-semibold text-purple-primary",target:"_blank",children:"Upgrade →"})]})]}),icon:(0,n.jsx)("span",{className:"text-purple-primary translate-y-px",children:(0,n.jsx)(s,{})})})}}},86076:function(e,t,r){"use strict";r.d(t,{Pp:function(){return u},_N:function(){return c}});var n=r(78358),i=r(51879),o=r(1604);let a=o.z.string().regex(/^[a-z0-9-]+$/,{message:"ID must be a valid slug, e.g 'feature-flag-key'."}),s=o.z.enum(["internal","beta-vip","beta","ga"]);o.z.object({id:a,access:s,disabled:o.z.boolean().default(!1),description:o.z.string().min(1,{message:"Description must be at least 1 characters long."}).max(1e3,{message:"Description must be at most 1000 characters long."}),updatedAt:o.z.date().default(()=>new Date),createdAt:o.z.date().default(()=>new Date),isFromDB:o.z.boolean().default(!0)}).omit({isFromDB:!0}),o.z.object({id:a,access:s,disabled:o.z.boolean()}),r(19856);let l={"joao.souza@playgroundai.com":1e4};function u(e){return function(e,t){if(e&&e.user.email in l)return l[e.user.email];let r=i.Sq.FREE[t];if(!e)return r;(0,n.nR)(e.user.subscriptions||[])?r=i.Sq.PRO[t]:(0,n.fm)(e.user.subscriptions||[])?r=i.Sq.TURBO[t]:(0,n.Gr)(e.user.subscriptions||[])&&(r=i.Sq.PRO_DESIGN[t]);let o=e.user.subscriptions?.map(e=>e.stripePriceId);for(let e of Object.values(n.QI).flatMap(e=>e.prices).filter(e=>o?.includes(e.priceId))){let n=e[t];n&&(r=n)}return r}(e,"imagesPerDayLimit")}function c(e,t){let r=(0,n.nR)(t?.user.subscriptions||[]),o=(0,n.fm)(t?.user.subscriptions||[]),a=(0,n.Gr)(t?.user.subscriptions||[]);if(a&&(r||o)){let t=o?i.Sq.TURBO[e]:i.Sq.PRO[e];return Math.max(i.Sq.PRO_DESIGN[e],t)}return o?i.Sq.TURBO[e]:r?i.Sq.PRO[e]:a?i.Sq.PRO_DESIGN[e]:i.Sq.FREE[e]}},59345:function(e,t,r){"use strict";r.d(t,{U:function(){return n}});let n=()=>{let e=new Event("visibilitychange");document.dispatchEvent(e)}},22543:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});let n={search:!0,rateImages:!0,communityFeed:!1,notifications:!0,create:!0};class i{static #e=this.Routes={"/":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!1,headerConfig:n},"/create":{disableTitle:!0,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:{search:!1,rateImages:!0,communityFeed:!0,notifications:!0,create:!1}},"/profile":{disableTitle:!0,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/profile/[id]":{disableTitle:!0,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/profile/likes/[id]":{disableTitle:!0,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/feed":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/search":{disableTitle:!0,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:{...n,notifications:!1}},"/pure-prompt":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/daily-theme":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/my-feed":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/playground-v2":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/playground-v2.5":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/playground-v3":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/c/[categoryId]":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/post/[postId]":{disableTitle:!1,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n},"/notifications":{disableTitle:!0,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:{...n,notifications:!1,rateImages:!1}},"/pricing":{disableTitle:!0,useAppLayoutLoggedIn:!0,useAppLayoutLoggedOut:!0,headerConfig:n}};static findRoute(e){for(let t of Object.keys(this.Routes))if(this.arePathsEqual(t,e))return{...this.Routes[t],id:t};return{id:"route-not-found",disableTitle:!1,useAppLayoutLoggedIn:!1,useAppLayoutLoggedOut:!1,headerConfig:n}}static arePathsEqual(e,t){let r=e.split("/"),n=t.split("/");if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){if(r[e].startsWith("[")&&r[e].endsWith("]"))continue;let t=n[e].split("?")[0].split("#")[0];if(r[e]!==t)return!1}return!0}}},83307:function(e,t,r){"use strict";r.d(t,{Zk:function(){return s},hK:function(){return u},mf:function(){return l},pB:function(){return p},wH:function(){return f}});var n=r(1604);let i=n.z.object({images:n.z.array(n.z.object({key:n.z.string().default("0").optional(),prompt:n.z.string().optional(),url:n.z.string().startsWith("http"),nsfw:n.z.boolean().optional(),width:n.z.number().optional(),height:n.z.number().optional(),top:n.z.number().optional(),left:n.z.number().optional(),dbId:n.z.string().optional()}))}),o=n.z.enum(["SAFETY_FILTER","SAFETY_FILTER_MULTI","RATE_LIMITED","NON_PRO_STEP_RATE_LIMIT","NON_PAID_PRIVATIZE_NOT_ALLOWED","NOT_AUTHORIZED","BAD_REQUEST_DATA","MULTIPLE_ACCOUNTS","RESULT_TOO_LARGE","CLUSTER_OVERLOADED","GATEWAY_TIMEOUT","UNKNOWN_ERROR","UPSCALE_LIMIT_EXCEEDED","FACE_RESTORE_LIMIT_EXCEEDED","EXPAND_PROMPT_LIMIT_EXCEEDED","EXPAND_PROMPT_ERROR","NON_PRO_SCHEDULER_NOT_ALLOWED","GENERATION_CANCELLED","SAFETY_FILTER_PROMPT","SAFETY_FILTER_IMAGE","DIMENSIONS_TOO_LARGE","UNSUPPORTED_MODEL","CREATIVE_UPSCALE_LIMIT_EXCEEDED","CAPTIONER_LIMIT_EXCEEDED","FACE_TO_FACE_LIMIT_EXCEEDED","NO_FACE_DETECTED","SAFETY_FILTER_RATE_LIMITED","INCOMPATIBLE_IMAGE_DIMS"]),a=n.z.enum(["EDIT_ERROR","EDIT_IMAGE_TOO_LARGE","UPSCALE_IMAGE_TOO_LARGE","SIMULTANEOUS_GENS_DISABLED"]),s=o.or(a),l=new Set(["RATE_LIMITED","MULTIPLE_ACCOUNTS","NON_PRO_STEP_RATE_LIMIT","NON_PRO_SCHEDULER_NOT_ALLOWED","EXPAND_PROMPT_LIMIT_EXCEEDED","NON_PAID_PRIVATIZE_NOT_ALLOWED","GATEWAY_TIMEOUT","CREATIVE_UPSCALE_LIMIT_EXCEEDED","CAPTIONER_LIMIT_EXCEEDED","FACE_TO_FACE_LIMIT_EXCEEDED"]),u=new Set(["SAFETY_FILTER","SAFETY_FILTER_MULTI","SAFETY_FILTER_PROMPT","SAFETY_FILTER_IMAGE"]),c=n.z.object({inferenceTimeMs:n.z.number().optional(),numImagesInLast24Hours:n.z.number().optional(),numEditsInLast24Hours:n.z.number().optional(),editId:n.z.string().optional()}).optional(),d={errorMessage:n.z.string().optional().nullable(),errorTitle:n.z.string().optional(),errorCode:s.optional(),meta:n.z.never().optional()},f=n.z.object(d),p=i.extend({...d,warningMessage:n.z.string().optional(),warningCode:n.z.string().optional(),meta:c}).or(n.z.object(d))},42897:function(e,t,r){"use strict";r.d(t,{W3:function(){return a},n:function(){return f},ww:function(){return p},yB:function(){return o}});var n,i,o,a,s=r(46825),l=r(1604),u=r(14892),c=r(46302),d=r(51879);let f=e=>t=>t-t%e,p=l.z.enum([s.Hn.STABLE_DIFFUSION,s.Hn.PLAYGROUND_V1,s.Hn.STABLE_DIFFUSION_XL,s.Hn.PLAYGROUND_V2,s.Hn.PLAYGROUND_V2_5,s.Hn.PLAYGROUND_V3]),h=l.z.object({schema:l.z.literal("image_gen"),statusUUID:l.z.string().optional(),prompt:l.z.string().max(d.cK),original_prompt:l.z.string().optional(),...u.k,guidance_scale:l.z.number(),width:l.z.number().transform(f(8)),height:l.z.number().transform(f(8)),seed:l.z.number(),steps:l.z.number(),high_noise_frac:l.z.number().default(1),filter_id:l.z.string(),num_images:l.z.number().int().min(1).max(4).default(1),hide:l.z.boolean().optional().default(!0).catch(!0),private:l.z.boolean().optional().default(!1).catch(!1),modelType:p,scheduler:c.O7}),m=h.extend({schema:l.z.literal("controlnet"),controlnet:l.z.array(l.z.string()),controlnet_conditioning_scale:l.z.array(l.z.number()),controlnet_images:l.z.array(l.z.string()),generate_from_draft:l.z.boolean().optional(),preprocessor_settings:l.z.array(l.z.object({high_threshold:l.z.number().optional(),low_threshold:l.z.number().optional()})),start_schedule:l.z.number().optional()});(n=o||(o={}))[n.Image=0]="Image",n[n.Instruct=1]="Instruct",n[n.Outpaint=2]="Outpaint",n[n.GenUpscale=3]="GenUpscale",n[n.Upscale=4]="Upscale",(i=a||(a={})).OBJECT_ERASER="Object Eraser",i.DRAW_TO_EDIT="Draw to edit",i.INSTRUCT_TO_EDIT="Instruct",i.REMOVE_BACKGROUND="Background removal",i.MASKED_INPAINT="Masked inpaint";let g=h.extend({schema:l.z.literal("init_image"),init_image:l.z.string().startsWith("data:image/").optional(),start_schedule:l.z.number().optional(),init_image_dimms:l.z.object({width:l.z.number(),height:l.z.number()}),mode:l.z.nativeEnum(o)}),v=g.omit({init_image:!0}).extend({schema:l.z.literal("instruct_p2p"),edit_tool:l.z.literal("Instruct"),edit_image:l.z.string().startsWith("data:image/"),mask_image:l.z.string().startsWith("data:image/"),mode:l.z.literal(1),used_bitmap_mask:l.z.boolean().optional()}),y=g.extend({schema:l.z.literal("outpaint"),mask_image:l.z.string().startsWith("data:image/").optional(),pencil_image:l.z.string().startsWith("data:image/").optional(),pencil_strokes:l.z.array(l.z.any()).optional(),pencil_renderer:l.z.string().optional(),edit_tool:l.z.nativeEnum(a).optional(),outpaint_options:l.z.object({area:l.z.object({x:l.z.number(),y:l.z.number(),width:l.z.number().transform(f(8)),height:l.z.number().transform(f(8))}),blend_area_size:l.z.number().optional()}).optional(),mode:l.z.literal(2),used_bitmap_mask:l.z.boolean().optional(),small_mask_fix:l.z.boolean().optional()});y.extend({edit_tool:l.z.literal("Draw to edit"),pencil_image:l.z.string().startsWith("data:image/"),pencil_strokes:l.z.array(l.z.any()).optional(),pencil_renderer:l.z.string().optional()});let x=l.z.object({schema:l.z.literal("clean"),edit_tool:l.z.literal("Object Eraser"),init_image:l.z.string().startsWith("data:image/"),mask_image:l.z.string().startsWith("data:image/"),inpaint_options:l.z.object({prompt:l.z.string(),strength:l.z.number(),steps:l.z.number()}).optional(),used_bitmap_mask:l.z.boolean().optional()}),b=l.z.object({schema:l.z.literal("background_removal"),edit_tool:l.z.literal("Background removal"),image:l.z.string().startsWith("data:image/"),skip_cropping:l.z.boolean().optional(),model:l.z.enum(["isnet","bria"]).optional(),remove_island_threshold:l.z.number().optional(),correct_high_threshold:l.z.number().optional(),correct_low_threshold:l.z.number().optional(),correct_colors:l.z.boolean().optional()}),w=l.z.discriminatedUnion("schema",[y,g,m,h,v]);l.z.discriminatedUnion("schema",[x,b]),l.z.union([w,x,b]),l.z.object({images:l.z.array(l.z.string()),nsfw_content_detected:l.z.array(l.z.boolean()).nullable()}).transform(e=>{let t=null===e.nsfw_content_detected?Array(e.images.length).fill(!1):e.nsfw_content_detected;return{images:e.images.map((e,r)=>t[r]?null:e),nsfw_content_detected:t}}),l.z.object({image:l.z.string(),nsfw:l.z.boolean()}),l.z.object({image:l.z.string(),width:l.z.number().optional(),height:l.z.number().optional(),top:l.z.number().optional(),left:l.z.number().optional()})},14892:function(e,t,r){"use strict";r.d(t,{k:function(){return s},x:function(){return i}});var n,i,o=r(1604),a=r(51879);(n=i||(i={})).Custom="custom",n.Embedding="embedding",n.None="none";let s={negativePromptType:o.z.nativeEnum(i).default("custom"),negativePrompt:o.z.string().max(a.cK).optional().default("")}},2733:function(e,t,r){"use strict";function n(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}r.d(t,{O:function(){return i},x:function(){return n}});let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;return e&&e.length>t?e.slice(0,t).trimEnd()+"...":e}},57718:function(e,t,r){"use strict";r.d(t,{T:function(){return n},b:function(){return i}});let n=()=>{let e=window.navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),r=!!e.match(/WebKit/i);return t&&r},i=e=>!!window.matchMedia&&window.matchMedia(e).matches},14603:function(e){e.exports={Modal:"Modal_Modal__Ottqc",Secondary:"Modal_Secondary__SoySJ",Primary:"Modal_Primary__4z9RT"}},26863:function(e){e.exports={InnerToast:"Toast_InnerToast__ALrpU",ToastsScrollContainer:"Toast_ToastsScrollContainer__fbll4"}},6809:function(e){e.exports={MenubarRoot:"DropdownMenu_MenubarRoot__SyZs_",MenubarTrigger:"DropdownMenu_MenubarTrigger__oxeCt",animate:"DropdownMenu_animate__7GVda",Content:"DropdownMenu_Content__JbXpr",Item:"DropdownMenu_Item__fDMDG",RedHighlight:"DropdownMenu_RedHighlight__9_Mwn",RightSlot:"DropdownMenu_RightSlot__X4ueG",SubTrigger:"DropdownMenu_SubTrigger____Q_p",ItemIndicator:"DropdownMenu_ItemIndicator__kYzow",Separator:"DropdownMenu_Separator__0di_o"}},41301:function(e){e.exports={DeleteButton:"DeleteCanvas_DeleteButton__6ok_T"}},84460:function(e){e.exports={"join-banner":"ImagePage_join-banner__LtbVT",closed:"ImagePage_closed__3QZ42"}},54451:function(e){e.exports={"playground-overflow-button":"ImagePost_playground-overflow-button__ikmfB",danger:"ImagePost_danger__E9L1o",Item:"ImagePost_Item__qURbH DropdownMenu_Item__fDMDG",Content:"ImagePost_Content__hZtC_ DropdownMenu_Content__JbXpr"}},34670:function(e){e.exports={TopBarButton:"Autoranker2_TopBarButton__VQz7j",ImageOptionInternal:"Autoranker2_ImageOptionInternal__ouYFk",Tutorial:"Autoranker2_Tutorial__ACKva",StreakContainer:"Autoranker2_StreakContainer__GD_8E","icon-container":"Autoranker2_icon-container__w0HZd"}},96365:function(e){e.exports={Comparison:"Comparison_Comparison__hCMO9",ImageWrapper:"Comparison_ImageWrapper__YCEC_",Slider:"Comparison_Slider__ktnRj",Line:"Comparison_Line__eo14z"}},56496:function(e){e.exports={TooltipContent:"ProTooltip_TooltipContent__6JDhu",slideDownAndFade:"ProTooltip_slideDownAndFade__NCuER",slideLeftAndFade:"ProTooltip_slideLeftAndFade__WddkN",slideUpAndFade:"ProTooltip_slideUpAndFade___fCAo",slideRightAndFade:"ProTooltip_slideRightAndFade__0gfie",TooltipArrow:"ProTooltip_TooltipArrow__yhHUH"}},19454:function(e){e.exports={Container:"Slider_Container__cioye",SliderMark:"Slider_SliderMark__fGWOK"}},45789:function(e){e.exports={"directional-arrow":"TipsGallery_directional-arrow__GTXRw","tip-body":"TipsGallery_tip-body__Zrbz4",blocky:"TipsGallery_blocky___qeu1",small:"TipsGallery_small__X4i7I"}},84521:function(e){e.exports={Warning:"Img2imgFaceWarning_Warning__PxcGg"}},94055:function(e){e.exports={Tag:"Badge_Tag__fKco3",Pro:"Badge_Pro__Rvupo",Turbo:"Badge_Turbo__0sUWi"}},18534:function(e){e.exports={Parent:"Notifications_Parent__2lL_S",FlashingDots:"Notifications_FlashingDots__3Axvp","dot-flashing":"Notifications_dot-flashing__2c4s1"}},38858:function(e){e.exports={AnimatedTile:"DesignCategory_AnimatedTile__zJZ2k",scrolling:"DesignCategory_scrolling__FD5si"}},85903:function(e){e.exports={DropdownMenu:"DesignDropdownMenu_DropdownMenu__dYKDm"}},96269:function(e){e.exports={DesignGridSurveyItem:"DesignGridSurveyItem_DesignGridSurveyItem__QWF4c",isIntersecting:"DesignGridSurveyItem_isIntersecting__xnAur"}},34986:function(e){e.exports={fadeIn:"DesignTutorial_fadeIn__75RED",hidden:"DesignTutorial_hidden__bbbd6",HideShortScreens:"DesignTutorial_HideShortScreens__1OByE",GlowyShadow:"DesignTutorial_GlowyShadow__VG_LR",steam:"DesignTutorial_steam__0iYyC",pulse:"DesignTutorial_pulse__KcWnI"}},67251:function(e){e.exports={gradient:"UpgradeToProDialog_gradient__nCRYj"}},55799:function(e){e.exports={image:"Image_image__BTlWQ",image__overlay:"Image_image__overlay__kKUjB",image__overlay_description:"Image_image__overlay_description__ACOam",select__overlay:"Image_select__overlay__T3NIY"}},53778:function(e){e.exports={button:"InputTitle_button__r1LmK",form:"InputTitle_form__Kcpbm",label:"InputTitle_label___VJLc",title:"InputTitle_title__tc7AB",errorText:"InputTitle_errorText__6JlMs","button-block":"InputTitle_button-block__kOS1_"}},39366:function(){},30299:function(e){e.exports={style:{fontFamily:"'__Inter_d65c78', '__Inter_Fallback_d65c78'",fontStyle:"normal"},className:"__className_d65c78"}},5152:function(e,t,r){e.exports=r(19606)},9008:function(e,t,r){e.exports=r(37219)},25675:function(e,t,r){e.exports=r(7e4)},41664:function(e,t,r){e.exports=r(24116)},39332:function(e,t,r){e.exports=r(29108)},11163:function(e,t,r){e.exports=r(26036)},4298:function(e,t,r){e.exports=r(90069)},34155:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l=[],u=!1,c=-1;function d(){u&&n&&(u=!1,n.length?l=n.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(n=l,l=[];++c<t;)n&&n[c].run();c=-1,t=l.length}n=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new p(e,t)),1!==l.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},92703:function(e,t,r){"use strict";var n=r(50414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},45697:function(e,t,r){e.exports=r(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},85518:function(e,t,r){"use strict";var n,i,o,a,s,l,u=r(67294);u&&"object"==typeof u&&"default"in u&&u.default;var c=r(23451),d=new c,f=d.getBrowser(),p=d.getCPU(),h=d.getDevice(),m=d.getEngine(),g=d.getOS(),v=d.getUA(),y={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},x={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},w=function(){return!!("undefined"!=typeof window&&(window.navigator||navigator))&&(window.navigator||navigator)},_=function(e){var t=w();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},j=function(e){return e.type===y.Browser},C=function(e){return e.name===x.Edge},k=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},E=function(){return _("iPad")};h.type,y.SmartTv,h.type,y.Console,h.type,y.Wearable,h.type,y.Embedded,f.name===x.MobileSafari||E(),f.name,x.Chromium,(n=h.type)===y.Mobile||n===y.Tablet||E(),h.type,y.Mobile,h.type===y.Tablet||E(),j(h),j(h);var S="Android"===g.name;g.name,"iOS"===g.name||E(),f.name,x.Chrome,f.name,x.Firefox,(i=f.name)===x.Safari||x.MobileSafari,f.name,x.Opera,(o=f.name)===x.InternetExplorer||x.Ie,b(g.version),b(g.name),b(f.version),b(f.major),b(f.name),b(h.vendor),b(h.model),b(m.name),b(m.version),b(v),C(f)||k(v),f.name,x.Yandex,b(h.type,"browser"),(a=w())&&(/iPad|iPhone|iPod/.test(a.platform)||"MacIntel"===a.platform&&a.maxTouchPoints>1)&&window.MSStream,E(),_("iPhone"),_("iPod"),"string"==typeof(l=(s=w())&&s.userAgent&&s.userAgent.toLowerCase())&&/electron/.test(l),k(v),C(f)&&k(v),g.name,g.name,f.name,x.MIUI,f.name,x.SamsungBrowser,t.Dt=S},69590:function(e){var t="undefined"!=typeof Element,r="function"==typeof Map,n="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,o){try{return function e(o,a){if(o===a)return!0;if(o&&a&&"object"==typeof o&&"object"==typeof a){var s,l,u,c;if(o.constructor!==a.constructor)return!1;if(Array.isArray(o)){if((s=o.length)!=a.length)return!1;for(l=s;0!=l--;)if(!e(o[l],a[l]))return!1;return!0}if(r&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(c=o.entries();!(l=c.next()).done;)if(!a.has(l.value[0]))return!1;for(c=o.entries();!(l=c.next()).done;)if(!e(l.value[1],a.get(l.value[0])))return!1;return!0}if(n&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(c=o.entries();!(l=c.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if((s=o.length)!=a.length)return!1;for(l=s;0!=l--;)if(o[l]!==a[l])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&"function"==typeof o.valueOf&&"function"==typeof a.valueOf)return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&"function"==typeof o.toString&&"function"==typeof a.toString)return o.toString()===a.toString();if((s=(u=Object.keys(o)).length)!==Object.keys(a).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(a,u[l]))return!1;if(t&&o instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!o.$$typeof)&&!e(o[u[l]],a[u[l]]))return!1;return!0}return o!=o&&a!=a}(e,o)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},33657:function(e,t,r){"use strict";var n=r(67294),i=r(45697),o=r.n(i);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var s=(0,n.forwardRef)(function(e,t){var r=e.color,i=e.size,o=void 0===i?24:i,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["color","size"]);return n.createElement("svg",a({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:void 0===r?"currentColor":r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),n.createElement("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),n.createElement("polyline",{points:"5 12 12 5 19 12"}))});s.propTypes={color:o().string,size:o().oneOfType([o().string,o().number])},s.displayName="ArrowUp",t.Z=s},27071:function(e,t,r){"use strict";var n=r(67294),i=r(45697),o=r.n(i);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var s=(0,n.forwardRef)(function(e,t){var r=e.color,i=e.size,o=void 0===i?24:i,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["color","size"]);return n.createElement("svg",a({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:void 0===r?"currentColor":r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),n.createElement("polyline",{points:"15 18 9 12 15 6"}))});s.propTypes={color:o().string,size:o().oneOfType([o().string,o().number])},s.displayName="ChevronLeft",t.Z=s},76770:function(e){(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};t.r(r),t.d(r,{default:()=>i});var n=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t)}return e=[{key:"changeHeightWidth",value:function(e,t,r,n,i,o){return r>n&&(e=Math.round(e*n/r),r=n),e>t&&(r=Math.round(r*t/e),e=t),i&&r<i&&(e=Math.round(e*i/r),r=i),o&&e<o&&(r=Math.round(r*o/e),e=o),{height:e,width:r}}},{key:"resizeAndRotateImage",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"jpeg",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:100,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=document.createElement("canvas"),u=e.width,c=e.height,d=this.changeHeightWidth(c,r,u,t,n,i);s&&(90===s||270===s)?(l.width=d.height,l.height=d.width):(l.width=d.width,l.height=d.height),u=d.width,c=d.height;var f=l.getContext("2d");return f.fillStyle="rgba(0, 0, 0, 0)",f.fillRect(0,0,u,c),f.imageSmoothingEnabled&&f.imageSmoothingQuality&&(f.imageSmoothingQuality="high"),s&&(f.rotate(s*Math.PI/180),90===s?f.translate(0,-l.width):180===s?f.translate(-l.width,-l.height):270===s?f.translate(-l.height,0):0!==s&&360!==s||f.translate(0,0)),f.drawImage(e,0,0,u,c),l.toDataURL("image/".concat(o),a/100)}},{key:"b64toByteArrays",value:function(e,t){t=t||"image/jpeg";for(var r=atob(e.toString().replace(/^data:image\/(png|jpeg|jpg|webp);base64,/,"")),n=[],i=0;i<r.length;i+=512){for(var o=r.slice(i,i+512),a=Array(o.length),s=0;s<o.length;s++)a[s]=o.charCodeAt(s);var l=new Uint8Array(a);n.push(l)}return n}},{key:"b64toBlob",value:function(e,t){return new Blob(this.b64toByteArrays(e,t),{type:t,lastModified:new Date})}},{key:"b64toFile",value:function(e,t,r){return new File(this.b64toByteArrays(e,r),t,{type:r,lastModified:new Date})}},{key:"createResizedImage",value:function(e,r,n,i,o,a,s){var l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"base64",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,d=new FileReader;if(!e)throw Error("File Not Found!");if(e.type&&!e.type.includes("image"))throw Error("File Is NOT Image!");d.readAsDataURL(e),d.onload=function(){var f=new Image;f.src=d.result,f.onload=function(){var d=t.resizeAndRotateImage(f,r,n,u,c,i,o,a),p="image/".concat(i);switch(l){case"blob":s(t.b64toBlob(d,p));break;case"base64":default:s(d);break;case"file":var h=e.name.toString().replace(/(png|jpeg|jpg|webp)$/i,"").concat(i.toString());s(t.b64toFile(d,h,p))}}},d.onerror=function(e){throw Error(e)}}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t,e),t}();let i={imageFileResizer:function(e,t,r,i,o,a,s,l,u,c){return n.createResizedImage(e,t,r,i,o,a,s,l,u,c)}};e.exports=r})()},69921:function(e,t){"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,x=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case d:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case g:case m:case l:return e;default:return t}}case i:return t}}}function _(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return _(e)||w(e)===c},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===v)},t.typeOf=w},59864:function(e,t,r){"use strict";e.exports=r(69921)},46871:function(e,t,r){"use strict";function n(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState((function(t){var r=this.constructor.getDerivedStateFromProps(e,t);return null!=r?r:null}).bind(this))}function o(e,t){try{var r=this.props,n=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var r=null,a=null,s=null;if("function"==typeof t.componentWillMount?r="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==r||null!==a||null!==s)throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+(e.displayName||e.name)+" uses "+("function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()")+" but also contains the following legacy lifecycles:"+(null!==r?"\n  "+r:"")+(null!==a?"\n  "+a:"")+(null!==s?"\n  "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks");if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=n,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,r){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:r;l.call(this,e,t,n)}}return e}r.r(t),r.d(t,{polyfill:function(){return a}}),n.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},29983:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(67294),a=h(o),s=h(r(73935)),l=h(r(45697)),u=h(r(28747)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(57149)),d=r(51112),f=h(d),p=r(46871);function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var g=t.portalClassName="ReactModalPortal",v=t.bodyOpenClassName="ReactModal__Body--open",y=d.canUseDOM&&void 0!==s.default.createPortal,x=function(e){return document.createElement(e)},b=function(){return y?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer},w=function(e){function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);for(var e,r,i,o=arguments.length,l=Array(o),c=0;c<o;c++)l[c]=arguments[c];return r=i=m(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),i.removePortal=function(){y||s.default.unmountComponentAtNode(i.node);var e=(0,i.props.parentSelector)();e&&e.contains(i.node)?e.removeChild(i.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},i.portalRef=function(e){i.portal=e},i.renderPortal=function(e){var r=b()(i,a.default.createElement(u.default,n({defaultStyles:t.defaultStyles},e)),i.node);i.portalRef(r)},m(i,r)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(y||(this.node=x("div")),this.node.className=this.props.portalClassName,(0,this.props.parentSelector)().appendChild(this.node),y||this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:(0,e.parentSelector)(),nextParent:(0,this.props.parentSelector)()}}},{key:"componentDidUpdate",value:function(e,t,r){if(d.canUseDOM){var n=this.props,i=n.isOpen,o=n.portalClassName;e.portalClassName!==o&&(this.node.className=o);var a=r.prevParent,s=r.nextParent;s!==a&&(a.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||i)&&(y||this.renderPortal(this.props))}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),r=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);r?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,r-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&y?(!this.node&&y&&(this.node=x("div")),b()(a.default.createElement(u.default,n({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){c.setElement(e)}}]),t}(o.Component);w.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.oneOfType([l.default.instanceOf(f.default),l.default.instanceOf(d.SafeHTMLCollection),l.default.instanceOf(d.SafeNodeList),l.default.arrayOf(l.default.instanceOf(f.default))]),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func},w.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:v,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return a.default.createElement("div",e,t)},contentElement:function(e,t){return a.default.createElement("div",e,t)}},w.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,p.polyfill)(w),t.default=w},28747:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r(67294),s=g(r(45697)),l=m(r(99685)),u=g(r(88338)),c=m(r(57149)),d=m(r(32409)),f=r(51112),p=g(f),h=g(r(89623));function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}r(35063);var v={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},y=0,x=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.setOverlayRef=function(e){r.overlay=e,r.props.overlayRef&&r.props.overlayRef(e)},r.setContentRef=function(e){r.content=e,r.props.contentRef&&r.props.contentRef(e)},r.afterClose=function(){var e=r.props,t=e.appElement,n=e.ariaHideApp,i=e.htmlOpenClassName,o=e.bodyOpenClassName,a=e.parentSelector,s=a&&a().ownerDocument||document;o&&d.remove(s.body,o),i&&d.remove(s.getElementsByTagName("html")[0],i),n&&y>0&&0==(y-=1)&&c.show(t),r.props.shouldFocusAfterRender&&(r.props.shouldReturnFocusAfterClose?(l.returnFocus(r.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),r.props.onAfterClose&&r.props.onAfterClose(),h.default.deregister(r)},r.open=function(){r.beforeOpen(),r.state.afterOpen&&r.state.beforeClose?(clearTimeout(r.closeTimer),r.setState({beforeClose:!1})):(r.props.shouldFocusAfterRender&&(l.setupScopedFocus(r.node),l.markForFocusLater()),r.setState({isOpen:!0},function(){r.openAnimationFrame=requestAnimationFrame(function(){r.setState({afterOpen:!0}),r.props.isOpen&&r.props.onAfterOpen&&r.props.onAfterOpen({overlayEl:r.overlay,contentEl:r.content})})}))},r.close=function(){r.props.closeTimeoutMS>0?r.closeWithTimeout():r.closeWithoutTimeout()},r.focusContent=function(){return r.content&&!r.contentHasFocus()&&r.content.focus({preventScroll:!0})},r.closeWithTimeout=function(){var e=Date.now()+r.props.closeTimeoutMS;r.setState({beforeClose:!0,closesAt:e},function(){r.closeTimer=setTimeout(r.closeWithoutTimeout,r.state.closesAt-Date.now())})},r.closeWithoutTimeout=function(){r.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},r.afterClose)},r.handleKeyDown=function(e){("Tab"===e.code||9===e.keyCode)&&(0,u.default)(r.content,e),r.props.shouldCloseOnEsc&&("Escape"===e.code||27===e.keyCode)&&(e.stopPropagation(),r.requestClose(e))},r.handleOverlayOnClick=function(e){null===r.shouldClose&&(r.shouldClose=!0),r.shouldClose&&r.props.shouldCloseOnOverlayClick&&(r.ownerHandlesClose()?r.requestClose(e):r.focusContent()),r.shouldClose=null},r.handleContentOnMouseUp=function(){r.shouldClose=!1},r.handleOverlayOnMouseDown=function(e){r.props.shouldCloseOnOverlayClick||e.target!=r.overlay||e.preventDefault()},r.handleContentOnClick=function(){r.shouldClose=!1},r.handleContentOnMouseDown=function(){r.shouldClose=!1},r.requestClose=function(e){return r.ownerHandlesClose()&&r.props.onRequestClose(e)},r.ownerHandlesClose=function(){return r.props.onRequestClose},r.shouldBeClosed=function(){return!r.state.isOpen&&!r.state.beforeClose},r.contentHasFocus=function(){return document.activeElement===r.content||r.content.contains(document.activeElement)},r.buildClassName=function(e,t){var n=(void 0===t?"undefined":i(t))==="object"?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},o=n.base;return r.state.afterOpen&&(o=o+" "+n.afterOpen),r.state.beforeClose&&(o=o+" "+n.beforeClose),"string"==typeof t&&t?o+" "+t:o},r.attributesFromObject=function(e,t){return Object.keys(t).reduce(function(r,n){return r[e+"-"+n]=t[n],r},{})},r.state={afterOpen:!1,beforeClose:!1},r.shouldClose=null,r.moveFromContentToOverlay=null,r}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,r=e.ariaHideApp,n=e.htmlOpenClassName,i=e.bodyOpenClassName,o=e.parentSelector,a=o&&o().ownerDocument||document;i&&d.add(a.body,i),n&&d.add(a.getElementsByTagName("html")[0],n),r&&(y+=1,c.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,r=e.className,i=e.overlayClassName,o=e.defaultStyles,a=e.children,s=r?{}:o.content,l=i?{}:o.overlay;if(this.shouldBeClosed())return null;var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",i),style:n({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=n({id:t,ref:this.setContentRef,style:n({},s,this.props.style.content),className:this.buildClassName("content",r),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(c,a);return this.props.overlayElement(u,d)}}]),t}(a.Component);x.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},x.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(p.default),s.default.instanceOf(f.SafeHTMLCollection),s.default.instanceOf(f.SafeNodeList),s.default.arrayOf(s.default.instanceOf(p.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=x,e.exports=t.default},57149:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a&&(a.removeAttribute?a.removeAttribute("aria-hidden"):null!=a.length?a.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(a).forEach(function(e){return e.removeAttribute("aria-hidden")})),a=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&o.canUseDOM){var r=document.querySelectorAll(t);s(r,t),t=r}return a=t||a},t.validateElement=l,t.hide=function(e){var t=!0,r=!1,n=void 0;try{for(var i,o=l(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0)i.value.setAttribute("aria-hidden","true")}catch(e){r=!0,n=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}},t.show=function(e){var t=!0,r=!1,n=void 0;try{for(var i,o=l(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0)i.value.removeAttribute("aria-hidden")}catch(e){r=!0,n=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}},t.documentNotReadyOrSSRTesting=function(){a=null};var n,i=(n=r(42473))&&n.__esModule?n:{default:n},o=r(51112),a=null;function s(e,t){if(!e||!e.length)throw Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||a;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,i.default)(!1,"react-modal: App element is not defined. Please use `Modal.setAppElement(el)` or set `appElement={el}`. This is needed so screen readers don't see main content when modal is opened. It is not recommended, but you can opt-out by setting `ariaHideApp={false}`."),[])}},35063:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[o,a],t=0;t<e.length;t++){var r=e[t];r&&r.parentNode&&r.parentNode.removeChild(r)}o=a=null,s=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(s.length);for(var e=[o,a],t=0;t<e.length;t++){var r=e[t]||{};console.log(r.nodeName,r.className,r.id)}console.log("edn bodyTrap ----------")};var n,i=(n=r(89623))&&n.__esModule?n:{default:n},o=void 0,a=void 0,s=[];function l(){0!==s.length&&s[s.length-1].focusContent()}i.default.subscribe(function(e,t){o||a||((o=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),o.style.position="absolute",o.style.opacity="0",o.setAttribute("tabindex","0"),o.addEventListener("focus",l),(a=o.cloneNode()).addEventListener("focus",l)),(s=t).length>0?(document.body.firstChild!==o&&document.body.insertBefore(o,document.body.firstChild),document.body.lastChild!==a&&document.body.appendChild(a)):(o.parentElement&&o.parentElement.removeChild(o),a.parentElement&&a.parentElement.removeChild(a))})},32409:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in r)i(e,r[t]);var o=document.body;for(var a in n)i(o,n[a]);r={},n={}},t.log=function(){};var r={},n={};function i(e,t){e.classList.remove(t)}var o=function(e,t,r){r.forEach(function(r){t[r]||(t[r]=0),t[r]+=1,e.add(r)})},a=function(e,t,r){r.forEach(function(r){t[r]&&(t[r]-=1),0===t[r]&&e.remove(r)})};t.add=function(e,t){return o(e.classList,"html"==e.nodeName.toLowerCase()?r:n,t.split(" "))},t.remove=function(e,t){return a(e.classList,"html"==e.nodeName.toLowerCase()?r:n,t.split(" "))}},99685:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){o=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=u,t.markForFocusLater=function(){o.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{0!==o.length&&(t=o.pop()).focus({preventScroll:e});return}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){o.length>0&&o.pop()},t.setupScopedFocus=function(e){a=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",u,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",u))},t.teardownScopedFocus=function(){a=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",u)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",u))};var n,i=(n=r(37845))&&n.__esModule?n:{default:n},o=[],a=null,s=!1;function l(){s=!0}function u(){s&&(s=!1,a&&setTimeout(function(){a.contains(document.activeElement)||((0,i.default)(a)[0]||a).focus()},0))}},89623:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(n.openInstances.length),n.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")},t.resetState=function(){n=new r};var r=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var r=t.openInstances.indexOf(e);-1!==r&&(t.openInstances.splice(r,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach(function(r){return r(e,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},n=new r;t.default=n},51112:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var n,i=((n=r(58875))&&n.__esModule?n:{default:n}).default,o=i.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=i.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=i.canUseDOM?window.NodeList:{},t.canUseDOM=i.canUseDOM,t.default=o},88338:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=(0,i.default)(e);if(!r.length){t.preventDefault();return}var n=void 0,o=t.shiftKey,a=r[0],s=r[r.length-1],l=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement}();if(e===l){if(!o)return;n=s}if(s!==l||o||(n=a),a===l&&o&&(n=s),n){t.preventDefault(),n.focus();return}var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var c=r.indexOf(l);if(c>-1&&(c+=o?-1:1),void 0===(n=r[c])){t.preventDefault(),(n=o?s:a).focus();return}t.preventDefault(),n.focus()}};var n,i=(n=r(37845))&&n.__esModule?n:{default:n};e.exports=t.default},37845:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce(function(t,r){return t.concat(r.shadowRoot?e(r.shadowRoot):[r])},[]).filter(n)};var r=/input|select|textarea|button|object|iframe/;function n(e){var t,n,i=e.getAttribute("tabindex");null===i&&(i=void 0);var o=isNaN(i);return(o||i>=0)&&(t=!o,n=e.nodeName.toLowerCase(),(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,r=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(r&&t===r&&(t=r.host.parentNode),function(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),n=r.getPropertyValue("display");return t?"contents"!==n&&("visible"!==r.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0):"none"===n}catch(e){return console.warn("Failed to inspect element style"),!1}}(t))return!1;t=t.parentNode}return!0}(e))}e.exports=t.default},83253:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=(n=r(29983))&&n.__esModule?n:{default:n};t.default=i.default,e.exports=t.default},71642:function(e,t,r){"use strict";r.d(t,{Av:function(){return a},pF:function(){return n},xv:function(){return o},zi:function(){return i}});var n="right-scroll-bar-position",i="width-before-scroll-bar",o="with-scroll-bars-hidden",a="--removed-body-scroll-bar-size"},37087:function(e,t,r){"use strict";r.d(t,{jp:function(){return m}});var n=r(67294),i=r(6525),o=r(71642),a={left:0,top:0,right:0,gap:0},s=function(e){return parseInt(e||"",10)||0},l=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[s(r),s(n),s(i)]},u=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return a;var t=l(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},c=(0,i.Ws)(),d="data-scroll-locked",f=function(e,t,r,n){var i=e.left,a=e.top,s=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n  .".concat(o.xv," {\n   overflow: hidden ").concat(n,";\n   padding-right: ").concat(l,"px ").concat(n,";\n  }\n  body[").concat(d,"] {\n    overflow: hidden ").concat(n,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(a,"px;\n    padding-right: ").concat(s,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(l,"px ").concat(n,";\n    "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(o.pF," {\n    right: ").concat(l,"px ").concat(n,";\n  }\n  \n  .").concat(o.zi," {\n    margin-right: ").concat(l,"px ").concat(n,";\n  }\n  \n  .").concat(o.pF," .").concat(o.pF," {\n    right: 0 ").concat(n,";\n  }\n  \n  .").concat(o.zi," .").concat(o.zi," {\n    margin-right: 0 ").concat(n,";\n  }\n  \n  body[").concat(d,"] {\n    ").concat(o.Av,": ").concat(l,"px;\n  }\n")},p=function(){var e=parseInt(document.body.getAttribute(d)||"0",10);return isFinite(e)?e:0},h=function(){n.useEffect(function(){return document.body.setAttribute(d,(p()+1).toString()),function(){var e=p()-1;e<=0?document.body.removeAttribute(d):document.body.setAttribute(d,e.toString())}},[])},m=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,o=void 0===i?"margin":i;h();var a=n.useMemo(function(){return u(o)},[o]);return n.createElement(c,{styles:f(a,!t,o,r?"":"!important")})}},42026:function(e,t,r){"use strict";r.d(t,{Z:function(){return N}});var n=r(97582),i=r(67294),o=r(71642),a=r(99495),s=(0,r(87122)._)(),l=function(){},u=i.forwardRef(function(e,t){var r=i.useRef(null),o=i.useState({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:l}),u=o[0],c=o[1],d=e.forwardProps,f=e.children,p=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,y=e.noIsolation,x=e.inert,b=e.allowPinchZoom,w=e.as,_=(0,n._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),j=(0,a.q)([r,t]),C=(0,n.pi)((0,n.pi)({},_),u);return i.createElement(i.Fragment,null,m&&i.createElement(v,{sideCar:s,removeScrollBar:h,shards:g,noIsolation:y,inert:x,setCallbacks:c,allowPinchZoom:!!b,lockRef:r}),d?i.cloneElement(i.Children.only(f),(0,n.pi)((0,n.pi)({},C),{ref:j})):i.createElement(void 0===w?"div":w,(0,n.pi)({},C,{className:p,ref:j}),f))});u.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},u.classNames={fullWidth:o.zi,zeroRight:o.pF};var c=r(66781),d=r(37087),f=r(6525),p=!1;if("undefined"!=typeof window)try{var h=Object.defineProperty({},"passive",{get:function(){return p=!0,!0}});window.addEventListener("test",h,h),window.removeEventListener("test",h,h)}catch(e){p=!1}var m=!!p&&{passive:!1},g=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===r[t])},v=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),y(e,r)){var n=x(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},y=function(e,t){return"v"===e?g(t,"overflowY"):g(t,"overflowX")},x=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},b=function(e,t,r,n,i){var o,a=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),s=a*n,l=r.target,u=t.contains(l),c=!1,d=s>0,f=0,p=0;do{var h=x(e,l),m=h[0],g=h[1]-h[2]-a*m;(m||g)&&y(e,l)&&(f+=g,p+=m),l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return d&&(i&&0===f||!i&&s>f)?c=!0:!d&&(i&&0===p||!i&&-s>p)&&(c=!0),c},w=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_=function(e){return[e.deltaX,e.deltaY]},j=function(e){return e&&"current"in e?e.current:e},C=0,k=[],E=(0,c.L)(s,function(e){var t=i.useRef([]),r=i.useRef([0,0]),o=i.useRef(),a=i.useState(C++)[0],s=i.useState(function(){return(0,f.Ws)()})[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(0,n.ev)([e.lockRef.current],(e.shards||[]).map(j),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!l.current.allowPinchZoom;var n,i=w(e),a=r.current,s="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=v(d,c);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=v(d,c)),!f)return!1;if(!o.current&&"changedTouches"in e&&(s||u)&&(o.current=n),!n)return!0;var p=o.current||n;return b(p,t,e,"h"===p?s:u,!0)},[]),c=i.useCallback(function(e){if(k.length&&k[k.length-1]===s){var r="deltaY"in e?_(e):w(e),n=t.current.filter(function(t){var n;return t.name===e.type&&t.target===e.target&&(n=t.delta)[0]===r[0]&&n[1]===r[1]})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var i=(l.current.shards||[]).map(j).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?u(e,i[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),p=i.useCallback(function(e,r,n,i){var o={name:e,delta:r,target:n,should:i};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),h=i.useCallback(function(e){r.current=w(e),o.current=void 0},[]),g=i.useCallback(function(t){p(t.type,_(t),t.target,u(t,e.lockRef.current))},[]),y=i.useCallback(function(t){p(t.type,w(t),t.target,u(t,e.lockRef.current))},[]);i.useEffect(function(){return k.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:y}),document.addEventListener("wheel",c,m),document.addEventListener("touchmove",c,m),document.addEventListener("touchstart",h,m),function(){k=k.filter(function(e){return e!==s}),document.removeEventListener("wheel",c,m),document.removeEventListener("touchmove",c,m),document.removeEventListener("touchstart",h,m)}},[]);var x=e.removeScrollBar,E=e.inert;return i.createElement(i.Fragment,null,E?i.createElement(s,{styles:"\n  .block-interactivity-".concat(a," {pointer-events: none;}\n  .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,x?i.createElement(d.jp,{gapMode:"margin"}):null)}),S=i.forwardRef(function(e,t){return i.createElement(u,(0,n.pi)({},e,{ref:t,sideCar:E}))});S.classNames=u.classNames;var N=S},2337:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(67294);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e);var r=t.prototype;return r.getColumns=function(){var e=this.props,t=e.children,r=e.columnsCount,i=Array.from({length:r},function(){return[]}),o=0;return n.Children.forEach(t,function(e){e&&n.isValidElement(e)&&(i[o%r].push(e),o++)}),i},r.renderColumns=function(){var e=this.props.gutter;return this.getColumns().map(function(t,r){return n.createElement("div",{key:r,style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch",flex:1,width:0,gap:e}},t.map(function(e){return e}))})},r.render=function(){var e=this.props,t=e.gutter,r=e.className,o=e.style;return n.createElement("div",{style:i({display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"stretch",boxSizing:"border-box",width:"100%",gap:t},o),className:r},this.renderColumns())},t}(n.Component);a.propTypes={},a.defaultProps={columnsCount:3,gutter:"0",className:null,style:{}};var s="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,l=a},6525:function(e,t,r){"use strict";r.d(t,{Ws:function(){return s}});var n,i=r(67294),o=function(){var e=0,t=null;return{add:function(i){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=n||r.nc;return t&&e.setAttribute("nonce",t),e}())){var o,a;(o=t).styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},a=function(){var e=o();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},s=function(){var e=a();return function(t){return e(t.styles,t.dynamic),null}}},43138:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9150:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},65980:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},13410:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},40814:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},72101:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69757:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56708:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98922:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},13022:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},67083:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55042:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49462:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},13617:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},93960:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18428:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98267:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9679:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},44834:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37790:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},83781:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51992:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24848:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},429:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=void 0,t.assert=function(e,t="no additional info provided"){if(!e)throw Error("Assertion Error: "+t)}},54544:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFactoryWithConstraint=void 0,t.createFactoryWithConstraint=()=>e=>e},85751:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isExact=void 0,t.isExact=()=>e=>e},57515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(...e){}},46094:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnreachableCaseError=void 0;class r extends Error{constructor(e){super(`Unreachable case: ${e}`)}}t.UnreachableCaseError=r},18649:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},82449:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(97604),t),i(r(56708),t),i(r(29287),t),i(r(2334),t),i(r(12633),t),i(r(18407),t),i(r(6659),t),i(r(40814),t),i(r(13410),t),i(r(83781),t),i(r(37790),t),i(r(49847),t),i(r(51330),t),i(r(83673),t),i(r(27478),t),i(r(8773),t),i(r(16712),t),i(r(41549),t),i(r(5280),t),i(r(4330),t),i(r(38301),t),i(r(47281),t),i(r(25059),t),i(r(77805),t),i(r(96889),t),i(r(18432),t),i(r(69757),t),i(r(67083),t),i(r(55042),t),i(r(49462),t),i(r(13617),t),i(r(93960),t),i(r(18428),t),i(r(98267),t),i(r(9679),t),i(r(44834),t),i(r(45840),t),i(r(75170),t),i(r(72638),t),i(r(60694),t),i(r(47972),t),i(r(24848),t),i(r(15038),t),i(r(85642),t),i(r(19857),t),i(r(22138),t),i(r(8697),t),i(r(43138),t),i(r(65980),t),i(r(51992),t),i(r(18649),t),i(r(75145),t),i(r(10237),t),i(r(93952),t),i(r(61779),t),i(r(98922),t),i(r(13022),t),i(r(9150),t),i(r(54102),t),i(r(3553),t),i(r(46094),t),i(r(429),t),i(r(54544),t),i(r(85751),t),i(r(57515),t),i(r(72101),t)},15038:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85642:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22138:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},19857:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29287:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},25059:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77805:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},96889:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18432:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51330:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49847:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},83673:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},75145:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8697:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27478:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8773:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},16712:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},45840:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},75170:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},41549:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54102:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3553:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},97604:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10237:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},72638:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60694:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5280:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2334:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12633:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18407:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},93952:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},61779:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4330:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},38301:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},47972:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6659:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},47281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23451:function(e,t,r){var n;!function(i,o){"use strict";var a="function",s="undefined",l="object",u="string",c="major",d="model",f="name",p="type",h="vendor",m="version",g="architecture",v="console",y="mobile",x="tablet",b="smarttv",w="wearable",_="embedded",j="Amazon",C="Apple",k="ASUS",E="BlackBerry",S="Browser",N="Chrome",P="Firefox",L="Google",T="Huawei",O="Microsoft",R="Motorola",A="Opera",I="Samsung",M="Sharp",D="Sony",F="Xiaomi",z="Zebra",B="Facebook",U="Chromium OS",V="Mac OS",$=" Browser",H=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},Z=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},W=function(e,t){return typeof e===u&&-1!==q(t).indexOf(q(e))},q=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,500)},Y=function(e,t){for(var r,n,i,s,u,c,d=0;d<t.length&&!u;){var f=t[d],p=t[d+1];for(r=n=0;r<f.length&&!u&&f[r];)if(u=f[r++].exec(e))for(i=0;i<p.length;i++)c=u[++n],typeof(s=p[i])===l&&s.length>0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):void 0:this[s[0]]=c?s[1].call(this,c,s[2]):void 0:4===s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):void 0):this[s]=c||o;d+=2}},K=function(e,t){for(var r in t)if(typeof t[r]===l&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(W(t[r][n],e))return"?"===r?o:r}else if(W(t[r],e))return"?"===r?o:r;return t.hasOwnProperty("*")?t["*"]:e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,m],[/opios[\/ ]+([\w\.]+)/i],[m,[f,A+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[m,[f,A+" GX"]],[/\bopr\/([\w\.]+)/i],[m,[f,A]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[f,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,m],[/quark(?:pc)?\/([-\w\.]+)/i],[m,[f,"Quark"]],[/\bddg\/([\w\.]+)/i],[m,[f,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[f,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[f,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[f,"Smart Lenovo "+S]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+S],m],[/\bfocus\/([\w\.]+)/i],[m,[f,P+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[f,A+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[f,A+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[f,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[m,[f,P]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360"+$]],[/\b(qq)\/([\w\.]+)/i],[[f,/(.+)/,"$1Browser"],m],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1"+$],m],[/samsungbrowser\/([\w\.]+)/i],[m,[f,I+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],m],[/metasr[\/ ]?([\d\.]+)/i],[m,[f,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,"Sogou Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[f,m],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,B],m],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[f,N+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,N+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[f,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[m,K,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[f,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],m],[/(wolvic)\/([\w\.]+)/i],[f,m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[f,P+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[f,[m,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[f,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,q]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",q]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[h,I],[p,x]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[h,I],[p,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[h,C],[p,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[h,C],[p,x]],[/(macintosh);/i],[d,[h,C]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[h,M],[p,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[h,T],[p,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[h,T],[p,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[d,/_/g," "],[h,F],[p,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[h,F],[p,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[h,"OPPO"],[p,y]],[/\b(opd2\d{3}a?) bui/i],[d,[h,"OPPO"],[p,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[h,"Vivo"],[p,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[h,"Realme"],[p,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[h,R],[p,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[h,R],[p,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[h,"LG"],[p,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[h,"LG"],[p,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[h,"Lenovo"],[p,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[h,"Nokia"],[p,y]],[/(pixel c)\b/i],[d,[h,L],[p,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[h,L],[p,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[h,D],[p,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[h,D],[p,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[h,"OnePlus"],[p,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[h,j],[p,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[h,j],[p,y]],[/(playbook);[-\w\),; ]+(rim)/i],[d,h,[p,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[h,E],[p,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[h,k],[p,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[h,k],[p,y]],[/(nexus 9)/i],[d,[h,"HTC"],[p,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[d,/_/g," "],[p,y]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[h,"TCL"],[p,x]],[/(itel) ((\w+))/i],[[h,q],d,[p,K,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[h,"Acer"],[p,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[h,"Meizu"],[p,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[h,"Ulefone"],[p,y]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[h,"Nothing"],[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,d,[p,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,d,[p,x]],[/(surface duo)/i],[d,[h,O],[p,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[h,"Fairphone"],[p,y]],[/(u304aa)/i],[d,[h,"AT&T"],[p,y]],[/\bsie-(\w*)/i],[d,[h,"Siemens"],[p,y]],[/\b(rct\w+) b/i],[d,[h,"RCA"],[p,x]],[/\b(venue[\d ]{2,7}) b/i],[d,[h,"Dell"],[p,x]],[/\b(q(?:mv|ta)\w+) b/i],[d,[h,"Verizon"],[p,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[h,"Barnes & Noble"],[p,x]],[/\b(tm\d{3}\w+) b/i],[d,[h,"NuVision"],[p,x]],[/\b(k88) b/i],[d,[h,"ZTE"],[p,x]],[/\b(nx\d{3}j) b/i],[d,[h,"ZTE"],[p,y]],[/\b(gen\d{3}) b.+49h/i],[d,[h,"Swiss"],[p,y]],[/\b(zur\d{3}) b/i],[d,[h,"Swiss"],[p,x]],[/\b((zeki)?tb.*\b) b/i],[d,[h,"Zeki"],[p,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],d,[p,x]],[/\b(ns-?\w{0,9}) b/i],[d,[h,"Insignia"],[p,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[h,"NextBook"],[p,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],d,[p,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],d,[p,y]],[/\b(ph-1) /i],[d,[h,"Essential"],[p,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[h,"Envizen"],[p,x]],[/\b(trio[-\w\. ]+) b/i],[d,[h,"MachSpeed"],[p,x]],[/\btu_(1491) b/i],[d,[h,"Rotor"],[p,x]],[/(shield[\w ]+) b/i],[d,[h,"Nvidia"],[p,x]],[/(sprint) (\w+)/i],[h,d,[p,y]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[h,O],[p,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[h,z],[p,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[h,z],[p,y]],[/smart-tv.+(samsung)/i],[h,[p,b]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[h,I],[p,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[p,b]],[/(apple) ?tv/i],[h,[d,C+" TV"],[p,b]],[/crkey/i],[[d,N+"cast"],[h,L],[p,b]],[/droid.+aft(\w+)( bui|\))/i],[d,[h,j],[p,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[h,M],[p,b]],[/(bravia[\w ]+)( bui|\))/i],[d,[h,D],[p,b]],[/(mitv-\w{5}) bui/i],[d,[h,F],[p,b]],[/Hbbtv.*(technisat) (.*);/i],[h,d,[p,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,G],[d,G],[p,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,d,[p,v]],[/droid.+; (shield) bui/i],[d,[h,"Nvidia"],[p,v]],[/(playstation [345portablevi]+)/i],[d,[h,D],[p,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[h,O],[p,v]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[d,[h,I],[p,w]],[/((pebble))app/i],[h,d,[p,w]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[h,C],[p,w]],[/droid.+; (glass) \d/i],[d,[h,L],[p,w]],[/droid.+; (wt63?0{2,3})\)/i],[d,[h,z],[p,w]],[/(quest( \d| pro)?)/i],[d,[h,B],[p,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[p,_]],[/(aeobc)\b/i],[d,[h,j],[p,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,y]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,m],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[f,[m,K,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,K,X],[f,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,V],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,m],[/\(bb(10);/i],[m,[f,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[f,P+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[f,N+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,U],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,m],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,m]]},Q=function(e,t){if(typeof e===l&&(t=e,e=o),!(this instanceof Q))return new Q(e,t).getResult();var r=typeof i!==s&&i.navigator?i.navigator:o,n=e||(r&&r.userAgent?r.userAgent:""),v=r&&r.userAgentData?r.userAgentData:o,b=t?H(J,t):J,w=r&&r.userAgent==n;return this.getBrowser=function(){var e,t={};return t[f]=o,t[m]=o,Y.call(t,n,b.browser),t[c]=typeof(e=t[m])===u?e.replace(/[^\d\.]/g,"").split(".")[0]:o,w&&r&&r.brave&&typeof r.brave.isBrave==a&&(t[f]="Brave"),t},this.getCPU=function(){var e={};return e[g]=o,Y.call(e,n,b.cpu),e},this.getDevice=function(){var e={};return e[h]=o,e[d]=o,e[p]=o,Y.call(e,n,b.device),w&&!e[p]&&v&&v.mobile&&(e[p]=y),w&&"Macintosh"==e[d]&&r&&typeof r.standalone!==s&&r.maxTouchPoints&&r.maxTouchPoints>2&&(e[d]="iPad",e[p]=x),e},this.getEngine=function(){var e={};return e[f]=o,e[m]=o,Y.call(e,n,b.engine),e},this.getOS=function(){var e={};return e[f]=o,e[m]=o,Y.call(e,n,b.os),w&&!e[f]&&v&&v.platform&&"Unknown"!=v.platform&&(e[f]=v.platform.replace(/chrome os/i,U).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===u&&e.length>500?G(e,500):e,this},this.setUA(n),this};Q.VERSION="1.0.39",Q.BROWSER=Z([f,m,c]),Q.CPU=Z([g]),Q.DEVICE=Z([d,h,p,v,y,b,x,w,_]),Q.ENGINE=Q.OS=Z([f,m]),typeof t!==s?(e.exports&&(t=e.exports=Q),t.UAParser=Q):r.amdO?o!==(n=(function(){return Q}).call(t,r,t,e))&&(e.exports=n):typeof i!==s&&(i.UAParser=Q);var ee=typeof i!==s&&(i.jQuery||i.Zepto);if(ee&&!ee.ua){var et=new Q;ee.ua=et.getResult(),ee.ua.get=function(){return et.getUA()},ee.ua.set=function(e){et.setUA(e);var t=et.getResult();for(var r in t)ee.ua[r]=t[r]}}}("object"==typeof window?window:this)},99495:function(e,t,r){"use strict";r.d(t,{q:function(){return s}});var n=r(67294);function i(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var o="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,a=new WeakMap;function s(e,t){var r,s,l,u=(r=t||null,s=function(t){return e.forEach(function(e){return i(e,t)})},(l=(0,n.useState)(function(){return{value:r,callback:s,facade:{get current(){return l.value},set current(value){var e=l.value;e!==value&&(l.value=value,l.callback(value,e))}}}})[0]).callback=s,l.facade);return o(function(){var t=a.get(u);if(t){var r=new Set(t),n=new Set(e),o=u.current;r.forEach(function(e){n.has(e)||i(e,null)}),n.forEach(function(e){r.has(e)||i(e,o)})}a.set(u,e)},[e]),u}},66781:function(e,t,r){"use strict";r.d(t,{L:function(){return a}});var n=r(97582),i=r(67294),o=function(e){var t=e.sideCar,r=(0,n._T)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw Error("Sidecar medium not found");return i.createElement(o,(0,n.pi)({},r))};function a(e,t){return e.useMedium(t),o}o.isSideCarExport=!0},87122:function(e,t,r){"use strict";r.d(t,{_:function(){return o}});var n=r(97582);function i(e){return e}function o(e){void 0===e&&(e={});var t,r,o,a=(void 0===t&&(t=i),r=[],o=!1,{read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var n=t(e,o);return r.push(n),function(){r=r.filter(function(e){return e!==n})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}});return a.options=(0,n.pi)({async:!0,ssr:!1},e),a}},53250:function(e,t,r){"use strict";var n=r(67294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return s(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),a(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},61688:function(e,t,r){"use strict";e.exports=r(53250)},57632:function(e,t,r){"use strict";let n;r.d(t,{Z:function(){return s}});var i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));var s=function(e,t,r){if(i.randomUUID&&!t&&!e)return i.randomUUID();let s=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return function(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}(s)}},42473:function(e){"use strict";e.exports=function(){}},26849:function(e,t,r){"use strict";var n=r(67294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return s(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),a(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},49743:function(e,t,r){"use strict";var n=r(67294),i=r(54652),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=a(e,(d=u(function(){function e(e){if(!l){if(l=!0,a=e,e=n(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var r=n(e);return void 0!==i&&i(t,r)?t:(a=e,s=r)}var a,s,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,i]))[0],d[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},54652:function(e,t,r){"use strict";e.exports=r(26849)},28258:function(e,t,r){"use strict";e.exports=r(49743)},8293:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(66713).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1747:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorage}});let n=r(8293);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},66713:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});let r=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}let i=globalThis.AsyncLocalStorage;function o(){return i?new i:new n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},70038:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(66713).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95714:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getExpectedRequestStore:function(){return i},requestAsyncStorage:function(){return n.requestAsyncStorage}});let n=r(70038);function i(e){let t=n.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},73897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},85372:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},66115:function(e){e.exports=function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},17156:function(e){function t(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise(function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,l,"next",e)}function l(e){t(a,i,o,s,l,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},56690:function(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},3515:function(e,t,r){var n=r(69617),i=r(6015);e.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return r&&i(a,r.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports},89728:function(e,t,r){var n=r(64062);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}e.exports=function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},38416:function(e,t,r){var n=r(64062);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},73808:function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},61655:function(e,t,r){var n=r(6015);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},64836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},46035:function(e){e.exports=function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},69617:function(e){function t(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e.exports=t=function(){return!!r},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},68872:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},26360:function(e){e.exports=function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},94993:function(e,t,r){var n=r(18698).default,i=r(66115);e.exports=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},17061:function(e,t,r){var n=r(18698).default;function i(){"use strict";e.exports=i=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,r,n,i){var o,a,l=Object.create((r&&r.prototype instanceof x?r:x).prototype);return s(l,"_invoke",{value:(o=new L(i||[]),a=m,function(r,i){if(a===g)throw Error("Generator is already running");if(a===v){if("throw"===r)throw i;return{value:t,done:!0}}for(o.method=r,o.arg=i;;){var s=o.delegate;if(s){var l=function e(r,n){var i=n.method,o=r.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var a=h(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,y)}(s,o);if(l){if(l===y)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===m)throw a=v,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=g;var u=h(e,n,o);if("normal"===u.type){if(a=o.done?v:"suspendedYield",u.arg===y)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(a=v,o.method="throw",o.arg=u.arg)}})}),l}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var m="suspendedStart",g="executing",v="completed",y={};function x(){}function b(){}function w(){}var _={};f(_,u,function(){return this});var j=Object.getPrototypeOf,C=j&&j(j(T([])));C&&C!==o&&a.call(C,u)&&(_=C);var k=w.prototype=x.prototype=Object.create(_);function E(e){["next","throw","return"].forEach(function(t){f(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){var r;s(this,"_invoke",{value:function(i,o){function s(){return new t(function(r,s){!function r(i,o,s,l){var u=h(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==n(d)&&a.call(d,"__await")?t.resolve(d.__await).then(function(e){r("next",e,s,l)},function(e){r("throw",e,s,l)}):t.resolve(d).then(function(e){c.value=e,s(c)},function(e){return r("throw",e,s,l)})}l(u.arg)}(i,o,r,s)})}return r=r?r.then(s,s):s()}})}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(a.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw TypeError(n(e)+" is not iterable")}return b.prototype=w,s(k,"constructor",{value:w,configurable:!0}),s(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,d,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,d,"GeneratorFunction")),e.prototype=Object.create(k),e},r.awrap=function(e){return{__await:e}},E(S.prototype),f(S.prototype,c,function(){return this}),r.AsyncIterator=S,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var a=new S(p(e,t,n,i),o);return r.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},E(k),f(k,d,"Generator"),f(k,u,function(){return this}),f(k,"toString",function(){return"[object Generator]"}),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=T,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},r}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},27424:function(e,t,r){var n=r(85372),i=r(68872),o=r(86116),a=r(26360);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},95036:function(e,t,r){var n=r(18698).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},64062:function(e,t,r){var n=r(18698).default,i=r(95036);e.exports=function(e){var t=i(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},18698:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},86116:function(e,t,r){var n=r(73897);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},33496:function(e,t,r){var n=r(73808),i=r(6015),o=r(46035),a=r(3515);function s(t){var r="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},64687:function(e,t,r){var n=r(17061)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},87462:function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}r.d(t,{Z:function(){return n}})},16713:function(e,t,r){"use strict";r.d(t,{O:function(){return k}});var n=r(60820),i=r(26245),o=r(52366),a=r(35155),s=r(81103),l=r(25432),u={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},c=()=>"undefined"!=typeof document,d=!1,f=null,p=!1,h=!1,m=new Set;function g(e,t){m.forEach(r=>r(e,t))}var v="undefined"!=typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function y(e){p=!0,e.metaKey||!v&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(f="keyboard",g("keyboard",e))}function x(e){if(f="pointer","mousedown"===e.type||"pointerdown"===e.type){p=!0;let t=e.composedPath?e.composedPath()[0]:e.target,r=!1;try{r=t.matches(":focus-visible")}catch{}r||g("pointer",e)}}function b(e){(0===e.mozInputSource&&e.isTrusted||0===e.detail&&!e.pointerType)&&(p=!0,f="virtual")}function w(e){e.target!==window&&e.target!==document&&(p||h||(f="virtual",g("virtual",e)),p=!1,h=!1)}function _(){p=!1,h=!0}function j(){return"pointer"!==f}var C=r(67294);function k(e={}){let{isDisabled:t,isReadOnly:r,isRequired:f,isInvalid:h,id:g,onBlur:v,onFocus:k,"aria-describedby":S}=(0,n.K)(e),{defaultChecked:N,isChecked:P,isFocusable:L,onChange:T,isIndeterminate:O,name:R,value:A,tabIndex:I,"aria-label":M,"aria-labelledby":D,"aria-invalid":F,...z}=e,B=function(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}(z,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),U=(0,a.W)(T),V=(0,a.W)(v),$=(0,a.W)(k),[H,Z]=(0,C.useState)(!1),[W,q]=(0,C.useState)(!1),[G,Y]=(0,C.useState)(!1),[K,X]=(0,C.useState)(!1);(0,C.useEffect)(()=>(function(e){!function(){if(!c()||d)return;let{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...t){p=!0,e.apply(this,t)},document.addEventListener("keydown",y,!0),document.addEventListener("keyup",y,!0),document.addEventListener("click",b,!0),window.addEventListener("focus",w,!0),window.addEventListener("blur",_,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",x,!0),document.addEventListener("pointermove",x,!0),document.addEventListener("pointerup",x,!0)):(document.addEventListener("mousedown",x,!0),document.addEventListener("mousemove",x,!0),document.addEventListener("mouseup",x,!0)),d=!0}(),e(j());let t=()=>e(j());return m.add(t),()=>{m.delete(t)}})(Z),[]);let J=(0,C.useRef)(null),[Q,ee]=(0,C.useState)(!0),[et,er]=(0,C.useState)(!!N),en=void 0!==P,ei=en?P:et,eo=(0,C.useCallback)(e=>{if(r||t){e.preventDefault();return}en||(ei?er(e.target.checked):er(!!O||e.target.checked)),null==U||U(e)},[r,t,ei,en,O,U]);(0,i.G)(()=>{J.current&&(J.current.indeterminate=!!O)},[O]),(0,o.r)(()=>{t&&q(!1)},[t,q]),(0,i.G)(()=>{let e=J.current;if(!(null==e?void 0:e.form))return;let t=()=>{er(!!N)};return e.form.addEventListener("reset",t),()=>{var r;return null==(r=e.form)?void 0:r.removeEventListener("reset",t)}},[]);let ea=t&&!L,es=(0,C.useCallback)(e=>{" "===e.key&&X(!0)},[X]),el=(0,C.useCallback)(e=>{" "===e.key&&X(!1)},[X]);(0,i.G)(()=>{J.current&&J.current.checked!==ei&&er(J.current.checked)},[J.current]);let eu=(0,C.useCallback)((e={},n=null)=>({...e,ref:n,"data-active":(0,l.PB)(K),"data-hover":(0,l.PB)(G),"data-checked":(0,l.PB)(ei),"data-focus":(0,l.PB)(W),"data-focus-visible":(0,l.PB)(W&&H),"data-indeterminate":(0,l.PB)(O),"data-disabled":(0,l.PB)(t),"data-invalid":(0,l.PB)(h),"data-readonly":(0,l.PB)(r),"aria-hidden":!0,onMouseDown:(0,l.v0)(e.onMouseDown,e=>{W&&e.preventDefault(),X(!0)}),onMouseUp:(0,l.v0)(e.onMouseUp,()=>X(!1)),onMouseEnter:(0,l.v0)(e.onMouseEnter,()=>Y(!0)),onMouseLeave:(0,l.v0)(e.onMouseLeave,()=>Y(!1))}),[K,ei,t,W,H,G,O,h,r]),ec=(0,C.useCallback)((e={},n=null)=>({...e,ref:n,"data-active":(0,l.PB)(K),"data-hover":(0,l.PB)(G),"data-checked":(0,l.PB)(ei),"data-focus":(0,l.PB)(W),"data-focus-visible":(0,l.PB)(W&&H),"data-indeterminate":(0,l.PB)(O),"data-disabled":(0,l.PB)(t),"data-invalid":(0,l.PB)(h),"data-readonly":(0,l.PB)(r)}),[K,ei,t,W,H,G,O,h,r]),ed=(0,C.useCallback)((e={},r=null)=>({...B,...e,ref:(0,s.lq)(r,e=>{e&&ee("LABEL"===e.tagName)}),onClick:(0,l.v0)(e.onClick,()=>{var e;Q||(null==(e=J.current)||e.click(),requestAnimationFrame(()=>{var e;null==(e=J.current)||e.focus({preventScroll:!0})}))}),"data-disabled":(0,l.PB)(t),"data-checked":(0,l.PB)(ei),"data-invalid":(0,l.PB)(h)}),[B,t,ei,h,Q]),ef=(0,C.useCallback)((e={},n=null)=>({...e,ref:(0,s.lq)(J,n),type:"checkbox",name:R,value:A,id:g,tabIndex:I,onChange:(0,l.v0)(e.onChange,eo),onBlur:(0,l.v0)(e.onBlur,V,()=>q(!1)),onFocus:(0,l.v0)(e.onFocus,$,()=>q(!0)),onKeyDown:(0,l.v0)(e.onKeyDown,es),onKeyUp:(0,l.v0)(e.onKeyUp,el),required:f,checked:ei,disabled:ea,readOnly:r,"aria-label":M,"aria-labelledby":D,"aria-invalid":F?!!F:h,"aria-describedby":S,"aria-disabled":t,style:u}),[R,A,g,eo,V,$,es,el,f,ei,ea,r,M,D,F,h,S,t,I]),ep=(0,C.useCallback)((e={},r=null)=>({...e,ref:r,onMouseDown:(0,l.v0)(e.onMouseDown,E),"data-disabled":(0,l.PB)(t),"data-checked":(0,l.PB)(ei),"data-invalid":(0,l.PB)(h)}),[ei,t,h]);return{state:{isInvalid:h,isFocused:W,isChecked:ei,isActive:K,isHovered:G,isIndeterminate:O,isDisabled:t,isReadOnly:r,isRequired:f},getRootProps:ed,getCheckboxProps:eu,getIndicatorProps:ec,getInputProps:ef,getLabelProps:ep,htmlProps:B}}function E(e){e.preventDefault(),e.stopPropagation()}},53468:function(e,t,r){"use strict";r.d(t,{X:function(){return _}});var n=r(67294),[i,o]=(0,r(55227).k)({name:"CheckboxGroupContext",strict:!1}),a=r(16914),s=r(85893);function l(e){return(0,s.jsx)(a.m.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:(0,s.jsx)("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function u(e){return(0,s.jsx)(a.m.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:(0,s.jsx)("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function c(e){let{isIndeterminate:t,isChecked:r,...n}=e;return r||t?(0,s.jsx)(a.m.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,s.jsx)(t?u:l,{...n})}):null}var d=r(16713),f=r(25432),p=r(70917),h=r(16554),m=r(27603),g=r(33179),v={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},y={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},x=(0,p.F4)({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),b=(0,p.F4)({from:{opacity:0},to:{opacity:1}}),w=(0,p.F4)({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),_=(0,h.G)(function(e,t){let r=o(),i={...r,...e},l=(0,m.jC)("Checkbox",i),u=(0,g.Lr)(e),{spacing:p="0.5rem",className:h,children:_,iconColor:j,iconSize:C,icon:k=(0,s.jsx)(c,{}),isChecked:E,isDisabled:S=null==r?void 0:r.isDisabled,onChange:N,inputProps:P,...L}=u,T=E;(null==r?void 0:r.value)&&u.value&&(T=r.value.includes(u.value));let O=N;(null==r?void 0:r.onChange)&&u.value&&(O=(0,f.PP)(r.onChange,N));let{state:R,getInputProps:A,getCheckboxProps:I,getLabelProps:M,getRootProps:D}=(0,d.O)({...L,isDisabled:S,isChecked:T,onChange:O}),F=function(e){let[t,r]=(0,n.useState)(e),[i,o]=(0,n.useState)(!1);return e!==t&&(o(!0),r(e)),i}(R.isChecked),z=(0,n.useMemo)(()=>({animation:F?R.isIndeterminate?`${b} 20ms linear, ${w} 200ms linear`:`${x} 200ms linear`:void 0,fontSize:C,color:j,...l.icon}),[j,C,F,R.isIndeterminate,l.icon]),B=(0,n.cloneElement)(k,{__css:z,isIndeterminate:R.isIndeterminate,isChecked:R.isChecked});return(0,s.jsxs)(a.m.label,{__css:{...y,...l.container},className:(0,f.cx)("chakra-checkbox",h),...D(),children:[(0,s.jsx)("input",{className:"chakra-checkbox__input",...A(P,t)}),(0,s.jsx)(a.m.span,{__css:{...v,...l.control},className:"chakra-checkbox__control",...I(),children:B}),_&&(0,s.jsx)(a.m.span,{className:"chakra-checkbox__label",...M(),__css:{marginStart:p,...l.label},children:_})]})});_.displayName="Checkbox"},3949:function(e,t,r){"use strict";r.d(t,{P:function(){return c}});var n=r(36948),i=r(16554),o=r(27603),a=r(33179),s=r(16914),l=r(85893);function u(e){return(0,l.jsx)(n.J,{focusable:"false","aria-hidden":!0,...e,children:(0,l.jsx)("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var c=(0,i.G)(function(e,t){let r=(0,o.mq)("CloseButton",e),{children:n,isDisabled:i,__css:c,...d}=(0,a.Lr)(e);return(0,l.jsx)(s.m.button,{type:"button","aria-label":"Close",ref:t,disabled:i,__css:{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...r,...c},...d,children:n||(0,l.jsx)(u,{width:"1em",height:"1em"})})});c.displayName="CloseButton"},45161:function(e,t,r){"use strict";r.d(t,{If:function(){return o},kc:function(){return i}});var n=r(67294),i=(0,n.createContext)({});function o(){let e=(0,n.useContext)(i);if(void 0===e)throw Error("useColorMode must be used within a ColorModeProvider");return e}i.displayName="ColorModeContext"},60820:function(e,t,r){"use strict";r.d(t,{Y:function(){return g},K:function(){return v}});var n=r(55227),i=r(81103),o=r(16554),a=r(27603),s=r(33179),l=r(16914),u=r(25432),c=r(67294),d=r(85893),[f,p]=(0,n.k)({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormControl />\" "}),[h,m]=(0,n.k)({strict:!1,name:"FormControlContext"});function g(e){let{isDisabled:t,isInvalid:r,isReadOnly:n,isRequired:i,...o}=v(e);return{...o,disabled:t,readOnly:n,required:i,"aria-invalid":(0,u.Qm)(r),"aria-required":(0,u.Qm)(i),"aria-readonly":(0,u.Qm)(n)}}function v(e){var t,r,n;let i=m(),{id:o,disabled:a,readOnly:s,required:l,isRequired:c,isInvalid:d,isReadOnly:f,isDisabled:p,onFocus:h,onBlur:g,...v}=e,y=e["aria-describedby"]?[e["aria-describedby"]]:[];return(null==i?void 0:i.hasFeedbackText)&&(null==i?void 0:i.isInvalid)&&y.push(i.feedbackId),(null==i?void 0:i.hasHelpText)&&y.push(i.helpTextId),{...v,"aria-describedby":y.join(" ")||void 0,id:null!=o?o:null==i?void 0:i.id,isDisabled:null!=(t=null!=a?a:p)?t:null==i?void 0:i.isDisabled,isReadOnly:null!=(r=null!=s?s:f)?r:null==i?void 0:i.isReadOnly,isRequired:null!=(n=null!=l?l:c)?n:null==i?void 0:i.isRequired,isInvalid:null!=d?d:null==i?void 0:i.isInvalid,onFocus:(0,u.v0)(null==i?void 0:i.onFocus,h),onBlur:(0,u.v0)(null==i?void 0:i.onBlur,g)}}(0,o.G)(function(e,t){let r=(0,a.jC)("Form",e),{getRootProps:n,htmlProps:o,...p}=function(e){let{id:t,isRequired:r,isInvalid:n,isDisabled:o,isReadOnly:a,...s}=e,l=(0,c.useId)(),d=t||`field-${l}`,f=`${d}-label`,p=`${d}-feedback`,h=`${d}-helptext`,[m,g]=(0,c.useState)(!1),[v,y]=(0,c.useState)(!1),[x,b]=(0,c.useState)(!1),w=(0,c.useCallback)((e={},t=null)=>({id:h,...e,ref:(0,i.lq)(t,e=>{e&&y(!0)})}),[h]),_=(0,c.useCallback)((e={},t=null)=>({...e,ref:t,"data-focus":(0,u.PB)(x),"data-disabled":(0,u.PB)(o),"data-invalid":(0,u.PB)(n),"data-readonly":(0,u.PB)(a),id:void 0!==e.id?e.id:f,htmlFor:void 0!==e.htmlFor?e.htmlFor:d}),[d,o,x,n,a,f]),j=(0,c.useCallback)((e={},t=null)=>({id:p,...e,ref:(0,i.lq)(t,e=>{e&&g(!0)}),"aria-live":"polite"}),[p]),C=(0,c.useCallback)((e={},t=null)=>({...e,...s,ref:t,role:"group","data-focus":(0,u.PB)(x),"data-disabled":(0,u.PB)(o),"data-invalid":(0,u.PB)(n),"data-readonly":(0,u.PB)(a)}),[s,o,x,n,a]);return{isRequired:!!r,isInvalid:!!n,isReadOnly:!!a,isDisabled:!!o,isFocused:!!x,onFocus:()=>b(!0),onBlur:()=>b(!1),hasFeedbackText:m,setHasFeedbackText:g,hasHelpText:v,setHasHelpText:y,id:d,labelId:f,feedbackId:p,helpTextId:h,htmlProps:s,getHelpTextProps:w,getErrorMessageProps:j,getRootProps:C,getLabelProps:_,getRequiredIndicatorProps:(0,c.useCallback)((e={},t=null)=>({...e,ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"}),[])}}((0,s.Lr)(e)),m=(0,u.cx)("chakra-form-control",e.className);return(0,d.jsx)(h,{value:p,children:(0,d.jsx)(f,{value:r,children:(0,d.jsx)(l.m.div,{...n({},t),className:m,__css:r.container})})})}).displayName="FormControl",(0,o.G)(function(e,t){let r=m(),n=p(),i=(0,u.cx)("chakra-form__helper-text",e.className);return(0,d.jsx)(l.m.div,{...null==r?void 0:r.getHelpTextProps(e,t),__css:n.helperText,className:i})}).displayName="FormHelperText"},20967:function(e,t,r){"use strict";r.d(t,{q:function(){return s}});var n=r(67294),i="undefined"!=typeof window&&window.document&&window.document.createElement?n.useLayoutEffect:n.useEffect;function o(e,t=[]){let r=(0,n.useRef)(e);return i(()=>{r.current=e}),(0,n.useCallback)((...e)=>{var t;return null==(t=r.current)?void 0:t.call(r,...e)},t)}var a=r(36597);function s(e={}){let{onClose:t,onOpen:r,isOpen:i,id:s}=e,l=o(r),u=o(t),[c,d]=(0,n.useState)(e.defaultIsOpen||!1),[f,p]=function(e,t){let r=void 0!==e;return[r,r&&void 0!==e?e:t]}(i,c),h=function(e,t){let r=(0,n.useId)();return(0,n.useMemo)(()=>e||[t,r].filter(Boolean).join("-"),[e,t,r])}(s,"disclosure"),m=(0,n.useCallback)(()=>{f||d(!1),null==u||u()},[f,u]),g=(0,n.useCallback)(()=>{f||d(!0),null==l||l()},[f,l]),v=(0,n.useCallback)(()=>{(p?m:g)()},[p,g,m]);return{isOpen:!!p,onOpen:g,onClose:m,onToggle:v,isControlled:f,getButtonProps:(e={})=>({...e,"aria-expanded":p,"aria-controls":h,onClick:(0,a.v0)(e.onClick,v)}),getDisclosureProps:(e={})=>({...e,hidden:!p,id:h})}}},36948:function(e,t,r){"use strict";r.d(t,{J:function(){return u}});var n=r(16554),i=r(27603),o=r(16914),a=r(25432),s=r(85893),l={path:(0,s.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,s.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,s.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,s.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},u=(0,n.G)((e,t)=>{let{as:r,viewBox:n,color:u="currentColor",focusable:c=!1,children:d,className:f,__css:p,...h}=e,m=(0,a.cx)("chakra-icon",f),g=(0,i.mq)("Icon",e),v={ref:t,focusable:c,className:m,__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:u,...p,...g}},y=null!=n?n:l.viewBox;if(r&&"string"!=typeof r)return(0,s.jsx)(o.m.svg,{as:r,...v,...h});let x=null!=d?d:l.path;return(0,s.jsx)(o.m.svg,{verticalAlign:"middle",viewBox:y,...v,...h,children:x})});u.displayName="Icon"},24027:function(e,t,r){"use strict";r.d(t,{I:function(){return s}});var n=r(36948),i=r(16554),o=r(67294),a=r(85893);function s(e){let{viewBox:t="0 0 24 24",d:r,displayName:s,defaultProps:l={}}=e,u=o.Children.toArray(e.path),c=(0,i.G)((e,i)=>(0,a.jsx)(n.J,{ref:i,viewBox:t,...l,...e,children:u.length?u:(0,a.jsx)("path",{fill:"currentColor",d:r})}));return c.displayName=s,c}},1679:function(e,t,r){"use strict";r.d(t,{T:function(){return n}});var n=(0,r(24027).I)({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})},7871:function(e,t,r){"use strict";r.d(t,{L:function(){return o}});var n=r(24027),i=r(85893),o=(0,n.I)({displayName:"EmailIcon",path:(0,i.jsxs)("g",{fill:"currentColor",children:[(0,i.jsx)("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),(0,i.jsx)("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})})},55409:function(e,t,r){"use strict";r.d(t,{L:function(){return s}});var n=r(36948),i=r(16554),o=r(67294),a=r(85893),s=(0,i.G)((e,t)=>{let r=(0,o.useId)();return(0,a.jsxs)(n.J,{ref:t,viewBox:"0 0 24 24",...e,children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:r,children:[(0,a.jsx)("stop",{stopColor:"currentColor",offset:"0%"}),(0,a.jsx)("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),(0,a.jsxs)("g",{transform:"translate(2)",fill:"none",children:[(0,a.jsx)("circle",{stroke:`url(#${r})`,strokeWidth:"4",cx:"10",cy:"12",r:"10"}),(0,a.jsx)("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})})},1702:function(e,t,r){"use strict";r.d(t,{h:function(){return m}});var n=r(695),i=r(26245),o=r(55227),a=r(73935),s=r(67294),l=r(85893),[u,c]=(0,o.k)({strict:!1,name:"PortalContext"}),d="chakra-portal",f=e=>(0,l.jsx)("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),p=e=>{let{appendToParentPortal:t,children:r}=e,[o,p]=(0,s.useState)(null),h=(0,s.useRef)(null),[,m]=(0,s.useState)({});(0,s.useEffect)(()=>m({}),[]);let g=c(),v=(0,n.L)();(0,i.G)(()=>{if(!o)return;let e=o.ownerDocument,r=t&&null!=g?g:e.body;if(!r)return;h.current=e.createElement("div"),h.current.className=d,r.appendChild(h.current),m({});let n=h.current;return()=>{r.contains(n)&&r.removeChild(n)}},[o]);let y=(null==v?void 0:v.zIndex)?(0,l.jsx)(f,{zIndex:null==v?void 0:v.zIndex,children:r}):r;return h.current?(0,a.createPortal)((0,l.jsx)(u,{value:h.current,children:y}),h.current):(0,l.jsx)("span",{ref:e=>{e&&p(e)}})},h=e=>{let{children:t,containerRef:r,appendToParentPortal:n}=e,o=r.current,c=null!=o?o:"undefined"!=typeof window?document.body:void 0,f=(0,s.useMemo)(()=>{let e=null==o?void 0:o.ownerDocument.createElement("div");return e&&(e.className=d),e},[o]),[,p]=(0,s.useState)({});return((0,i.G)(()=>p({}),[]),(0,i.G)(()=>{if(f&&c)return c.appendChild(f),()=>{c.removeChild(f)}},[f,c]),c&&f)?(0,a.createPortal)((0,l.jsx)(u,{value:n?f:null,children:t}),f):null};function m(e){let{containerRef:t,...r}={appendToParentPortal:!0,...e};return t?(0,l.jsx)(h,{containerRef:t,...r}):(0,l.jsx)(p,{...r})}m.className=d,m.selector=".chakra-portal",m.displayName="Portal"},695:function(e,t,r){"use strict";r.d(t,{L:function(){return a},h:function(){return s}});var n=r(55227),i=r(85893),[o,a]=(0,n.k)({strict:!1,name:"PortalManagerContext"});function s(e){let{children:t,zIndex:r}=e;return(0,i.jsx)(o,{value:{zIndex:r},children:t})}s.displayName="PortalManager"},55227:function(e,t,r){"use strict";r.d(t,{k:function(){return i}});var n=r(67294);function i(e={}){let{name:t,strict:r=!0,hookName:i="useContext",providerName:o="Provider",errorMessage:a,defaultValue:s}=e,l=(0,n.createContext)(s);return l.displayName=t,[l.Provider,function e(){var t;let s=(0,n.useContext)(l);if(!s&&r){let r=Error(null!=a?a:`${i} returned \`undefined\`. Seems you forgot to wrap component within ${o}`);throw r.name="ContextError",null==(t=Error.captureStackTrace)||t.call(Error,r,e),r}return s},l]}},35155:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=r(67294);function i(e,t=[]){let r=(0,n.useRef)(e);return(0,n.useEffect)(()=>{r.current=e}),(0,n.useCallback)((...e)=>{var t;return null==(t=r.current)?void 0:t.call(r,...e)},t)}},81103:function(e,t,r){"use strict";function n(...e){return t=>{e.forEach(e=>{!function(e,t){if(null!=e){if("function"==typeof e){e(t);return}try{e.current=t}catch(r){throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}}(e,t)})}}r.d(t,{lq:function(){return n}}),r(67294)},26245:function(e,t,r){"use strict";r.d(t,{G:function(){return i}});var n=r(67294),i=(null==globalThis?void 0:globalThis.document)?n.useLayoutEffect:n.useEffect},52366:function(e,t,r){"use strict";r.d(t,{r:function(){return i}});var n=r(67294);function i(e,t){let r=(0,n.useRef)(!1),i=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(r.current&&i.current)return e();i.current=!0},t),(0,n.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[])}},25432:function(e,t,r){"use strict";r.d(t,{Kn:function(){return i},PB:function(){return s},PP:function(){return c},Pu:function(){return o},Qm:function(){return l},cx:function(){return n},v0:function(){return u}});var n=(...e)=>e.filter(Boolean).join(" ");function i(e){let t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}function o(e,...t){return a(e)?e(...t):e}var a=e=>"function"==typeof e,s=e=>e?"":void 0,l=e=>!!e||void 0;function u(...e){return function(t){e.some(e=>(null==e||e(t),null==t?void 0:t.defaultPrevented))}}function c(...e){return function(t){e.forEach(e=>{null==e||e(t)})}}},35763:function(e,t,r){"use strict";r.d(t,{iR:function(){return et},Ms:function(){return ei},jz:function(){return eo},gs:function(){return er},Uj:function(){return en}});var n=e=>e?"":void 0,i=e=>!!e||void 0,o=(...e)=>e.filter(Boolean).join(" ");function a(...e){return function(t){e.some(e=>(null==e||e(t),null==t?void 0:t.defaultPrevented))}}function s(e){let{orientation:t,vertical:r,horizontal:n}=e;return"vertical"===t?r:n}var l={width:0,height:0},u=e=>e||l;function c(e,t="page"){return e.touches?function(e,t="page"){let r=e.touches[0]||e.changedTouches[0];return{x:r[`${t}X`],y:r[`${t}Y`]}}(e,t):function(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}(e,t)}function d(e,t,r,n){var i;return i=function(e,t=!1){function r(t){e(t,{point:c(t)})}return t?e=>{let t=function(e){var t;let r=null!=(t=e.view)?t:window;return void 0!==r.PointerEvent&&e instanceof r.PointerEvent?!("mouse"!==e.pointerType):e instanceof r.MouseEvent}(e);(!t||t&&0===e.button)&&r(e)}:r}(r,"pointerdown"===t),e.addEventListener(t,i,n),()=>{e.removeEventListener(t,i,n)}}let f=1/60*1e3,p="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),h="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(p()),f),m=!0,g=!1,v=!1,y={delta:0,timestamp:0},x=["read","update","preRender","render","postRender"],b=x.reduce((e,t)=>(e[t]=function(e){let t=[],r=[],n=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:r;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(n=t.length)),e},cancel:e=>{let t=r.indexOf(e);-1!==t&&r.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length)for(let r=0;r<n;r++){let n=t[r];n(l),a.has(n)&&(s.schedule(n),e())}i=!1,o&&(o=!1,s.process(l))}};return s}(()=>g=!0),e),{}),w=x.reduce((e,t)=>{let r=b[t];return e[t]=(e,t=!1,n=!1)=>(g||k(),r.schedule(e,t,n)),e},{}),_=x.reduce((e,t)=>(e[t]=b[t].cancel,e),{});x.reduce((e,t)=>(e[t]=()=>b[t].process(y),e),{});let j=e=>b[e].process(y),C=e=>{g=!1,y.delta=m?f:Math.max(Math.min(e-y.timestamp,40),1),y.timestamp=e,v=!0,x.forEach(j),v=!1,g&&(m=!1,h(C))},k=()=>{g=!0,m=!0,v||h(C)},E=()=>y;var S=Object.defineProperty,N=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t,r)=>(N(e,"symbol"!=typeof t?t+"":t,r),r),L=class{constructor(e,t,r){var n;if(P(this,"history",[]),P(this,"startEvent",null),P(this,"lastEvent",null),P(this,"lastEventInfo",null),P(this,"handlers",{}),P(this,"removeListeners",()=>{}),P(this,"threshold",3),P(this,"win"),P(this,"updatePoint",()=>{var e,t;if(!(this.lastEvent&&this.lastEventInfo))return;let r=O(this.lastEventInfo,this.history),n=null!==this.startEvent,i=(e=r.offset,t={x:0,y:0},(I(e)&&I(t)?Math.sqrt(A(e.x,t.x)**2+A(e.y,t.y)**2):0)>=this.threshold);if(!n&&!i)return;let{timestamp:o}=E();this.history.push({...r.point,timestamp:o});let{onStart:a,onMove:s}=this.handlers;n||(null==a||a(this.lastEvent,r),this.startEvent=this.lastEvent),null==s||s(this.lastEvent,r)}),P(this,"onPointerMove",(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,w.update(this.updatePoint,!0)}),P(this,"onPointerUp",(e,t)=>{let r=O(t,this.history),{onEnd:n,onSessionEnd:i}=this.handlers;null==i||i(e,r),this.end(),n&&this.startEvent&&(null==n||n(e,r))}),this.win=null!=(n=e.view)?n:window,e.touches&&e.touches.length>1)return;this.handlers=t,r&&(this.threshold=r),e.stopPropagation(),e.preventDefault();let i={point:c(e)},{timestamp:o}=E();this.history=[{...i.point,timestamp:o}];let{onSessionStart:a}=t;null==a||a(e,O(i,this.history)),this.removeListeners=function(...e){return t=>e.reduce((e,t)=>t(e),t)}(d(this.win,"pointermove",this.onPointerMove),d(this.win,"pointerup",this.onPointerUp),d(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;null==(e=this.removeListeners)||e.call(this),_.update(this.updatePoint)}};function T(e,t){return{x:e.x-t.x,y:e.y-t.y}}function O(e,t){return{point:e.point,delta:T(e.point,t[t.length-1]),offset:T(e.point,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,i=e[e.length-1];for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>R(.1)));)r--;if(!n)return{x:0,y:0};let o=(i.timestamp-n.timestamp)/1e3;if(0===o)return{x:0,y:0};let a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,0)}}var R=e=>1e3*e;function A(e,t){return Math.abs(e-t)}function I(e){return"x"in e&&"y"in e}var M=r(67294);function D(e){let t=(0,M.useRef)(null);return t.current=e,t}var F=r(35155),z=r(52366),B=(null==globalThis?void 0:globalThis.document)?M.useLayoutEffect:M.useEffect,U=r(81103);function V(e,t,r){return function(e,t){let r=function(e){let t=parseFloat(e);return"number"!=typeof t||Number.isNaN(t)?0:t}(e),n=10**(null!=t?t:10);return r=Math.round(r*n)/n,t?r.toFixed(t):r.toString()}(Math.round((e-t)/r)*r+t,function(e){if(!Number.isFinite(e))return 0;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r+=1;return r}(r))}function $(e,t,r){return null==e?e:(r<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),r))}var H=r(55227),Z=r(16554),W=r(27603),q=r(33179),G=r(48940),Y=r(16914),K=r(85893),[X,J]=(0,H.k)({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[Q,ee]=(0,H.k)({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),et=(0,Z.G)((e,t)=>{var r;let c={...e,orientation:null!=(r=null==e?void 0:e.orientation)?r:"horizontal"},f=(0,W.jC)("Slider",c),p=(0,q.Lr)(c),{direction:h}=(0,G.F)();p.direction=h;let{getInputProps:m,getRootProps:g,...v}=function(e){var t;let{min:r=0,max:o=100,onChange:c,value:f,defaultValue:p,isReversed:h,direction:m="ltr",orientation:g="horizontal",id:v,isDisabled:y,isReadOnly:x,onChangeStart:b,onChangeEnd:w,step:_=1,getAriaValueText:j,"aria-valuetext":C,"aria-label":k,"aria-labelledby":E,name:S,focusThumbOnChange:N=!0,...P}=e,T=(0,F.W)(b),O=(0,F.W)(w),R=(0,F.W)(j),A=function(e){let{isReversed:t,direction:r,orientation:n}=e;return"ltr"===r||"vertical"===n?t:!t}({isReversed:h,direction:m,orientation:g}),[I,H]=function(e){let{value:t,defaultValue:r,onChange:n,shouldUpdate:i=(e,t)=>e!==t}=e,o=(0,F.W)(n),a=(0,F.W)(i),[s,l]=(0,M.useState)(r),u=void 0!==t,c=u?t:s,d=(0,F.W)(e=>{let t="function"==typeof e?e(c):e;a(c,t)&&(u||l(t),o(t))},[u,o,c,a]);return[c,d]}({value:f,defaultValue:null!=p?p:o<r?r:r+(o-r)/2,onChange:c}),[Z,W]=(0,M.useState)(!1),[q,G]=(0,M.useState)(!1),Y=!(y||x),K=(o-r)/10,X=_||(o-r)/100,J=$(I,r,o),Q=o-J+r,ee=((A?Q:J)-r)*100/(o-r),et="vertical"===g,er=D({min:r,max:o,step:_,isDisabled:y,value:J,isInteractive:Y,isReversed:A,isVertical:et,eventSource:null,focusThumbOnChange:N,orientation:g}),en=(0,M.useRef)(null),ei=(0,M.useRef)(null),eo=(0,M.useRef)(null),ea=(0,M.useId)(),es=null!=v?v:ea,[el,eu]=[`slider-thumb-${es}`,`slider-track-${es}`],ec=(0,M.useCallback)(e=>{var t,r,n,i;if(!en.current)return;let o=er.current;o.eventSource="pointer";let a=en.current.getBoundingClientRect(),{clientX:s,clientY:l}=null!=(r=null==(t=e.touches)?void 0:t[0])?r:e,u=(et?a.bottom-l:s-a.left)/(et?a.height:a.width);A&&(u=1-u);let c=(n=u,i=o.min,(o.max-i)*n+i);return o.step&&(c=parseFloat(V(c,o.min,o.step))),c=$(c,o.min,o.max)},[et,A,er]),ed=(0,M.useCallback)(e=>{let t=er.current;t.isInteractive&&H(e=$(e=parseFloat(V(e,t.min,X)),t.min,t.max))},[X,H,er]),ef=(0,M.useMemo)(()=>({stepUp(e=X){ed(A?J-e:J+e)},stepDown(e=X){ed(A?J+e:J-e)},reset(){ed(p||0)},stepTo(e){ed(e)}}),[ed,A,J,X,p]),ep=(0,M.useCallback)(e=>{let t=er.current,r={ArrowRight:()=>ef.stepUp(),ArrowUp:()=>ef.stepUp(),ArrowLeft:()=>ef.stepDown(),ArrowDown:()=>ef.stepDown(),PageUp:()=>ef.stepUp(K),PageDown:()=>ef.stepDown(K),Home:()=>ed(t.min),End:()=>ed(t.max)}[e.key];r&&(e.preventDefault(),e.stopPropagation(),r(e),t.eventSource="keyboard")},[ef,ed,K,er]),eh=null!=(t=null==R?void 0:R(J))?t:C,em=function(e){let[t]=function({getNodes:e,observeMutation:t=!0}){let[r,n]=(0,M.useState)([]),[i,o]=(0,M.useState)(0);return B(()=>{let r=e(),i=r.map((e,t)=>(function(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});let r=new(e.ownerDocument.defaultView??window).ResizeObserver(r=>{let n,i;if(!Array.isArray(r)||!r.length)return;let[o]=r;if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;t({width:n,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)})(e,e=>{n(r=>[...r.slice(0,t),e,...r.slice(t+1)])}));if(t){let e=r[0];i.push(function(e,t){var r,n;if(!e||!e.parentElement)return;let i=new(null!=(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?n:window).MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}(e,()=>{o(e=>e+1)}))}return()=>{i.forEach(e=>{null==e||e()})}},[i]),r}({observeMutation:!1,getNodes:()=>["object"==typeof e&&null!==e&&"current"in e?e.current:e]});return t}(ei),{getThumbStyle:eg,rootStyle:ev,trackStyle:ey,innerTrackStyle:ex}=(0,M.useMemo)(()=>{let e=er.current,t=null!=em?em:{width:0,height:0};return function(e){let{orientation:t,thumbPercents:r,thumbRects:n,isReversed:i}=e,o="vertical"===t?n.reduce((e,t)=>u(e).height>u(t).height?e:t,l):n.reduce((e,t)=>u(e).width>u(t).width?e:t,l),a={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...s({orientation:t,vertical:o?{paddingLeft:o.width/2,paddingRight:o.width/2}:{},horizontal:o?{paddingTop:o.height/2,paddingBottom:o.height/2}:{}})},c={position:"absolute",...s({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},d=1===r.length,f=[0,i?100-r[0]:r[0]],p=d?f:r,h=p[0];!d&&i&&(h=100-h);let m=Math.abs(p[p.length-1]-p[0]),g={...c,...s({orientation:t,vertical:i?{height:`${m}%`,top:`${h}%`}:{height:`${m}%`,bottom:`${h}%`},horizontal:i?{width:`${m}%`,right:`${h}%`}:{width:`${m}%`,left:`${h}%`}})};return{trackStyle:c,innerTrackStyle:g,rootStyle:a,getThumbStyle:e=>{var i;let o=null!=(i=n[e])?i:l;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...s({orientation:t,vertical:{bottom:`calc(${r[e]}% - ${o.height/2}px)`},horizontal:{left:`calc(${r[e]}% - ${o.width/2}px)`}})}}}}({isReversed:A,orientation:e.orientation,thumbRects:[t],thumbPercents:[ee]})},[A,em,ee,er]),eb=(0,M.useCallback)(()=>{er.current.focusThumbOnChange&&setTimeout(()=>{var e;return null==(e=ei.current)?void 0:e.focus()})},[er]);function ew(e){let t=ec(e);null!=t&&t!==er.current.value&&H(t)}(0,z.r)(()=>{let e=er.current;eb(),"keyboard"===e.eventSource&&(null==O||O(e.value))},[J,O]),function(e,t){let{onPan:r,onPanStart:n,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=!!(r||n||i||o||a),u=(0,M.useRef)(null),c=D({onSessionStart:o,onSessionEnd:a,onStart:n,onMove:r,onEnd(e,t){u.current=null,null==i||i(e,t)}});(0,M.useEffect)(()=>{var e;null==(e=u.current)||e.updateHandlers(c.current)}),(0,M.useEffect)(()=>{let t=e.current;if(t&&l)return d(t,"pointerdown",function(e){u.current=new L(e,c.current,s)})},[e,l,c,s]),(0,M.useEffect)(()=>()=>{var e;null==(e=u.current)||e.end(),u.current=null},[])}(eo,{onPanSessionStart(e){let t=er.current;t.isInteractive&&(W(!0),eb(),ew(e),null==T||T(t.value))},onPanSessionEnd(){let e=er.current;e.isInteractive&&(W(!1),null==O||O(e.value))},onPan(e){er.current.isInteractive&&ew(e)}});let e_=(0,M.useCallback)((e={},t=null)=>({...e,...P,ref:(0,U.lq)(t,eo),tabIndex:-1,"aria-disabled":i(y),"data-focused":n(q),style:{...e.style,...ev}}),[P,y,q,ev]),ej=(0,M.useCallback)((e={},t=null)=>({...e,ref:(0,U.lq)(t,en),id:eu,"data-disabled":n(y),style:{...e.style,...ey}}),[y,eu,ey]),eC=(0,M.useCallback)((e={},t=null)=>({...e,ref:t,style:{...e.style,...ex}}),[ex]),ek=(0,M.useCallback)((e={},t=null)=>({...e,ref:(0,U.lq)(t,ei),role:"slider",tabIndex:Y?0:void 0,id:el,"data-active":n(Z),"aria-valuetext":eh,"aria-valuemin":r,"aria-valuemax":o,"aria-valuenow":J,"aria-orientation":g,"aria-disabled":i(y),"aria-readonly":i(x),"aria-label":k,"aria-labelledby":k?void 0:E,style:{...e.style,...eg(0)},onKeyDown:a(e.onKeyDown,ep),onFocus:a(e.onFocus,()=>G(!0)),onBlur:a(e.onBlur,()=>G(!1))}),[Y,el,Z,eh,r,o,J,g,y,x,k,E,eg,ep]),eE=(0,M.useCallback)((e,t=null)=>{let i=!(e.value<r||e.value>o),a=J>=e.value,s=(e.value-r)*100/(o-r),l={position:"absolute",pointerEvents:"none",...function(e){let{orientation:t,vertical:r,horizontal:n}=e;return"vertical"===t?r:n}({orientation:g,vertical:{bottom:A?`${100-s}%`:`${s}%`},horizontal:{left:A?`${100-s}%`:`${s}%`}})};return{...e,ref:t,role:"presentation","aria-hidden":!0,"data-disabled":n(y),"data-invalid":n(!i),"data-highlighted":n(a),style:{...e.style,...l}}},[y,A,o,r,g,J]),eS=(0,M.useCallback)((e={},t=null)=>({...e,ref:t,type:"hidden",value:J,name:S}),[S,J]);return{state:{value:J,isFocused:q,isDragging:Z},actions:ef,getRootProps:e_,getTrackProps:ej,getInnerTrackProps:eC,getThumbProps:ek,getMarkerProps:eE,getInputProps:eS}}(p),y=g(),x=m({},t);return(0,K.jsx)(X,{value:v,children:(0,K.jsx)(Q,{value:f,children:(0,K.jsxs)(Y.m.div,{...y,className:o("chakra-slider",c.className),__css:f.container,children:[c.children,(0,K.jsx)("input",{...x})]})})})});et.displayName="Slider";var er=(0,Z.G)((e,t)=>{let{getThumbProps:r}=J(),n=ee(),i=r(e,t);return(0,K.jsx)(Y.m.div,{...i,className:o("chakra-slider__thumb",e.className),__css:n.thumb})});er.displayName="SliderThumb";var en=(0,Z.G)((e,t)=>{let{getTrackProps:r}=J(),n=ee(),i=r(e,t);return(0,K.jsx)(Y.m.div,{...i,className:o("chakra-slider__track",e.className),__css:n.track})});en.displayName="SliderTrack";var ei=(0,Z.G)((e,t)=>{let{getInnerTrackProps:r}=J(),n=ee(),i=r(e,t);return(0,K.jsx)(Y.m.div,{...i,className:o("chakra-slider__filled-track",e.className),__css:n.filledTrack})});ei.displayName="SliderFilledTrack";var eo=(0,Z.G)((e,t)=>{let{getMarkerProps:r}=J(),n=ee(),i=r(e,t);return(0,K.jsx)(Y.m.div,{...i,className:o("chakra-slider__marker",e.className),__css:n.mark})});eo.displayName="SliderMark"},81136:function(e,t,r){"use strict";r.d(t,{$:function(){return d}});var n=r(70917),i=r(16554),o=r(27603),a=r(33179),s=r(16914),l=r(25432),u=r(85893),c=(0,n.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),d=(0,i.G)((e,t)=>{let r=(0,o.mq)("Spinner",e),{label:n="Loading...",thickness:i="2px",speed:d="0.45s",emptyColor:f="transparent",className:p,...h}=(0,a.Lr)(e),m=(0,l.cx)("chakra-spinner",p),g={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:f,borderLeftColor:f,animation:`${c} ${d} linear infinite`,...r};return(0,u.jsx)(s.m.div,{ref:t,__css:g,className:m,...h,children:n&&(0,u.jsx)(s.m.span,{srOnly:!0,children:n})})});d.displayName="Spinner"},33179:function(e,t,r){"use strict";r.d(t,{D:function(){return eD},K1:function(){return ez},Lr:function(){return eB},Ud:function(){return eF},ZR:function(){return eL},_6:function(){return er},c0:function(){return eE},cC:function(){return eN},fj:function(){return eM},gJ:function(){return et},iv:function(){return eA},k0:function(){return eI}});var n=r(25432),i=r(38554),o=e=>/!(important)?$/.test(e),a=e=>"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,s=(e,t)=>r=>{let i=String(t),s=o(i),l=a(i),u=e?`${e}.${l}`:l,c=(0,n.Kn)(r.__cssMap)&&u in r.__cssMap?r.__cssMap[u].varRef:t;return c=a(c),s?`${c} !important`:c};function l(e){let{scale:t,transform:r,compose:n}=e;return(e,i)=>{var o;let a=s(t,e)(i),l=null!=(o=null==r?void 0:r(a,i))?o:a;return n&&(l=n(l,i)),l}}var u=(...e)=>t=>e.reduce((e,t)=>t(e),t);function c(e,t){return r=>{let n={property:r,scale:e};return n.transform=l({scale:e,transform:t}),n}}var d=({rtl:e,ltr:t})=>r=>"rtl"===r.direction?e:t,f=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"],p={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:"var(--chakra-blur) var(--chakra-brightness) var(--chakra-contrast) var(--chakra-grayscale) var(--chakra-hue-rotate) var(--chakra-invert) var(--chakra-saturate) var(--chakra-sepia) var(--chakra-drop-shadow)"},h={backdropFilter:"var(--chakra-backdrop-blur) var(--chakra-backdrop-brightness) var(--chakra-backdrop-contrast) var(--chakra-backdrop-grayscale) var(--chakra-backdrop-hue-rotate) var(--chakra-backdrop-invert) var(--chakra-backdrop-opacity) var(--chakra-backdrop-saturate) var(--chakra-backdrop-sepia)","--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"},m={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},g={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},v=new Set(Object.values(g)),y=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),x=e=>e.trim(),b=e=>"string"==typeof e&&e.includes("(")&&e.includes(")"),w=e=>{let t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}},_=e=>t=>`${e}(${t})`,j={filter:e=>"auto"!==e?e:p,backdropFilter:e=>"auto"!==e?e:h,ring:e=>({"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":j.px(e),boxShadow:"var(--chakra-ring-offset-shadow), var(--chakra-ring-shadow), var(--chakra-shadow, 0 0 #0000)"}),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...f].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...f].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;let{unitless:t}=w(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:`${100*e}%`,float:(e,t)=>"rtl"===t.direction?({left:"right",right:"left"})[e]:e,degree(e){if(/^var\(--.+\)$/.test(e)||null==e)return e;let t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>(function(e,t){if(null==e||y.has(e))return e;if(!(b(e)||y.has(e)))return`url('${e}')`;let r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),n=null==r?void 0:r[1],i=null==r?void 0:r[2];if(!n||!i)return e;let o=n.includes("-gradient")?n:`${n}-gradient`,[a,...s]=i.split(",").map(x).filter(Boolean);if((null==s?void 0:s.length)===0)return e;let l=a in g?g[a]:a;s.unshift(l);let u=s.map(e=>{if(v.has(e))return e;let r=e.indexOf(" "),[n,i]=-1!==r?[e.substr(0,r),e.substr(r+1)]:[e],o=b(i)?i:i&&i.split(" "),a=`colors.${n}`,s=a in t.__cssMap?t.__cssMap[a].varRef:n;return o?[s,...Array.isArray(o)?o:[o]].join(" "):s});return`${o}(${u.join(", ")})`})(e,null!=t?t:{}),blur:_("blur"),opacity:_("opacity"),brightness:_("brightness"),contrast:_("contrast"),dropShadow:_("drop-shadow"),grayscale:_("grayscale"),hueRotate:e=>_("hue-rotate")(j.degree(e)),invert:_("invert"),saturate:_("saturate"),sepia:_("sepia"),bgImage:e=>null==e?e:b(e)||y.has(e)?e:`url(${e})`,outline(e){let t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;let{space:r,divide:n}=null!=(t=m[e])?t:{},i={flexDirection:e};return r&&(i[r]=1),n&&(i[n]=1),i}},C={borderWidths:c("borderWidths"),borderStyles:c("borderStyles"),colors:c("colors"),borders:c("borders"),gradients:c("gradients",j.gradient),radii:c("radii",j.px),space:c("space",u(j.vh,j.px)),spaceT:c("space",u(j.vh,j.px)),degreeT:e=>({property:e,transform:j.degree}),prop:(e,t,r)=>({property:e,scale:t,...t&&{transform:l({scale:t,transform:r})}}),propT:(e,t)=>({property:e,transform:t}),sizes:c("sizes",u(j.vh,j.px)),sizesT:c("sizes",u(j.vh,j.fraction)),shadows:c("shadows"),logical:function(e){let{property:t,scale:r,transform:n}=e;return{scale:r,property:d(t),transform:r?l({scale:r,compose:n}):n}},blur:c("blur",j.blur)},k={background:C.colors("background"),backgroundColor:C.colors("backgroundColor"),backgroundImage:C.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:j.bgClip},bgSize:C.prop("backgroundSize"),bgPosition:C.prop("backgroundPosition"),bg:C.colors("background"),bgColor:C.colors("backgroundColor"),bgPos:C.prop("backgroundPosition"),bgRepeat:C.prop("backgroundRepeat"),bgAttachment:C.prop("backgroundAttachment"),bgGradient:C.gradients("backgroundImage"),bgClip:{transform:j.bgClip}};Object.assign(k,{bgImage:k.backgroundImage,bgImg:k.backgroundImage});var E={border:C.borders("border"),borderWidth:C.borderWidths("borderWidth"),borderStyle:C.borderStyles("borderStyle"),borderColor:C.colors("borderColor"),borderRadius:C.radii("borderRadius"),borderTop:C.borders("borderTop"),borderBlockStart:C.borders("borderBlockStart"),borderTopLeftRadius:C.radii("borderTopLeftRadius"),borderStartStartRadius:C.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:C.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:C.radii("borderTopRightRadius"),borderStartEndRadius:C.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:C.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:C.borders("borderRight"),borderInlineEnd:C.borders("borderInlineEnd"),borderBottom:C.borders("borderBottom"),borderBlockEnd:C.borders("borderBlockEnd"),borderBottomLeftRadius:C.radii("borderBottomLeftRadius"),borderBottomRightRadius:C.radii("borderBottomRightRadius"),borderLeft:C.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:C.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:C.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:C.borders(["borderLeft","borderRight"]),borderInline:C.borders("borderInline"),borderY:C.borders(["borderTop","borderBottom"]),borderBlock:C.borders("borderBlock"),borderTopWidth:C.borderWidths("borderTopWidth"),borderBlockStartWidth:C.borderWidths("borderBlockStartWidth"),borderTopColor:C.colors("borderTopColor"),borderBlockStartColor:C.colors("borderBlockStartColor"),borderTopStyle:C.borderStyles("borderTopStyle"),borderBlockStartStyle:C.borderStyles("borderBlockStartStyle"),borderBottomWidth:C.borderWidths("borderBottomWidth"),borderBlockEndWidth:C.borderWidths("borderBlockEndWidth"),borderBottomColor:C.colors("borderBottomColor"),borderBlockEndColor:C.colors("borderBlockEndColor"),borderBottomStyle:C.borderStyles("borderBottomStyle"),borderBlockEndStyle:C.borderStyles("borderBlockEndStyle"),borderLeftWidth:C.borderWidths("borderLeftWidth"),borderInlineStartWidth:C.borderWidths("borderInlineStartWidth"),borderLeftColor:C.colors("borderLeftColor"),borderInlineStartColor:C.colors("borderInlineStartColor"),borderLeftStyle:C.borderStyles("borderLeftStyle"),borderInlineStartStyle:C.borderStyles("borderInlineStartStyle"),borderRightWidth:C.borderWidths("borderRightWidth"),borderInlineEndWidth:C.borderWidths("borderInlineEndWidth"),borderRightColor:C.colors("borderRightColor"),borderInlineEndColor:C.colors("borderInlineEndColor"),borderRightStyle:C.borderStyles("borderRightStyle"),borderInlineEndStyle:C.borderStyles("borderInlineEndStyle"),borderTopRadius:C.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:C.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:C.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:C.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(E,{rounded:E.borderRadius,roundedTop:E.borderTopRadius,roundedTopLeft:E.borderTopLeftRadius,roundedTopRight:E.borderTopRightRadius,roundedTopStart:E.borderStartStartRadius,roundedTopEnd:E.borderStartEndRadius,roundedBottom:E.borderBottomRadius,roundedBottomLeft:E.borderBottomLeftRadius,roundedBottomRight:E.borderBottomRightRadius,roundedBottomStart:E.borderEndStartRadius,roundedBottomEnd:E.borderEndEndRadius,roundedLeft:E.borderLeftRadius,roundedRight:E.borderRightRadius,roundedStart:E.borderInlineStartRadius,roundedEnd:E.borderInlineEndRadius,borderStart:E.borderInlineStart,borderEnd:E.borderInlineEnd,borderTopStartRadius:E.borderStartStartRadius,borderTopEndRadius:E.borderStartEndRadius,borderBottomStartRadius:E.borderEndStartRadius,borderBottomEndRadius:E.borderEndEndRadius,borderStartRadius:E.borderInlineStartRadius,borderEndRadius:E.borderInlineEndRadius,borderStartWidth:E.borderInlineStartWidth,borderEndWidth:E.borderInlineEndWidth,borderStartColor:E.borderInlineStartColor,borderEndColor:E.borderInlineEndColor,borderStartStyle:E.borderInlineStartStyle,borderEndStyle:E.borderInlineEndStyle});var S={color:C.colors("color"),textColor:C.colors("color"),fill:C.colors("fill"),stroke:C.colors("stroke")},N={boxShadow:C.shadows("boxShadow"),mixBlendMode:!0,blendMode:C.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:C.prop("backgroundBlendMode"),opacity:!0};Object.assign(N,{shadow:N.boxShadow});var P={filter:{transform:j.filter},blur:C.blur("--chakra-blur"),brightness:C.propT("--chakra-brightness",j.brightness),contrast:C.propT("--chakra-contrast",j.contrast),hueRotate:C.propT("--chakra-hue-rotate",j.hueRotate),invert:C.propT("--chakra-invert",j.invert),saturate:C.propT("--chakra-saturate",j.saturate),dropShadow:C.propT("--chakra-drop-shadow",j.dropShadow),backdropFilter:{transform:j.backdropFilter},backdropBlur:C.blur("--chakra-backdrop-blur"),backdropBrightness:C.propT("--chakra-backdrop-brightness",j.brightness),backdropContrast:C.propT("--chakra-backdrop-contrast",j.contrast),backdropHueRotate:C.propT("--chakra-backdrop-hue-rotate",j.hueRotate),backdropInvert:C.propT("--chakra-backdrop-invert",j.invert),backdropSaturate:C.propT("--chakra-backdrop-saturate",j.saturate)},L={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:j.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:C.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:C.space("gap"),rowGap:C.space("rowGap"),columnGap:C.space("columnGap")};Object.assign(L,{flexDir:L.flexDirection});var T={gridGap:C.space("gridGap"),gridColumnGap:C.space("gridColumnGap"),gridRowGap:C.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},O={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:j.outline},outlineOffset:!0,outlineColor:C.colors("outlineColor")},R={width:C.sizesT("width"),inlineSize:C.sizesT("inlineSize"),height:C.sizes("height"),blockSize:C.sizes("blockSize"),boxSize:C.sizes(["width","height"]),minWidth:C.sizes("minWidth"),minInlineSize:C.sizes("minInlineSize"),minHeight:C.sizes("minHeight"),minBlockSize:C.sizes("minBlockSize"),maxWidth:C.sizes("maxWidth"),maxInlineSize:C.sizes("maxInlineSize"),maxHeight:C.sizes("maxHeight"),maxBlockSize:C.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var r,n,i;let o=null!=(i=null==(n=null==(r=t.__breakpoints)?void 0:r.get(e))?void 0:n.minW)?i:e;return{[`@media screen and (min-width: ${o})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var r,n,i;let o=null!=(i=null==(n=null==(r=t.__breakpoints)?void 0:r.get(e))?void 0:n._minW)?i:e;return{[`@media screen and (max-width: ${o})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:C.propT("float",j.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(R,{w:R.width,h:R.height,minW:R.minWidth,maxW:R.maxWidth,minH:R.minHeight,maxH:R.maxHeight,overscroll:R.overscrollBehavior,overscrollX:R.overscrollBehaviorX,overscrollY:R.overscrollBehaviorY});var A={listStyleType:!0,listStylePosition:!0,listStylePos:C.prop("listStylePosition"),listStyleImage:!0,listStyleImg:C.prop("listStyleImage")},I=(e=>{let t=new WeakMap;return(r,n,i,o)=>{if(void 0===r)return e(r,n,i);t.has(r)||t.set(r,new Map);let a=t.get(r);if(a.has(n))return a.get(n);let s=e(r,n,i,o);return a.set(n,s),s}})(function(e,t,r,n){let i="string"==typeof t?t.split("."):[t];for(n=0;n<i.length&&e;n+=1)e=e[i[n]];return void 0===e?r:e}),M={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},D={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},F=(e,t,r)=>{let n={},i=I(e,t,{});for(let e in i)e in r&&null!=r[e]||(n[e]=i[e]);return n},z={position:!0,pos:C.prop("position"),zIndex:C.prop("zIndex","zIndices"),inset:C.spaceT("inset"),insetX:C.spaceT(["left","right"]),insetInline:C.spaceT("insetInline"),insetY:C.spaceT(["top","bottom"]),insetBlock:C.spaceT("insetBlock"),top:C.spaceT("top"),insetBlockStart:C.spaceT("insetBlockStart"),bottom:C.spaceT("bottom"),insetBlockEnd:C.spaceT("insetBlockEnd"),left:C.spaceT("left"),insetInlineStart:C.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:C.spaceT("right"),insetInlineEnd:C.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(z,{insetStart:z.insetInlineStart,insetEnd:z.insetInlineEnd});var B={ring:{transform:j.ring},ringColor:C.colors("--chakra-ring-color"),ringOffset:C.prop("--chakra-ring-offset-width"),ringOffsetColor:C.colors("--chakra-ring-offset-color"),ringInset:C.prop("--chakra-ring-inset")},U={margin:C.spaceT("margin"),marginTop:C.spaceT("marginTop"),marginBlockStart:C.spaceT("marginBlockStart"),marginRight:C.spaceT("marginRight"),marginInlineEnd:C.spaceT("marginInlineEnd"),marginBottom:C.spaceT("marginBottom"),marginBlockEnd:C.spaceT("marginBlockEnd"),marginLeft:C.spaceT("marginLeft"),marginInlineStart:C.spaceT("marginInlineStart"),marginX:C.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:C.spaceT("marginInline"),marginY:C.spaceT(["marginTop","marginBottom"]),marginBlock:C.spaceT("marginBlock"),padding:C.space("padding"),paddingTop:C.space("paddingTop"),paddingBlockStart:C.space("paddingBlockStart"),paddingRight:C.space("paddingRight"),paddingBottom:C.space("paddingBottom"),paddingBlockEnd:C.space("paddingBlockEnd"),paddingLeft:C.space("paddingLeft"),paddingInlineStart:C.space("paddingInlineStart"),paddingInlineEnd:C.space("paddingInlineEnd"),paddingX:C.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:C.space("paddingInline"),paddingY:C.space(["paddingTop","paddingBottom"]),paddingBlock:C.space("paddingBlock")};Object.assign(U,{m:U.margin,mt:U.marginTop,mr:U.marginRight,me:U.marginInlineEnd,marginEnd:U.marginInlineEnd,mb:U.marginBottom,ml:U.marginLeft,ms:U.marginInlineStart,marginStart:U.marginInlineStart,mx:U.marginX,my:U.marginY,p:U.padding,pt:U.paddingTop,py:U.paddingY,px:U.paddingX,pb:U.paddingBottom,pl:U.paddingLeft,ps:U.paddingInlineStart,paddingStart:U.paddingInlineStart,pr:U.paddingRight,pe:U.paddingInlineEnd,paddingEnd:U.paddingInlineEnd});var V={textDecorationColor:C.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:C.shadows("textShadow")},$={clipPath:!0,transform:C.propT("transform",j.transform),transformOrigin:!0,translateX:C.spaceT("--chakra-translate-x"),translateY:C.spaceT("--chakra-translate-y"),skewX:C.degreeT("--chakra-skew-x"),skewY:C.degreeT("--chakra-skew-y"),scaleX:C.prop("--chakra-scale-x"),scaleY:C.prop("--chakra-scale-y"),scale:C.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:C.degreeT("--chakra-rotate")},H={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:C.prop("transitionDuration","transition.duration"),transitionProperty:C.prop("transitionProperty","transition.property"),transitionTimingFunction:C.prop("transitionTimingFunction","transition.easing")},Z={fontFamily:C.prop("fontFamily","fonts"),fontSize:C.prop("fontSize","fontSizes",j.px),fontWeight:C.prop("fontWeight","fontWeights"),lineHeight:C.prop("lineHeight","lineHeights"),letterSpacing:C.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},W={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:C.spaceT("scrollMargin"),scrollMarginTop:C.spaceT("scrollMarginTop"),scrollMarginBottom:C.spaceT("scrollMarginBottom"),scrollMarginLeft:C.spaceT("scrollMarginLeft"),scrollMarginRight:C.spaceT("scrollMarginRight"),scrollMarginX:C.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:C.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:C.spaceT("scrollPadding"),scrollPaddingTop:C.spaceT("scrollPaddingTop"),scrollPaddingBottom:C.spaceT("scrollPaddingBottom"),scrollPaddingLeft:C.spaceT("scrollPaddingLeft"),scrollPaddingRight:C.spaceT("scrollPaddingRight"),scrollPaddingX:C.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:C.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function q(e){return(0,n.Kn)(e)&&e.reference?e.reference:String(e)}var G=(e,...t)=>t.map(q).join(` ${e} `).replace(/calc/g,""),Y=(...e)=>`calc(${G("+",...e)})`,K=(...e)=>`calc(${G("-",...e)})`,X=(...e)=>`calc(${G("*",...e)})`,J=(...e)=>`calc(${G("/",...e)})`,Q=e=>{let t=q(e);return null==t||Number.isNaN(parseFloat(t))?X(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},ee=Object.assign(e=>({add:(...t)=>ee(Y(e,...t)),subtract:(...t)=>ee(K(e,...t)),multiply:(...t)=>ee(X(e,...t)),divide:(...t)=>ee(J(e,...t)),negate:()=>ee(Q(e)),toString:()=>e.toString()}),{add:Y,subtract:K,multiply:X,divide:J,negate:Q});function et(e,t,r){let n=function(e,t=""){var r;return((r=function(e,t="-"){return e.replace(/\s+/g,t)}(`--${(function(e,t=""){return[t,e].filter(Boolean).join("-")})(e,t)}`.toString())).includes("\\.")?r:Number.isInteger(parseFloat(r.toString()))?r:r.replace(".","\\.")).replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}(e,r);return{variable:n,reference:`var(${n}${t?`, ${t}`:""})`}}function er(e,t){let r={};for(let n of t){if(Array.isArray(n)){let[t,i]=n;r[t]=et(`${e}-${t}`,i);continue}r[n]=et(`${e}-${n}`)}return r}function en(e){if(null==e)return e;let{unitless:t}=function(e){let t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}}(e);return t||"number"==typeof e?`${e}px`:e}var ei=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,eo=e=>Object.fromEntries(Object.entries(e).sort(ei));function ea(e){let t=eo(e);return Object.assign(Object.values(t),t)}function es(e){var t;return e?"number"==typeof(e=null!=(t=en(e))?t:e)?`${e+-.02}`:e.replace(/(\d+\.?\d*)/u,e=>`${parseFloat(e)+-.02}`):e}function el(e,t){let r=["@media screen"];return e&&r.push("and",`(min-width: ${en(e)})`),t&&r.push("and",`(max-width: ${en(t)})`),r.join(" ")}var eu=(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,ec=(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,ed=(e,t)=>`${e}:focus-visible ${t}`,ef=(e,t)=>`${e}:focus-within ${t}`,ep=(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,eh=(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,em=(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,eg=(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,ev=e=>ex(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ey=e=>ex(t=>e(t,"~ &"),"[data-peer]",".peer"),ex=(e,...t)=>t.map(e).join(", "),eb={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:ev(eu),_peerHover:ey(eu),_groupFocus:ev(ec),_peerFocus:ey(ec),_groupFocusVisible:ev(ed),_peerFocusVisible:ey(ed),_groupActive:ev(ep),_peerActive:ey(ep),_groupDisabled:ev(eh),_peerDisabled:ey(eh),_groupInvalid:ev(em),_peerInvalid:ey(em),_groupChecked:ev(eg),_peerChecked:ey(eg),_groupFocusWithin:ev(ef),_peerFocusWithin:ey(ef),_peerPlaceholderShown:ey((e,t)=>`${e}:placeholder-shown ${t}`),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},ew=Object.keys(eb);function e_(e,t){return et(String(e).replace(/\./g,"-"),void 0,t)}function ej(e,t,r={}){let{stop:n,getKey:i}=r;return function e(r,o=[]){var a;if("object"==typeof r&&null!=r&&!Array.isArray(r)||Array.isArray(r)){let s={};for(let[l,u]of Object.entries(r)){let c=null!=(a=null==i?void 0:i(l))?a:l,d=[...o,c];if(null==n?void 0:n(r,d))return t(r,o);s[c]=e(u,d)}return s}return t(r,o)}(e)}var eC=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"],ek=e=>ew.includes(e)||"default"===e;function eE(e){var t;let r=function(e){let{__cssMap:t,__cssVars:r,__breakpoints:n,...i}=e;return i}(e),{cssMap:o,cssVars:a}=function(e,t){let r={},o={};for(let[a,s]of Object.entries(e)){let{isSemantic:l,value:u}=s,{variable:c,reference:d}=e_(a,null==t?void 0:t.cssVarPrefix);if(!l){if(a.startsWith("space")){let[e,...t]=a.split("."),r=`${e}.-${t.join(".")}`,n=ee.negate(u),i=ee.negate(d);o[r]={value:n,var:c,varRef:i}}r[c]=u,o[a]={value:u,var:c,varRef:d};continue}let f=r=>{let n=[String(a).split(".")[0],r].join(".");if(!e[n])return r;let{reference:i}=e_(n,null==t?void 0:t.cssVarPrefix);return i};r=i(r,Object.entries((0,n.Kn)(u)?u:{default:u}).reduce((e,[t,r])=>{var n;if(!r)return e;let i=f(`${r}`);return"default"===t?e[c]=i:e[null!=(n=null==eb?void 0:eb[t])?n:t]={[c]:i},e},{})),o[a]={value:d,var:c,varRef:d}}return{cssVars:r,cssMap:o}}(function({tokens:e,semanticTokens:t}){let r={};return ej(e,(e,t)=>{null!=e&&(r[t.join(".")]={isSemantic:!1,value:e})}),ej(t,(e,t)=>{null!=e&&(r[t.join(".")]={isSemantic:!0,value:e})},{stop:e=>Object.keys(e).every(ek)}),r}({tokens:function(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}(r,eC),semanticTokens:r.semanticTokens}),{cssVarPrefix:null==(t=r.config)?void 0:t.cssVarPrefix});return Object.assign(r,{__cssVars:{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0",...a},__cssMap:o,__breakpoints:function(e){var t;if(!e)return null;e.base=null!=(t=e.base)?t:"0px";let r=ea(e),i=Object.entries(e).sort(ei).map(([e,t],r,n)=>{var i;let[,o]=null!=(i=n[r+1])?i:[];return o=parseFloat(o)>0?es(o):void 0,{_minW:es(t),breakpoint:e,minW:t,maxW:o,maxWQuery:el(null,o),minWQuery:el(t),minMaxQuery:el(t,o)}}),o=new Set(Object.keys(eo(e))),a=Array.from(o.values());return{keys:o,normalized:r,isResponsive(e){let t=Object.keys(e);return t.length>0&&t.every(e=>o.has(e))},asObject:eo(e),asArray:ea(e),details:i,get:e=>i.find(t=>t.breakpoint===e),media:[null,...r.map(e=>el(e)).slice(1)],toArrayValue(e){if(!(0,n.Kn)(e))throw Error("toArrayValue: value must be an object");let t=a.map(t=>{var r;return null!=(r=e[t])?r:null});for(;null===function(e){let t=null==e?0:e.length;return t?e[t-1]:void 0}(t);)t.pop();return t},toObjectValue(e){if(!Array.isArray(e))throw Error("toObjectValue: value must be an array");return e.reduce((e,t,r)=>{let n=a[r];return null!=n&&null!=t&&(e[n]=t),e},{})}}}(r.breakpoints)}),r}var eS=i({},k,E,S,L,R,P,B,O,T,{srOnly:{transform:e=>!0===e?M:"focusable"===e?D:{}},layerStyle:{processResult:!0,transform:(e,t,r)=>F(t,`layerStyles.${e}`,r)},textStyle:{processResult:!0,transform:(e,t,r)=>F(t,`textStyles.${e}`,r)},apply:{processResult:!0,transform:(e,t,r)=>F(t,e,r)}},z,N,U,W,Z,V,$,A,H);Object.keys(Object.assign({},U,R,L,T,z));var eN=[...Object.keys(eS),...ew],eP={...eS,...eb},eL=e=>e in eP,eT=e=>t=>{if(!t.__breakpoints)return e;let{isResponsive:r,toArrayValue:i,media:o}=t.__breakpoints,a={};for(let s in e){let l=(0,n.Pu)(e[s],t);if(null==l)continue;if(!Array.isArray(l=(0,n.Kn)(l)&&r(l)?i(l):l)){a[s]=l;continue}let u=l.slice(0,o.length).length;for(let e=0;e<u;e+=1){let t=null==o?void 0:o[e];if(!t){a[s]=l[e];continue}a[t]=a[t]||{},null!=l[e]&&(a[t][s]=l[e])}}return a},eO=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!/^var\(--.+\)$/.test(t),eR=(e,t)=>{var r,n;if(null==t)return t;let i=t=>{var r,n;return null==(n=null==(r=e.__cssMap)?void 0:r[t])?void 0:n.varRef},o=e=>{var t;return null!=(t=i(e))?t:e},[a,s]=function(e){let t=[],r="",n=!1;for(let i=0;i<e.length;i++){let o=e[i];"("===o?(n=!0,r+=o):")"===o?(n=!1,r+=o):","!==o||n?r+=o:(t.push(r),r="")}return(r=r.trim())&&t.push(r),t}(t);return t=null!=(n=null!=(r=i(a))?r:o(s))?n:o(t)},eA=e=>t=>(function(e){let{configs:t={},pseudos:r={},theme:o}=e,a=(e,s=!1)=>{var l,u,c;let d=(0,n.Pu)(e,o),f=eT(d)(o),p={};for(let e in f){let h=f[e],m=(0,n.Pu)(h,o);e in r&&(e=r[e]),eO(e,m)&&(m=eR(o,m));let g=t[e];if(!0===g&&(g={property:e}),(0,n.Kn)(m)){p[e]=null!=(l=p[e])?l:{},p[e]=i({},p[e],a(m,!0));continue}let v=null!=(c=null==(u=null==g?void 0:g.transform)?void 0:u.call(g,m,o,d))?c:m;v=(null==g?void 0:g.processResult)?a(v,!0):v;let y=(0,n.Pu)(null==g?void 0:g.property,o);if(!s&&(null==g?void 0:g.static)&&(p=i({},p,(0,n.Pu)(g.static,o))),y&&Array.isArray(y)){for(let e of y)p[e]=v;continue}if(y){"&"===y&&(0,n.Kn)(v)?p=i({},p,v):p[y]=v;continue}if((0,n.Kn)(v)){p=i({},p,v);continue}p[e]=v}return p};return a})({theme:t,pseudos:eb,configs:eS})(e);function eI(e){return e}function eM(e){return e}function eD(e){return{definePartsStyle:e=>e,defineMultiStyleConfig:t=>({parts:e,...t})}}function eF(e){return t=>{var r;let{variant:o,size:a,theme:s}=t,l=function(e){let t=e.__breakpoints;return function(e,r,o,a){var s,l,u;if(!t)return;let c={},d=(u=t.toArrayValue,Array.isArray(o)?o:(0,n.Kn)(o)?u(o):null!=o?[o]:void 0);if(!d)return c;let f=d.length,p=1===f,h=!!e.parts;for(let o=0;o<f;o++){let u=t.details[o],f=t.details[function(e,t){for(let r=t+1;r<e.length;r++)if(null!=e[r])return r;return -1}(d,o)],m=el(u.minW,null==f?void 0:f._minW),g=(0,n.Pu)(null==(s=e[r])?void 0:s[d[o]],a);if(g){if(h){null==(l=e.parts)||l.forEach(e=>{i(c,{[e]:p?g[e]:{[m]:g[e]}})});continue}if(!h){p?i(c,g):c[m]=g;continue}c[m]=g}}return c}}(s);return i({},(0,n.Pu)(null!=(r=e.baseStyle)?r:{},t),l(e,"sizes",a,t),l(e,"variants",o,t))}}function ez(e,t,r){var n,i,o;return null!=(o=null==(i=null==(n=e.__cssMap)?void 0:n[`${t}.${r}`])?void 0:i.varRef)?o:r}function eB(e){return function(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}(e,["styleConfig","size","variant","colorScheme"])}},22797:function(e,t,r){"use strict";r.d(t,{r:function(){return d}});var n=r(16713),i=r(25432),o=r(16554),a=r(27603),s=r(33179),l=r(16914),u=r(67294),c=r(85893),d=(0,o.G)(function(e,t){let r=(0,a.jC)("Switch",e),{spacing:o="0.5rem",children:d,...f}=(0,s.Lr)(e),{getIndicatorProps:p,getInputProps:h,getCheckboxProps:m,getRootProps:g,getLabelProps:v}=(0,n.O)(f),y=(0,u.useMemo)(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),x=(0,u.useMemo)(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),b=(0,u.useMemo)(()=>({userSelect:"none",marginStart:o,...r.label}),[o,r.label]);return(0,c.jsxs)(l.m.label,{...g(),className:(0,i.cx)("chakra-switch",e.className),__css:y,children:[(0,c.jsx)("input",{className:"chakra-switch__input",...h({},t)}),(0,c.jsx)(l.m.span,{...m(),className:"chakra-switch__track",__css:x,children:(0,c.jsx)(l.m.span,{__css:r.thumb,className:"chakra-switch__thumb",...p()})}),d&&(0,c.jsx)(l.m.span,{className:"chakra-switch__label",...v(),__css:b,children:d})]})});d.displayName="Switch"},27603:function(e,t,r){"use strict";r.d(t,{jC:function(){return f},mq:function(){return d}});var n=r(48940),i=r(45161),o=r(33179),a=r(21759),s=r(38554),l=r(67294),u=r(69590);function c(e,t={}){var r;let{styleConfig:c,...d}=t,{theme:f,colorMode:p}=function(){let e=(0,i.If)(),t=(0,n.F)();return{...e,theme:t}}(),h=e?(0,a.Wf)(f,`components.${e}`):void 0,m=c||h,g=s({theme:f,colorMode:p},null!=(r=null==m?void 0:m.defaultProps)?r:{},(0,a.YU)((0,a.CE)(d,["children"]))),v=(0,l.useRef)({});if(m){let e=(0,o.Ud)(m)(g);u(v.current,e)||(v.current=e)}return v.current}function d(e,t={}){return c(e,t)}function f(e,t={}){return c(e,t)}},48940:function(e,t,r){"use strict";r.d(t,{F:function(){return o}});var n=r(76330),i=r(67294);function o(){let e=(0,i.useContext)(n.T);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}},16914:function(e,t,r){"use strict";r.d(t,{m:function(){return N}});var n,i=r(33179),o=new Set([...i.cC,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),a=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function s(e){return a.has(e)||!o.has(e)}var l=r(45161),u=r(21759),c=r(36597),d=r(87462),f=r(67294),p=r(45042),h=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,m=(0,p.Z)(function(e){return h.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),g=r(76330),v=r(70444),y=r(48137),x=r(27278),b=function(e){return"theme"!==e},w=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?m:b},_=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},j=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,v.hC)(t,r,n),(0,x.L)(function(){return(0,v.My)(t,r,n)}),null},C=(function e(t,r){var n,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==r&&(n=r.label,i=r.target);var s=_(t,r,o),l=s||w(a),u=!l("as");return function(){var c=arguments,p=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&p.push("label:"+n+";"),null==c[0]||void 0===c[0].raw)p.push.apply(p,c);else{p.push(c[0][0]);for(var h=c.length,m=1;m<h;m++)p.push(c[m],c[0][m])}var x=(0,g.w)(function(e,t,r){var n=u&&e.as||a,o="",c=[],d=e;if(null==e.theme){for(var h in d={},e)d[h]=e[h];d.theme=f.useContext(g.T)}"string"==typeof e.className?o=(0,v.fp)(t.registered,c,e.className):null!=e.className&&(o=e.className+" ");var m=(0,y.O)(p.concat(c),t.registered,d);o+=t.key+"-"+m.name,void 0!==i&&(o+=" "+i);var x=u&&void 0===s?w(n):l,b={};for(var _ in e)(!u||"as"!==_)&&x(_)&&(b[_]=e[_]);return b.className=o,b.ref=r,f.createElement(f.Fragment,null,f.createElement(j,{cache:t,serialized:m,isStringTag:"string"==typeof n}),f.createElement(n,b))});return x.displayName=void 0!==n?n:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",x.defaultProps=t.defaultProps,x.__emotion_real=x,x.__emotion_base=a,x.__emotion_styles=p,x.__emotion_forwardProp=s,Object.defineProperty(x,"toString",{value:function(){return"."+i}}),x.withComponent=function(t,n){return e(t,(0,d.Z)({},r,n,{shouldForwardProp:_(x,n,!0)})).apply(void 0,p)},x}}).bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){C[e]=C(e)});var k=null!=(n=C.default)?n:C,E=({baseStyle:e})=>t=>{let{theme:r,css:n,__css:o,sx:a,...s}=t,l=(0,u.lw)(s,(e,t)=>(0,i.ZR)(t)),d=function(e,...t){if(null==e)throw TypeError("Cannot convert undefined or null to object");let r={...e};for(let e of t)if(null!=e)for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(t in r&&delete r[t],r[t]=e[t]);return r}({},o,(0,c.Pu)(e,t),(0,u.YU)(l),a),f=(0,i.iv)(d)(t.theme);return n?[f,n]:f};function S(e,t){let{baseStyle:r,...n}=null!=t?t:{};n.shouldForwardProp||(n.shouldForwardProp=s);let i=E({baseStyle:r}),o=k(e,n)(i);return f.forwardRef(function(e,t){let{colorMode:r,forced:n}=(0,l.If)();return f.createElement(o,{ref:t,"data-theme":n?r:void 0,...e})})}var N=function(){let e=new Map;return new Proxy(S,{apply:(e,t,r)=>S(...r),get:(t,r)=>(e.has(r)||e.set(r,S(r)),e.get(r))})}()},16554:function(e,t,r){"use strict";r.d(t,{G:function(){return i}});var n=r(67294);function i(e){return(0,n.forwardRef)(e)}},94670:function(e,t,r){"use strict";r.d(t,{u:function(){return eH}});var n,i,o,a,s,l={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},u=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),c={arrowShadowColor:u("--popper-arrow-shadow-color"),arrowSize:u("--popper-arrow-size","8px"),arrowSizeHalf:u("--popper-arrow-size-half"),arrowBg:u("--popper-arrow-bg"),transformOrigin:u("--popper-transform-origin"),arrowOffset:u("--popper-arrow-offset")},d={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},f=e=>d[e],p={scroll:!0,resize:!0},h={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{let t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},m={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{g(e)},effect:({state:e})=>()=>{g(e)}},g=e=>{e.elements.popper.style.setProperty(c.transformOrigin.var,f(e.placement))},v={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{y(e)}},y=e=>{var t;if(!e.placement)return;let r=x(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&r){Object.assign(e.elements.arrow.style,{[r.property]:r.value,width:c.arrowSize.varRef,height:c.arrowSize.varRef,zIndex:-1});let t={[c.arrowSizeHalf.var]:`calc(${c.arrowSize.varRef} / 2 - 1px)`,[c.arrowOffset.var]:`calc(${c.arrowSizeHalf.varRef} * -1)`};for(let r in t)e.elements.arrow.style.setProperty(r,t[r])}},x=e=>e.startsWith("top")?{property:"bottom",value:c.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:c.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:c.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:c.arrowOffset.varRef}:void 0,b={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{w(e)},effect:({state:e})=>()=>{w(e)}},w=e=>{var t;if(!e.elements.arrow)return;let r=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!r)return;let n=(t=e.placement).includes("top")?"1px 1px 0px 0 var(--popper-arrow-shadow-color)":t.includes("bottom")?"-1px -1px 0px 0 var(--popper-arrow-shadow-color)":t.includes("right")?"-1px 1px 0px 0 var(--popper-arrow-shadow-color)":t.includes("left")?"1px -1px 0px 0 var(--popper-arrow-shadow-color)":void 0;n&&r.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(r.style,{transform:"rotate(45deg)",background:c.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},_={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},j={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"},C=r(81103);function k(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function E(e){var t=k(e).Element;return e instanceof t||e instanceof Element}function S(e){var t=k(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function N(e){if("undefined"==typeof ShadowRoot)return!1;var t=k(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var P=Math.max,L=Math.min,T=Math.round;function O(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function R(){return!/^((?!chrome|android).)*safari/i.test(O())}function A(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&S(e)&&(i=e.offsetWidth>0&&T(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&T(n.height)/e.offsetHeight||1);var a=(E(e)?k(e):window).visualViewport,s=!R()&&r,l=(n.left+(s&&a?a.offsetLeft:0))/i,u=(n.top+(s&&a?a.offsetTop:0))/o,c=n.width/i,d=n.height/o;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function I(e){var t=k(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function M(e){return e?(e.nodeName||"").toLowerCase():null}function D(e){return((E(e)?e.ownerDocument:e.document)||window.document).documentElement}function F(e){return A(D(e)).left+I(e).scrollLeft}function z(e){return k(e).getComputedStyle(e)}function B(e){var t=z(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function U(e){var t=A(e),r=e.offsetWidth,n=e.offsetHeight;return 1>=Math.abs(t.width-r)&&(r=t.width),1>=Math.abs(t.height-n)&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function V(e){return"html"===M(e)?e:e.assignedSlot||e.parentNode||(N(e)?e.host:null)||D(e)}function $(e,t){void 0===t&&(t=[]);var r,n=function e(t){return["html","body","#document"].indexOf(M(t))>=0?t.ownerDocument.body:S(t)&&B(t)?t:e(V(t))}(e),i=n===(null==(r=e.ownerDocument)?void 0:r.body),o=k(n),a=i?[o].concat(o.visualViewport||[],B(n)?n:[]):n,s=t.concat(a);return i?s:s.concat($(V(a)))}function H(e){return S(e)&&"fixed"!==z(e).position?e.offsetParent:null}function Z(e){for(var t=k(e),r=H(e);r&&["table","td","th"].indexOf(M(r))>=0&&"static"===z(r).position;)r=H(r);return r&&("html"===M(r)||"body"===M(r)&&"static"===z(r).position)?t:r||function(e){var t=/firefox/i.test(O());if(/Trident/i.test(O())&&S(e)&&"fixed"===z(e).position)return null;var r=V(e);for(N(r)&&(r=r.host);S(r)&&0>["html","body"].indexOf(M(r));){var n=z(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var W="bottom",q="right",G="left",Y="auto",K=["top",W,q,G],X="start",J="viewport",Q="popper",ee=K.reduce(function(e,t){return e.concat([t+"-"+X,t+"-end"])},[]),et=[].concat(K,[Y]).reduce(function(e,t){return e.concat([t,t+"-"+X,t+"-end"])},[]),er=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],en={placement:"bottom",modifiers:[],strategy:"absolute"};function ei(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var eo={passive:!0};function ea(e){return e.split("-")[0]}function es(e){return e.split("-")[1]}function el(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function eu(e){var t,r=e.reference,n=e.element,i=e.placement,o=i?ea(i):null,a=i?es(i):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(o){case"top":t={x:s,y:r.y-n.height};break;case W:t={x:s,y:r.y+r.height};break;case q:t={x:r.x+r.width,y:l};break;case G:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var u=o?el(o):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case X:t[u]=t[u]-(r[c]/2-n[c]/2);break;case"end":t[u]=t[u]+(r[c]/2-n[c]/2)}}return t}var ec={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ed(e){var t,r,n,i,o,a,s,l=e.popper,u=e.popperRect,c=e.placement,d=e.variation,f=e.offsets,p=e.position,h=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,v=e.isFixed,y=f.x,x=void 0===y?0:y,b=f.y,w=void 0===b?0:b,_="function"==typeof g?g({x:x,y:w}):{x:x,y:w};x=_.x,w=_.y;var j=f.hasOwnProperty("x"),C=f.hasOwnProperty("y"),E=G,S="top",N=window;if(m){var P=Z(l),L="clientHeight",O="clientWidth";P===k(l)&&"static"!==z(P=D(l)).position&&"absolute"===p&&(L="scrollHeight",O="scrollWidth"),("top"===c||(c===G||c===q)&&"end"===d)&&(S=W,w-=(v&&P===N&&N.visualViewport?N.visualViewport.height:P[L])-u.height,w*=h?1:-1),(c===G||("top"===c||c===W)&&"end"===d)&&(E=q,x-=(v&&P===N&&N.visualViewport?N.visualViewport.width:P[O])-u.width,x*=h?1:-1)}var R=Object.assign({position:p},m&&ec),A=!0===g?(t={x:x,y:w},r=k(l),n=t.x,i=t.y,{x:T(n*(o=r.devicePixelRatio||1))/o||0,y:T(i*o)/o||0}):{x:x,y:w};return(x=A.x,w=A.y,h)?Object.assign({},R,((s={})[S]=C?"0":"",s[E]=j?"0":"",s.transform=1>=(N.devicePixelRatio||1)?"translate("+x+"px, "+w+"px)":"translate3d("+x+"px, "+w+"px, 0)",s)):Object.assign({},R,((a={})[S]=C?w+"px":"",a[E]=j?x+"px":"",a.transform="",a))}var ef={left:"right",right:"left",bottom:"top",top:"bottom"};function ep(e){return e.replace(/left|right|bottom|top/g,function(e){return ef[e]})}var eh={start:"end",end:"start"};function em(e){return e.replace(/start|end/g,function(e){return eh[e]})}function eg(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&N(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ev(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ey(e,t,r){var n,i,o,a,s,l,u,c,d,f;return t===J?ev(function(e,t){var r=k(e),n=D(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=R();(u||!u&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+F(e),y:l}}(e,r)):E(t)?((n=A(t,!1,"fixed"===r)).top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n):ev((i=D(e),a=D(i),s=I(i),l=null==(o=i.ownerDocument)?void 0:o.body,u=P(a.scrollWidth,a.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),c=P(a.scrollHeight,a.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),d=-s.scrollLeft+F(i),f=-s.scrollTop,"rtl"===z(l||a).direction&&(d+=P(a.clientWidth,l?l.clientWidth:0)-u),{width:u,height:c,x:d,y:f}))}function ex(){return{top:0,right:0,bottom:0,left:0}}function eb(e){return Object.assign({},ex(),e)}function ew(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function e_(e,t){void 0===t&&(t={});var r,n,i,o,a,s,l,u,c=t,d=c.placement,f=void 0===d?e.placement:d,p=c.strategy,h=void 0===p?e.strategy:p,m=c.boundary,g=c.rootBoundary,v=c.elementContext,y=void 0===v?Q:v,x=c.altBoundary,b=c.padding,w=void 0===b?0:b,_=eb("number"!=typeof w?w:ew(w,K)),j=e.rects.popper,C=e.elements[void 0!==x&&x?y===Q?"reference":Q:y],k=(r=E(C)?C:C.contextElement||D(e.elements.popper),n=void 0===m?"clippingParents":m,i=void 0===g?J:g,l=(s=[].concat("clippingParents"===n?(o=$(V(r)),E(a=["absolute","fixed"].indexOf(z(r).position)>=0&&S(r)?Z(r):r)?o.filter(function(e){return E(e)&&eg(e,a)&&"body"!==M(e)}):[]):[].concat(n),[i]))[0],(u=s.reduce(function(e,t){var n=ey(r,t,h);return e.top=P(n.top,e.top),e.right=L(n.right,e.right),e.bottom=L(n.bottom,e.bottom),e.left=P(n.left,e.left),e},ey(r,l,h))).width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u),N=A(e.elements.reference),T=eu({reference:N,element:j,strategy:"absolute",placement:f}),O=ev(Object.assign({},j,T)),R=y===Q?O:N,I={top:k.top-R.top+_.top,bottom:R.bottom-k.bottom+_.bottom,left:k.left-R.left+_.left,right:R.right-k.right+_.right},F=e.modifiersData.offset;if(y===Q&&F){var B=F[f];Object.keys(I).forEach(function(e){var t=[q,W].indexOf(e)>=0?1:-1,r=["top",W].indexOf(e)>=0?"y":"x";I[e]+=B[r]*t})}return I}function ej(e,t,r){return P(e,L(t,r))}function eC(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ek(e){return["top",q,W,G].some(function(t){return e[t]>=0})}var eE=(o=void 0===(i=(n={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=void 0===i||i,a=n.resize,s=void 0===a||a,l=k(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(e){e.addEventListener("scroll",r.update,eo)}),s&&l.addEventListener("resize",r.update,eo),function(){o&&u.forEach(function(e){e.removeEventListener("scroll",r.update,eo)}),s&&l.removeEventListener("resize",r.update,eo)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=eu({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=r.adaptive,o=r.roundOffsets,a=void 0===o||o,s={placement:ea(t.placement),variation:es(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===n||n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ed(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ed(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},i=t.elements[e];S(i)&&M(i)&&(Object.assign(i.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});S(n)&&M(n)&&(Object.assign(n.style,o),Object.keys(i).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=void 0===i?[0,0]:i,a=et.reduce(function(e,r){var n,i,a,s,l,u;return e[r]=(n=t.rects,a=[G,"top"].indexOf(i=ea(r))>=0?-1:1,l=(s="function"==typeof o?o(Object.assign({},n,{placement:r})):o)[0],u=s[1],l=l||0,u=(u||0)*a,[G,q].indexOf(i)>=0?{x:u,y:l}:{x:l,y:u}),e},{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0===a||a,l=r.fallbackPlacements,u=r.padding,c=r.boundary,d=r.rootBoundary,f=r.altBoundary,p=r.flipVariations,h=void 0===p||p,m=r.allowedAutoPlacements,g=t.options.placement,v=ea(g)===g,y=l||(v||!h?[ep(g)]:function(e){if(ea(e)===Y)return[];var t=ep(e);return[em(e),t,em(t)]}(g)),x=[g].concat(y).reduce(function(e,r){var n,i,o,a,s,l,f,p,g,v,y,x;return e.concat(ea(r)===Y?(i=(n={placement:r,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}).placement,o=n.boundary,a=n.rootBoundary,s=n.padding,l=n.flipVariations,p=void 0===(f=n.allowedAutoPlacements)?et:f,0===(y=(v=(g=es(i))?l?ee:ee.filter(function(e){return es(e)===g}):K).filter(function(e){return p.indexOf(e)>=0})).length&&(y=v),Object.keys(x=y.reduce(function(e,r){return e[r]=e_(t,{placement:r,boundary:o,rootBoundary:a,padding:s})[ea(r)],e},{})).sort(function(e,t){return x[e]-x[t]})):r)},[]),b=t.rects.reference,w=t.rects.popper,_=new Map,j=!0,C=x[0],k=0;k<x.length;k++){var E=x[k],S=ea(E),N=es(E)===X,P=["top",W].indexOf(S)>=0,L=P?"width":"height",T=e_(t,{placement:E,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),O=P?N?q:G:N?W:"top";b[L]>w[L]&&(O=ep(O));var R=ep(O),A=[];if(o&&A.push(T[S]<=0),s&&A.push(T[O]<=0,T[R]<=0),A.every(function(e){return e})){C=E,j=!1;break}_.set(E,A)}if(j)for(var I=h?3:1,M=function(e){var t=x.find(function(t){var r=_.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return C=t,"break"},D=I;D>0&&"break"!==M(D);D--);t.placement!==C&&(t.modifiersData[n]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=r.altAxis,a=r.boundary,s=r.rootBoundary,l=r.altBoundary,u=r.padding,c=r.tether,d=void 0===c||c,f=r.tetherOffset,p=void 0===f?0:f,h=e_(t,{boundary:a,rootBoundary:s,padding:u,altBoundary:l}),m=ea(t.placement),g=es(t.placement),v=!g,y=el(m),x="x"===y?"y":"x",b=t.modifiersData.popperOffsets,w=t.rects.reference,_=t.rects.popper,j="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,C="number"==typeof j?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(b){if(void 0===i||i){var S,N="y"===y?"top":G,T="y"===y?W:q,O="y"===y?"height":"width",R=b[y],A=R+h[N],I=R-h[T],M=d?-_[O]/2:0,D=g===X?w[O]:_[O],F=g===X?-_[O]:-w[O],z=t.elements.arrow,B=d&&z?U(z):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ex(),$=V[N],H=V[T],Y=ej(0,w[O],B[O]),K=v?w[O]/2-M-Y-$-C.mainAxis:D-Y-$-C.mainAxis,J=v?-w[O]/2+M+Y+H+C.mainAxis:F+Y+H+C.mainAxis,Q=t.elements.arrow&&Z(t.elements.arrow),ee=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,et=null!=(S=null==k?void 0:k[y])?S:0,er=ej(d?L(A,R+K-et-ee):A,R,d?P(I,R+J-et):I);b[y]=er,E[y]=er-R}if(void 0!==o&&o){var en,ei,eo="x"===y?"top":G,eu="x"===y?W:q,ec=b[x],ed="y"===x?"height":"width",ef=ec+h[eo],ep=ec-h[eu],eh=-1!==["top",G].indexOf(m),em=null!=(ei=null==k?void 0:k[x])?ei:0,eg=eh?ef:ec-w[ed]-_[ed]-em+C.altAxis,ev=eh?ec+w[ed]+_[ed]-em-C.altAxis:ep,ey=d&&eh?(en=ej(eg,ec,ev))>ev?ev:en:ej(d?eg:ef,ec,d?ev:ep);b[x]=ey,E[x]=ey-ec}t.modifiersData[n]=E}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r,n=e.state,i=e.name,o=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,l=ea(n.placement),u=el(l),c=[G,q].indexOf(l)>=0?"height":"width";if(a&&s){var d=eb("number"!=typeof(t="function"==typeof(t=o.padding)?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:ew(t,K)),f=U(a),p="y"===u?"top":G,h="y"===u?W:q,m=n.rects.reference[c]+n.rects.reference[u]-s[u]-n.rects.popper[c],g=s[u]-n.rects.reference[u],v=Z(a),y=v?"y"===u?v.clientHeight||0:v.clientWidth||0:0,x=d[p],b=y-f[c]-d[h],w=y/2-f[c]/2+(m/2-g/2),_=ej(x,w,b);n.modifiersData[i]=((r={})[u]=_,r.centerOffset=_-w,r)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&eg(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=e_(t,{elementContext:"reference"}),s=e_(t,{altBoundary:!0}),l=eC(a,n),u=eC(s,i,o),c=ek(l),d=ek(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}).defaultModifiers)?[]:i,s=void 0===(a=n.defaultOptions)?en:a,function(e,t,r){void 0===r&&(r=s);var n,i,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},en,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:a,setOptions:function(r){var n,i,u,f,p,h="function"==typeof r?r(a.options):r;d(),a.options=Object.assign({},s,a.options,h),a.scrollParents={reference:E(e)?$(e):e.contextElement?$(e.contextElement):[],popper:$(t)};var m=(i=Object.keys(n=[].concat(o,a.options.modifiers).reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{})).map(function(e){return n[e]}),u=new Map,f=new Set,p=[],i.forEach(function(e){u.set(e.name,e)}),i.forEach(function(e){f.has(e.name)||function e(t){f.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!f.has(t)){var r=u.get(t);r&&e(r)}}),p.push(t)}(e)}),er.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=m.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=e.effect;if("function"==typeof n){var i=n({state:a,name:t,instance:c,options:void 0===r?{}:r});l.push(i||function(){})}}),c.update()},forceUpdate:function(){if(!u){var e,t,r,n,i,o,s,l,d,f,p,h,m=a.elements,g=m.reference,v=m.popper;if(ei(g,v)){a.rects={reference:(t=Z(v),r="fixed"===a.options.strategy,n=S(t),l=S(t)&&(o=T((i=t.getBoundingClientRect()).width)/t.offsetWidth||1,s=T(i.height)/t.offsetHeight||1,1!==o||1!==s),d=D(t),f=A(g,l,r),p={scrollLeft:0,scrollTop:0},h={x:0,y:0},(n||!n&&!r)&&(("body"!==M(t)||B(d))&&(p=(e=t)!==k(e)&&S(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:I(e)),S(t)?(h=A(t,!0),h.x+=t.clientLeft,h.y+=t.clientTop):d&&(h.x=F(d))),{x:f.left+p.scrollLeft-h.x,y:f.top+p.scrollTop-h.y,width:f.width,height:f.height}),popper:U(v)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var y=0;y<a.orderedModifiers.length;y++){if(!0===a.reset){a.reset=!1,y=-1;continue}var x=a.orderedModifiers[y],b=x.fn,w=x.options,_=void 0===w?{}:w,j=x.name;"function"==typeof b&&(a=b({state:a,options:_,name:j,instance:c})||a)}}}},update:(n=function(){return new Promise(function(e){c.forceUpdate(),e(a)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(n())})})),i}),destroy:function(){d(),u=!0}};if(!ei(e,t))return c;function d(){l.forEach(function(e){return e()}),l=[]}return c.setOptions(r).then(function(e){!u&&r.onFirstUpdate&&r.onFirstUpdate(e)}),c}),eS=r(67294),eN=r(35155);function eP(e,t,r,n){let i=(0,eN.W)(r);return(0,eS.useEffect)(()=>{let o="function"==typeof e?e():null!=e?e:document;if(r&&o)return o.addEventListener(t,i,n),()=>{o.removeEventListener(t,i,n)}},[t,e,n,i,r]),()=>{let r="function"==typeof e?e():null!=e?e:document;null==r||r.removeEventListener(t,i,n)}}var eL=r(25432),eT=e=>{var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},eO=e=>{var t,r;return(null==(r=null==(t=e.current)?void 0:t.ownerDocument)?void 0:r.defaultView)||window},eR="chakra-ui:close-tooltip",eA=r(1702),eI=r(16914),eM=r(16554),eD=r(27603),eF=r(33179),ez=r(48940),eB=r(88361),eU=r(12668),eV=r(85893),e$=(0,eI.m)(eB.E.div),eH=(0,eM.G)((e,t)=>{var r,n;let i;let o=(0,eD.mq)("Tooltip",e),a=(0,eF.Lr)(e),s=(0,ez.F)(),{children:u,label:d,shouldWrapChildren:f,"aria-label":g,hasArrow:y,bg:x,portalProps:w,background:k,backgroundColor:E,bgColor:S,motionProps:N,...P}=a,L=null!=(n=null!=(r=null!=k?k:E)?r:x)?n:S;if(L){o.bg=L;let e=(0,eF.K1)(s,"colors",L);o[c.arrowBg.var]=e}let T=function(e={}){let{openDelay:t=0,closeDelay:r=0,closeOnClick:n=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:d,id:f,isOpen:g,defaultIsOpen:y,arrowSize:x=10,arrowShadowColor:w,arrowPadding:k,modifiers:E,isDisabled:S,gutter:N,offset:P,direction:L,...T}=e,{isOpen:O,onOpen:R,onClose:A}=function(e={}){let{onClose:t,onOpen:r,isOpen:n,id:i}=e,o=(0,eN.W)(r),a=(0,eN.W)(t),[s,l]=(0,eS.useState)(e.defaultIsOpen||!1),u=void 0!==n?n:s,c=void 0!==n,d=(0,eS.useId)(),f=null!=i?i:`disclosure-${d}`,p=(0,eS.useCallback)(()=>{c||l(!1),null==a||a()},[c,a]),h=(0,eS.useCallback)(()=>{c||l(!0),null==o||o()},[c,o]),m=(0,eS.useCallback)(()=>{u?p():h()},[u,h,p]);return{isOpen:u,onOpen:h,onClose:p,onToggle:m,isControlled:c,getButtonProps:function(e={}){return{...e,"aria-expanded":u,"aria-controls":f,onClick(t){var r;null==(r=e.onClick)||r.call(e,t),m()}}},getDisclosureProps:function(e={}){return{...e,hidden:!u,id:f}}}}({isOpen:g,defaultIsOpen:y,onOpen:l,onClose:u}),{referenceRef:I,getPopperProps:M,getArrowInnerProps:D,getArrowProps:F}=function(e={}){let{enabled:t=!0,modifiers:r,placement:n="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:d="clippingParents",preventOverflow:f=!0,matchWidth:g,direction:y="ltr"}=e,x=(0,eS.useRef)(null),w=(0,eS.useRef)(null),k=(0,eS.useRef)(null),E=function(e,t="ltr"){var r,n;let i=(null==(r=_[e])?void 0:r[t])||e;return"ltr"===t?i:null!=(n=j[e])?n:i}(n,y),S=(0,eS.useRef)(()=>{}),N=(0,eS.useCallback)(()=>{var e;t&&x.current&&w.current&&(null==(e=S.current)||e.call(S),k.current=eE(x.current,w.current,{placement:E,modifiers:[b,v,m,{...h,enabled:!!g},{name:"eventListeners",..."object"==typeof a?{enabled:!0,options:{...p,...a}}:{enabled:a,options:p}},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:null!=s?s:[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!f,options:{boundary:d}},...null!=r?r:[]],strategy:i}),k.current.forceUpdate(),S.current=k.current.destroy)},[E,t,r,g,a,o,s,l,u,f,d,i]);(0,eS.useEffect)(()=>()=>{var e;x.current||w.current||(null==(e=k.current)||e.destroy(),k.current=null)},[]);let P=(0,eS.useCallback)(e=>{x.current=e,N()},[N]),L=(0,eS.useCallback)((e={},t=null)=>({...e,ref:(0,C.lq)(P,t)}),[P]),T=(0,eS.useCallback)(e=>{w.current=e,N()},[N]),O=(0,eS.useCallback)((e={},t=null)=>({...e,ref:(0,C.lq)(T,t),style:{...e.style,position:i,minWidth:g?void 0:"max-content",inset:"0 auto auto 0"}}),[i,T,g]),R=(0,eS.useCallback)((e={},t=null)=>{let{size:r,shadowColor:n,bg:i,style:o,...a}=e;return{...a,ref:t,"data-popper-arrow":"",style:function(e){let{size:t,shadowColor:r,bg:n,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),r&&(o["--popper-arrow-shadow-color"]=r),n&&(o["--popper-arrow-bg"]=n),o}(e)}},[]),A=(0,eS.useCallback)((e={},t=null)=>({...e,ref:t,"data-popper-arrow-inner":""}),[]);return{update(){var e;null==(e=k.current)||e.update()},forceUpdate(){var e;null==(e=k.current)||e.forceUpdate()},transformOrigin:c.transformOrigin.varRef,referenceRef:P,popperRef:T,getPopperProps:O,getArrowProps:R,getArrowInnerProps:A,getReferenceProps:L}}({enabled:O,placement:d,arrowPadding:k,modifiers:E,gutter:N,offset:P,direction:L}),z=(0,eS.useId)(),B=`tooltip-${null!=f?f:z}`,U=(0,eS.useRef)(null),V=(0,eS.useRef)(),$=(0,eS.useCallback)(()=>{V.current&&(clearTimeout(V.current),V.current=void 0)},[]),H=(0,eS.useRef)(),Z=(0,eS.useCallback)(()=>{H.current&&(clearTimeout(H.current),H.current=void 0)},[]),W=(0,eS.useCallback)(()=>{Z(),A()},[A,Z]),q=((0,eS.useEffect)(()=>{let e=eT(U);return e.addEventListener(eR,W),()=>e.removeEventListener(eR,W)},[W,U]),()=>{let e=eT(U),t=eO(U);e.dispatchEvent(new t.CustomEvent(eR))}),G=(0,eS.useCallback)(()=>{if(!S&&!V.current){O&&q();let e=eO(U);V.current=e.setTimeout(R,t)}},[q,S,O,R,t]),Y=(0,eS.useCallback)(()=>{$();let e=eO(U);H.current=e.setTimeout(W,r)},[r,W,$]),K=(0,eS.useCallback)(()=>{O&&n&&Y()},[n,Y,O]),X=(0,eS.useCallback)(()=>{O&&a&&Y()},[a,Y,O]),J=(0,eS.useCallback)(e=>{O&&"Escape"===e.key&&Y()},[O,Y]);eP(()=>eT(U),"keydown",s?J:void 0),eP(()=>{if(!o)return null;let e=U.current;if(!e)return null;let t=function e(t){return["html","body","#document"].includes(t.localName)?t.ownerDocument.body:function(e){var t;if(!(null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE))return!1;let r=null!=(t=e.ownerDocument.defaultView)?t:window;return e instanceof r.HTMLElement}(t)&&function(e){let{overflow:t,overflowX:r,overflowY:n}=(e.ownerDocument.defaultView||window).getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(t+n+r)}(t)?t:e("html"===t.localName?t:t.assignedSlot||t.parentElement||t.ownerDocument.documentElement)}(e);return"body"===t.localName?eO(U):t},"scroll",()=>{O&&o&&W()},{passive:!0,capture:!0}),(0,eS.useEffect)(()=>{S&&($(),O&&A())},[S,O,A,$]),(0,eS.useEffect)(()=>()=>{$(),Z()},[$,Z]),eP(()=>U.current,"pointerleave",Y);let Q=(0,eS.useCallback)((e={},t=null)=>({...e,ref:(0,C.lq)(U,t,I),onPointerEnter:(0,eL.v0)(e.onPointerEnter,e=>{"touch"!==e.pointerType&&G()}),onClick:(0,eL.v0)(e.onClick,K),onPointerDown:(0,eL.v0)(e.onPointerDown,X),onFocus:(0,eL.v0)(e.onFocus,G),onBlur:(0,eL.v0)(e.onBlur,Y),"aria-describedby":O?B:void 0}),[G,Y,X,O,B,K,I]),ee=(0,eS.useCallback)((e={},t=null)=>M({...e,style:{...e.style,[c.arrowSize.var]:x?`${x}px`:void 0,[c.arrowShadowColor.var]:w}},t),[M,x,w]);return{isOpen:O,show:G,hide:Y,getTriggerProps:Q,getTooltipProps:(0,eS.useCallback)((e={},t=null)=>{let r={...e.style,position:"relative",transformOrigin:c.transformOrigin.varRef};return{ref:t,...T,...e,id:B,role:"tooltip",style:r}},[T,B]),getTooltipPositionerProps:ee,getArrowProps:F,getArrowInnerProps:D}}({...P,direction:s.direction});if("string"==typeof u||f)i=(0,eV.jsx)(eI.m.span,{display:"inline-block",tabIndex:0,...T.getTriggerProps(),children:u});else{let e=eS.Children.only(u);i=(0,eS.cloneElement)(e,T.getTriggerProps(e.props,e.ref))}let O=!!g,R=T.getTooltipProps({},t),A=O?function(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}(R,["role","id"]):R,I=function(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}(R,["role","id"]);return d?(0,eV.jsxs)(eV.Fragment,{children:[i,(0,eV.jsx)(eU.M,{children:T.isOpen&&(0,eV.jsx)(eA.h,{...w,children:(0,eV.jsx)(eI.m.div,{...T.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:(0,eV.jsxs)(e$,{variants:l,initial:"exit",animate:"enter",exit:"exit",...N,...A,__css:o,children:[d,O&&(0,eV.jsx)(eI.m.span,{srOnly:!0,...I,children:g}),y&&(0,eV.jsx)(eI.m.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:(0,eV.jsx)(eI.m.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):(0,eV.jsx)(eV.Fragment,{children:u})});eH.displayName="Tooltip"},36597:function(e,t,r){"use strict";function n(e,...t){return"function"==typeof e?e(...t):e}function i(...e){return function(t){e.some(e=>(null==e||e(t),null==t?void 0:t.defaultPrevented))}}r.d(t,{v0:function(){return i},Pu:function(){return n}})},21759:function(e,t,r){"use strict";function n(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}r.d(t,{CE:function(){return n},Wf:function(){return i},YU:function(){return a},lw:function(){return o}}),r(38554);var i=(e=>{let t=new WeakMap;return(r,n,i,o)=>{if(void 0===r)return e(r,n,i);t.has(r)||t.set(r,new Map);let a=t.get(r);if(a.has(n))return a.get(n);let s=e(r,n,i,o);return a.set(n,s),s}})(function(e,t,r,n){let i="string"==typeof t?t.split("."):[t];for(n=0;n<i.length&&e;n+=1)e=e[i[n]];return void 0===e?r:e});function o(e,t){let r={};return Object.keys(e).forEach(n=>{let i=e[n];t(i,n,e)&&(r[n]=i)}),r}var a=e=>o(e,e=>null!=e)},1371:function(e,t,r){"use strict";r.d(t,{Cp:function(){return y},RR:function(){return g},YF:function(){return d},cv:function(){return p},dp:function(){return v},dr:function(){return m},uY:function(){return h},x7:function(){return x}});var n=r(41737),i=r(67294),o=r(73935),a="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function s(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!s(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!s(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function l(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u(e,t){let r=l(e);return Math.round(t*r)/r}function c(e){let t=i.useRef(e);return a(()=>{t.current=e}),t}function d(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:d=[],platform:f,elements:{reference:p,floating:h}={},transform:m=!0,whileElementsMounted:g,open:v}=e,[y,x]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[b,w]=i.useState(d);s(b,d)||w(d);let[_,j]=i.useState(null),[C,k]=i.useState(null),E=i.useCallback(e=>{e!==L.current&&(L.current=e,j(e))},[]),S=i.useCallback(e=>{e!==T.current&&(T.current=e,k(e))},[]),N=p||_,P=h||C,L=i.useRef(null),T=i.useRef(null),O=i.useRef(y),R=null!=g,A=c(g),I=c(f),M=i.useCallback(()=>{if(!L.current||!T.current)return;let e={placement:t,strategy:r,middleware:b};I.current&&(e.platform=I.current),(0,n.oo)(L.current,T.current,e).then(e=>{let t={...e,isPositioned:!0};D.current&&!s(O.current,t)&&(O.current=t,o.flushSync(()=>{x(t)}))})},[b,t,r,I]);a(()=>{!1===v&&O.current.isPositioned&&(O.current.isPositioned=!1,x(e=>({...e,isPositioned:!1})))},[v]);let D=i.useRef(!1);a(()=>(D.current=!0,()=>{D.current=!1}),[]),a(()=>{if(N&&(L.current=N),P&&(T.current=P),N&&P){if(A.current)return A.current(N,P,M);M()}},[N,P,M,A,R]);let F=i.useMemo(()=>({reference:L,floating:T,setReference:E,setFloating:S}),[E,S]),z=i.useMemo(()=>({reference:N,floating:P}),[N,P]),B=i.useMemo(()=>{let e={position:r,left:0,top:0};if(!z.floating)return e;let t=u(z.floating,y.x),n=u(z.floating,y.y);return m?{...e,transform:"translate("+t+"px, "+n+"px)",...l(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,m,z.floating,y.x,y.y]);return i.useMemo(()=>({...y,update:M,refs:F,elements:z,floatingStyles:B}),[y,M,F,z,B])}let f=e=>({name:"arrow",options:e,fn(t){let{element:r,padding:i}="function"==typeof e?e(t):e;return r&&({}).hasOwnProperty.call(r,"current")?null!=r.current?(0,n.x7)({element:r.current,padding:i}).fn(t):{}:r?(0,n.x7)({element:r,padding:i}).fn(t):{}}}),p=(e,t)=>({...(0,n.cv)(e),options:[e,t]}),h=(e,t)=>({...(0,n.uY)(e),options:[e,t]}),m=(e,t)=>({...(0,n.dr)(e),options:[e,t]}),g=(e,t)=>({...(0,n.RR)(e),options:[e,t]}),v=(e,t)=>({...(0,n.dp)(e),options:[e,t]}),y=(e,t)=>({...(0,n.Cp)(e),options:[e,t]}),x=(e,t)=>({...f(e),options:[e,t]})},41737:function(e,t,r){"use strict";r.d(t,{x7:function(){return el},Me:function(){return er},oo:function(){return ec},RR:function(){return eo},Cp:function(){return es},dr:function(){return eu},cv:function(){return en},uY:function(){return ei},dp:function(){return ea}});let n=["top","right","bottom","left"],i=Math.min,o=Math.max,a=Math.round,s=Math.floor,l=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function d(e,t){return"function"==typeof e?e(t):e}function f(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}function g(e){return["top","bottom"].includes(f(e))?"y":"x"}function v(e){return e.replace(/start|end/g,e=>c[e])}function y(e){return e.replace(/left|right|bottom|top/g,e=>u[e])}function x(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function b(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function w(e,t,r){let n,{reference:i,floating:o}=e,a=g(t),s=h(g(t)),l=m(s),u=f(t),c="y"===a,d=i.x+i.width/2-o.width/2,v=i.y+i.height/2-o.height/2,y=i[l]/2-o[l]/2;switch(u){case"top":n={x:d,y:i.y-o.height};break;case"bottom":n={x:d,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:v};break;case"left":n={x:i.x-o.width,y:v};break;default:n={x:i.x,y:i.y}}switch(p(t)){case"start":n[s]-=y*(r&&c?-1:1);break;case"end":n[s]+=y*(r&&c?-1:1)}return n}let _=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=w(u,n,l),f=n,p={},h=0;for(let r=0;r<s.length;r++){let{name:o,fn:m}=s[r],{x:g,y:v,data:y,reset:x}=await m({x:c,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=g?g:c,d=null!=v?v:d,p={...p,[o]:{...p[o],...y}},x&&h<=50&&(h++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(u=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=w(u,f,l)),r=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};async function j(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=d(t,e),m=x(h),g=s[p?"floating"===f?"reference":"floating":f],v=b(await o.getClippingRect({element:null==(r=await (null==o.isElement?void 0:o.isElement(g)))||r?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y="floating"===f?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await (null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),_=await (null==o.isElement?void 0:o.isElement(w))&&await (null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},j=b(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(v.top-j.top+m.top)/_.y,bottom:(j.bottom-v.bottom+m.bottom)/_.y,left:(v.left-j.left+m.left)/_.x,right:(j.right-v.right+m.right)/_.x}}function C(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function k(e){return n.some(t=>e[t]>=0)}async function E(e,t){let{placement:r,platform:n,elements:i}=e,o=await (null==n.isRTL?void 0:n.isRTL(i.floating)),a=f(r),s=p(r),l="y"===g(r),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,h=d(t,e),{mainAxis:m,crossAxis:v,alignmentAxis:y}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return s&&"number"==typeof y&&(v="end"===s?-1*y:y),l?{x:v*c,y:m*u}:{x:m*u,y:v*c}}function S(e){return L(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){var t;return null==(t=(L(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function L(e){return e instanceof Node||e instanceof N(e).Node}function T(e){return e instanceof Element||e instanceof N(e).Element}function O(e){return e instanceof HTMLElement||e instanceof N(e).HTMLElement}function R(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof N(e).ShadowRoot)}function A(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function I(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function M(e){let t=D(),r=z(e);return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function D(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function F(e){return["html","body","#document"].includes(S(e))}function z(e){return N(e).getComputedStyle(e)}function B(e){return T(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function U(e){if("html"===S(e))return e;let t=e.assignedSlot||e.parentNode||R(e)&&e.host||P(e);return R(t)?t.host:t}function V(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=U(t);return F(r)?t.ownerDocument?t.ownerDocument.body:t.body:O(r)&&A(r)?r:e(r)}(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=N(i);return o?t.concat(a,a.visualViewport||[],A(i)?i:[],a.frameElement&&r?V(a.frameElement):[]):t.concat(i,V(i,[],r))}function $(e){let t=z(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=O(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,l=a(r)!==o||a(n)!==s;return l&&(r=o,n=s),{width:r,height:n,$:l}}function H(e){return T(e)?e:e.contextElement}function Z(e){let t=H(e);if(!O(t))return l(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=$(t),s=(o?a(r.width):r.width)/n,u=(o?a(r.height):r.height)/i;return s&&Number.isFinite(s)||(s=1),u&&Number.isFinite(u)||(u=1),{x:s,y:u}}let W=l(0);function q(e){let t=N(e);return D()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:W}function G(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let o=e.getBoundingClientRect(),a=H(e),s=l(1);t&&(n?T(n)&&(s=Z(n)):s=Z(e));let u=(void 0===(i=r)&&(i=!1),n&&(!i||n===N(a))&&i)?q(a):l(0),c=(o.left+u.x)/s.x,d=(o.top+u.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){let e=N(a),t=n&&T(n)?N(n):n,r=e,i=r.frameElement;for(;i&&n&&t!==r;){let e=Z(i),t=i.getBoundingClientRect(),n=z(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,d*=e.y,f*=e.x,p*=e.y,c+=o,d+=a,i=(r=N(i)).frameElement}}return b({width:f,height:p,x:c,y:d})}function Y(e){return G(P(e)).left+B(e).scrollLeft}function K(e,t,r){let n;if("viewport"===t)n=function(e,t){let r=N(e),n=P(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=D();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){let t=P(e),r=B(e),n=e.ownerDocument.body,i=o(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=o(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Y(e),l=-r.scrollTop;return"rtl"===z(n).direction&&(s+=o(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:l}}(P(e));else if(T(t))n=function(e,t){let r=G(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=O(e)?Z(e):l(1),a=e.clientWidth*o.x;return{width:a,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}(t,r);else{let r=q(e);n={...t,x:t.x-r.x,y:t.y-r.y}}return b(n)}function X(e){return"static"===z(e).position}function J(e,t){return O(e)&&"fixed"!==z(e).position?t?t(e):e.offsetParent:null}function Q(e,t){let r=N(e);if(I(e))return r;if(!O(e)){let t=U(e);for(;t&&!F(t);){if(T(t)&&!X(t))return t;t=U(t)}return r}let n=J(e,t);for(;n&&["table","td","th"].includes(S(n))&&X(n);)n=J(n,t);return n&&F(n)&&X(n)&&!M(n)?r:n||function(e){let t=U(e);for(;O(t)&&!F(t)&&!I(t);){if(M(t))return t;t=U(t)}return null}(e)||r}let ee=async function(e){let t=this.getOffsetParent||Q,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=O(t),i=P(t),o="fixed"===r,a=G(e,!0,o,t),s={scrollLeft:0,scrollTop:0},u=l(0);if(n||!n&&!o){if(("body"!==S(t)||A(i))&&(s=B(t)),n){let e=G(t,!0,o,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else i&&(u.x=Y(i))}return{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},et={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o="fixed"===i,a=P(n),s=!!t&&I(t.floating);if(n===a||s&&o)return r;let u={scrollLeft:0,scrollTop:0},c=l(1),d=l(0),f=O(n);if((f||!f&&!o)&&(("body"!==S(n)||A(a))&&(u=B(n)),O(n))){let e=G(n);c=Z(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-u.scrollLeft*c.x+d.x,y:r.y*c.y-u.scrollTop*c.y+d.y}},getDocumentElement:P,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[..."clippingAncestors"===r?I(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=V(e,[],!1).filter(e=>T(e)&&"body"!==S(e)),i=null,o="fixed"===z(e).position,a=o?U(e):e;for(;T(a)&&!F(a);){let t=z(a),r=M(a);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||A(a)&&!r&&function e(t,r){let n=U(t);return!(n===r||!T(n)||F(n))&&("fixed"===z(n).position||e(n,r))}(e,a))?n=n.filter(e=>e!==a):i=t,a=U(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=s[0],u=s.reduce((e,r)=>{let n=K(t,r,a);return e.top=o(n.top,e.top),e.right=i(n.right,e.right),e.bottom=i(n.bottom,e.bottom),e.left=o(n.left,e.left),e},K(t,l,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:Q,getElementRects:ee,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=$(e);return{width:t,height:r}},getScale:Z,isElement:T,isRTL:function(e){return"rtl"===z(e).direction}};function er(e,t,r,n){let a;void 0===n&&(n={});let{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:f=!1}=n,p=H(e),h=l||u?[...p?V(p):[],...V(t)]:[];h.forEach(e=>{l&&e.addEventListener("scroll",r,{passive:!0}),u&&e.addEventListener("resize",r)});let m=p&&d?function(e,t){let r,n=null,a=P(e);function l(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),l();let{left:f,top:p,width:h,height:m}=e.getBoundingClientRect();if(c||t(),!h||!m)return;let g=s(p),v=s(a.clientWidth-(f+h)),y={rootMargin:-g+"px "+-v+"px "+-s(a.clientHeight-(p+m))+"px "+-s(f)+"px",threshold:o(0,i(1,d))||1},x=!0;function b(e){let t=e[0].intersectionRatio;if(t!==d){if(!x)return u();t?u(!1,t):r=setTimeout(()=>{u(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(b,{...y,root:a.ownerDocument})}catch(e){n=new IntersectionObserver(b,y)}n.observe(e)}(!0),l}(p,r):null,g=-1,v=null;c&&(v=new ResizeObserver(e=>{let[n]=e;n&&n.target===p&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),r()}),p&&!f&&v.observe(p),v.observe(t));let y=f?G(e):null;return f&&function t(){let n=G(e);y&&(n.x!==y.x||n.y!==y.y||n.width!==y.width||n.height!==y.height)&&r(),y=n,a=requestAnimationFrame(t)}(),r(),()=>{var e;h.forEach(e=>{l&&e.removeEventListener("scroll",r),u&&e.removeEventListener("resize",r)}),null==m||m(),null==(e=v)||e.disconnect(),v=null,f&&cancelAnimationFrame(a)}}let en=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:s}=t,l=await E(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},ei=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...c}=d(e,t),p={x:r,y:n},m=await j(t,c),v=g(f(a)),y=h(v),x=p[y],b=p[v];if(s){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",r=x+m[e],n=x-m[t];x=o(r,i(x,n))}if(l){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",r=b+m[e],n=b-m[t];b=o(r,i(b,n))}let w=u.fn({...t,[y]:x,[v]:b});return{...w,data:{x:w.x-r,y:w.y-n}}}}},eo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n,i,o,a;let{placement:s,middlewareData:l,rects:u,initialPlacement:c,platform:x,elements:b}=t,{mainAxis:w=!0,crossAxis:_=!0,fallbackPlacements:C,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:S=!0,...N}=d(e,t);if(null!=(r=l.arrow)&&r.alignmentOffset)return{};let P=f(s),L=g(c),T=f(c)===c,O=await (null==x.isRTL?void 0:x.isRTL(b.floating)),R=C||(T||!S?[y(c)]:function(e){let t=y(e);return[v(e),t,v(t)]}(c)),A="none"!==E;!C&&A&&R.push(...function(e,t,r,n){let i=p(e),o=function(e,t,r){let n=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(r)return t?i:n;return t?n:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(f(e),"start"===r,n);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(v)))),o}(c,S,E,O));let I=[c,...R],M=await j(t,N),D=[],F=(null==(n=l.flip)?void 0:n.overflows)||[];if(w&&D.push(M[P]),_){let e=function(e,t,r){void 0===r&&(r=!1);let n=p(e),i=h(g(e)),o=m(i),a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=y(a)),[a,y(a)]}(s,u,O);D.push(M[e[0]],M[e[1]])}if(F=[...F,{placement:s,overflows:D}],!D.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=I[e];if(t)return{data:{index:e,overflows:F},reset:{placement:t}};let r=null==(o=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(k){case"bestFit":{let e=null==(a=F.filter(e=>{if(A){let t=g(e.placement);return t===L||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=c}if(s!==r)return{reset:{placement:r}}}return{}}}},ea=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){let r,n;let{placement:a,rects:s,platform:l,elements:u}=t,{apply:c=()=>{},...h}=d(e,t),m=await j(t,h),v=f(a),y=p(a),x="y"===g(a),{width:b,height:w}=s.floating;"top"===v||"bottom"===v?(r=v,n=y===(await (null==l.isRTL?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(n=v,r="end"===y?"top":"bottom");let _=w-m.top-m.bottom,C=b-m.left-m.right,k=i(w-m[r],_),E=i(b-m[n],C),S=!t.middlewareData.shift,N=k,P=E;if(x?P=y||S?i(E,C):C:N=y||S?i(k,_):_,S&&!y){let e=o(m.left,0),t=o(m.right,0),r=o(m.top,0),n=o(m.bottom,0);x?P=b-2*(0!==e||0!==t?e+t:o(m.left,m.right)):N=w-2*(0!==r||0!==n?r+n:o(m.top,m.bottom))}await c({...t,availableWidth:P,availableHeight:N});let L=await l.getDimensions(u.floating);return b!==L.width||w!==L.height?{reset:{rects:!0}}:{}}}},es=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=d(e,t);switch(n){case"referenceHidden":{let e=C(await j(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:k(e)}}}case"escaped":{let e=C(await j(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:k(e)}}}default:return{}}}}},el=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:a,rects:s,platform:l,elements:u,middlewareData:c}=t,{element:f,padding:v=0}=d(e,t)||{};if(null==f)return{};let y=x(v),b={x:r,y:n},w=h(g(a)),_=m(w),j=await l.getDimensions(f),C="y"===w,k=C?"clientHeight":"clientWidth",E=s.reference[_]+s.reference[w]-b[w]-s.floating[_],S=b[w]-s.reference[w],N=await (null==l.getOffsetParent?void 0:l.getOffsetParent(f)),P=N?N[k]:0;P&&await (null==l.isElement?void 0:l.isElement(N))||(P=u.floating[k]||s.floating[_]);let L=P/2-j[_]/2-1,T=i(y[C?"top":"left"],L),O=i(y[C?"bottom":"right"],L),R=P-j[_]-O,A=P/2-j[_]/2+(E/2-S/2),I=o(T,i(A,R)),M=!c.arrow&&null!=p(a)&&A!==I&&s.reference[_]/2-(A<T?T:O)-j[_]/2<0,D=M?A<T?A-T:A-R:0;return{[w]:b[w]+D,data:{[w]:I,centerOffset:A-I-D,...M&&{alignmentOffset:D}},reset:M}}}),eu=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=d(e,t),c={x:r,y:n},p=g(i),m=h(p),v=c[m],y=c[p],x=d(s,t),b="number"==typeof x?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(l){let e="y"===m?"height":"width",t=o.reference[m]-o.floating[e]+b.mainAxis,r=o.reference[m]+o.reference[e]-b.mainAxis;v<t?v=t:v>r&&(v=r)}if(u){var w,_;let e="y"===m?"width":"height",t=["top","left"].includes(f(i)),r=o.reference[p]-o.floating[e]+(t&&(null==(w=a.offset)?void 0:w[p])||0)+(t?0:b.crossAxis),n=o.reference[p]+o.reference[e]+(t?0:(null==(_=a.offset)?void 0:_[p])||0)-(t?b.crossAxis:0);y<r?y=r:y>n&&(y=n)}return{[m]:v,[p]:y}}}},ec=(e,t,r)=>{let n=new Map,i={platform:et,...r},o={...i.platform,_c:n};return _(e,t,{...i,platform:o})}},42614:function(e,t,r){"use strict";function n(e,[t,r]){return Math.min(r,Math.max(t,e))}r.d(t,{u:function(){return n}})},36206:function(e,t,r){"use strict";function n(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}r.d(t,{M:function(){return n}})},334:function(e,t,r){"use strict";r.d(t,{VY:function(){return E},fC:function(){return C},p_:function(){return m},xz:function(){return k}});var n=r(87462),i=r(67294),o=r(36206),a=r(25360),s=r(77342),l=r(9981),u=r(28771),c=r(64757),d=r(29115),f=r(91276);let p="Collapsible",[h,m]=(0,a.b)(p),[g,v]=h(p),y=(0,i.forwardRef)((e,t)=>{let{__scopeCollapsible:r,open:o,defaultOpen:a,disabled:l,onOpenChange:u,...d}=e,[p=!1,h]=(0,s.T)({prop:o,defaultProp:a,onChange:u});return(0,i.createElement)(g,{scope:r,disabled:l,contentId:(0,f.M)(),open:p,onOpenToggle:(0,i.useCallback)(()=>h(e=>!e),[h])},(0,i.createElement)(c.WV.div,(0,n.Z)({"data-state":j(p),"data-disabled":l?"":void 0},d,{ref:t})))}),x=(0,i.forwardRef)((e,t)=>{let{__scopeCollapsible:r,...a}=e,s=v("CollapsibleTrigger",r);return(0,i.createElement)(c.WV.button,(0,n.Z)({type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":j(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled},a,{ref:t,onClick:(0,o.M)(e.onClick,s.onOpenToggle)}))}),b="CollapsibleContent",w=(0,i.forwardRef)((e,t)=>{let{forceMount:r,...o}=e,a=v(b,e.__scopeCollapsible);return(0,i.createElement)(d.z,{present:r||a.open},({present:e})=>(0,i.createElement)(_,(0,n.Z)({},o,{ref:t,present:e})))}),_=(0,i.forwardRef)((e,t)=>{let{__scopeCollapsible:r,present:o,children:a,...s}=e,d=v(b,r),[f,p]=(0,i.useState)(o),h=(0,i.useRef)(null),m=(0,u.e)(t,h),g=(0,i.useRef)(0),y=g.current,x=(0,i.useRef)(0),w=x.current,_=d.open||f,C=(0,i.useRef)(_),k=(0,i.useRef)();return(0,i.useEffect)(()=>{let e=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,l.b)(()=>{let e=h.current;if(e){k.current=k.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,x.current=t.width,C.current||(e.style.transitionDuration=k.current.transitionDuration,e.style.animationName=k.current.animationName),p(o)}},[d.open,o]),(0,i.createElement)(c.WV.div,(0,n.Z)({"data-state":j(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!_},s,{ref:m,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style}}),_&&a)});function j(e){return e?"open":"closed"}let C=y,k=x,E=w},13879:function(e,t,r){"use strict";r.d(t,{B:function(){return d}});var n=r(67294),i=r(25360),o=r(28771),a=r(87462);let s=(0,n.forwardRef)((e,t)=>{let{children:r,...i}=e,o=n.Children.toArray(r),s=o.find(c);if(s){let e=s.props.children,r=o.map(t=>t!==s?t:n.Children.count(e)>1?n.Children.only(null):(0,n.isValidElement)(e)?e.props.children:null);return(0,n.createElement)(l,(0,a.Z)({},i,{ref:t}),(0,n.isValidElement)(e)?(0,n.cloneElement)(e,void 0,r):null)}return(0,n.createElement)(l,(0,a.Z)({},i,{ref:t}),r)});s.displayName="Slot";let l=(0,n.forwardRef)((e,t)=>{let{children:r,...i}=e;return(0,n.isValidElement)(r)?(0,n.cloneElement)(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(i,r.props),ref:t?(0,o.F)(t,r.ref):r.ref}):n.Children.count(r)>1?n.Children.only(null):null});l.displayName="SlotClone";let u=({children:e})=>(0,n.createElement)(n.Fragment,null,e);function c(e){return(0,n.isValidElement)(e)&&e.type===u}function d(e){let t=e+"CollectionProvider",[r,a]=(0,i.b)(t),[l,u]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=e+"CollectionSlot",d=n.forwardRef((e,t)=>{let{scope:r,children:i}=e,a=u(c,r),l=(0,o.e)(t,a.collectionRef);return n.createElement(s,{ref:l},i)}),f=e+"CollectionItemSlot",p="data-radix-collection-item";return[{Provider:e=>{let{scope:t,children:r}=e,i=n.useRef(null),o=n.useRef(new Map).current;return n.createElement(l,{scope:t,itemMap:o,collectionRef:i},r)},Slot:d,ItemSlot:n.forwardRef((e,t)=>{let{scope:r,children:i,...a}=e,l=n.useRef(null),c=(0,o.e)(t,l),d=u(f,r);return n.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>void d.itemMap.delete(l))),n.createElement(s,{[p]:"",ref:c},i)})},function(t){let r=u(e+"CollectionConsumer",t);return n.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},a]}},28771:function(e,t,r){"use strict";r.d(t,{F:function(){return i},e:function(){return o}});var n=r(67294);function i(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function o(...e){return(0,n.useCallback)(i(...e),e)}},25360:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(67294);function i(e,t=[]){let r=[],i=()=>{let t=r.map(e=>(0,n.createContext)(e));return function(r){let i=(null==r?void 0:r[e])||t;return(0,n.useMemo)(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return i.scopeName=e,[function(t,i){let o=(0,n.createContext)(i),a=r.length;function s(t){let{scope:r,children:i,...s}=t,l=(null==r?void 0:r[e][a])||o,u=(0,n.useMemo)(()=>s,Object.values(s));return(0,n.createElement)(l.Provider,{value:u},i)}return r=[...r,i],s.displayName=t+"Provider",[s,function(r,s){let l=(null==s?void 0:s[e][a])||o,u=(0,n.useContext)(l);if(u)return u;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return(0,n.useMemo)(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}(i,...t)]}},51865:function(e,t,r){"use strict";r.d(t,{x8:function(){return eF},VY:function(){return eI},dk:function(){return eD},aV:function(){return eA},h_:function(){return eR},fC:function(){return eT},Dx:function(){return eM},xz:function(){return eO}});var n,i=r(67294),o=r.t(i,2);function a(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function s(...e){return i.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}var l=r(85893),u=globalThis?.document?i.useLayoutEffect:()=>{},c=o["useId".toString()]||(()=>void 0),d=0;function f(e){let[t,r]=i.useState(c());return u(()=>{e||r(e=>e??String(d++))},[e]),e||(t?`radix-${t}`:"")}function p(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var h=r(73935),m=r(4222),g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=i.forwardRef((e,r)=>{let{asChild:n,...i}=e,o=n?m.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(o,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),v="dismissableLayer.update",y=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),x=i.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,onDismiss:f,...h}=e,m=i.useContext(y),[x,_]=i.useState(null),j=x?.ownerDocument??globalThis?.document,[,C]=i.useState({}),k=s(t,e=>_(e)),E=Array.from(m.layers),[S]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),N=E.indexOf(S),P=x?E.indexOf(x):-1,L=m.layersWithOutsidePointerEventsDisabled.size>0,T=P>=N,O=function(e,t=globalThis?.document){let r=p(e),n=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){w("dismissableLayer.pointerDownOutside",r,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=n,t.addEventListener("click",o.current,{once:!0})):n()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...m.branches].some(e=>e.contains(t));!T||r||(u?.(e),d?.(e),e.defaultPrevented||f?.())},j),R=function(e,t=globalThis?.document){let r=p(e),n=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!n.current&&w("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;[...m.branches].some(e=>e.contains(t))||(c?.(e),d?.(e),e.defaultPrevented||f?.())},j);return!function(e,t=globalThis?.document){let r=p(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{P!==m.layers.size-1||(o?.(e),!e.defaultPrevented&&f&&(e.preventDefault(),f()))},j),i.useEffect(()=>{if(x)return r&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(n=j.body.style.pointerEvents,j.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(x)),m.layers.add(x),b(),()=>{r&&1===m.layersWithOutsidePointerEventsDisabled.size&&(j.body.style.pointerEvents=n)}},[x,j,r,m]),i.useEffect(()=>()=>{x&&(m.layers.delete(x),m.layersWithOutsidePointerEventsDisabled.delete(x),b())},[x,m]),i.useEffect(()=>{let e=()=>C({});return document.addEventListener(v,e),()=>document.removeEventListener(v,e)},[]),(0,l.jsx)(g.div,{...h,ref:k,style:{pointerEvents:L?T?"auto":"none":void 0,...e.style},onFocusCapture:a(e.onFocusCapture,R.onFocusCapture),onBlurCapture:a(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:a(e.onPointerDownCapture,O.onPointerDownCapture)})});function b(){let e=new CustomEvent(v);document.dispatchEvent(e)}function w(e,t,r,{discrete:n}){let i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});(t&&i.addEventListener(e,t,{once:!0}),n)?i&&h.flushSync(()=>i.dispatchEvent(o)):i.dispatchEvent(o)}x.displayName="DismissableLayer",i.forwardRef((e,t)=>{let r=i.useContext(y),n=i.useRef(null),o=s(t,n);return i.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,l.jsx)(g.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var _=r(72371),j=i.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=i.useState(!1);u(()=>a(!0),[]);let s=r||o&&globalThis?.document?.body;return s?h.createPortal((0,l.jsx)(g.div,{...n,ref:t}),s):null});j.displayName="Portal";var C=e=>{let t,r;let{present:n,children:o}=e,a=function(e){var t,r;let[n,o]=i.useState(),a=i.useRef({}),s=i.useRef(e),l=i.useRef("none"),[c,d]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},i.useReducer((e,t)=>r[e][t]??e,t));return i.useEffect(()=>{let e=k(a.current);l.current="mounted"===c?e:"none"},[c]),u(()=>{let t=a.current,r=s.current;if(r!==e){let n=l.current,i=k(t);e?d("MOUNT"):"none"===i||t?.display==="none"?d("UNMOUNT"):r&&n!==i?d("ANIMATION_OUT"):d("UNMOUNT"),s.current=e}},[e,d]),u(()=>{if(n){let e=e=>{let t=k(a.current).includes(e.animationName);e.target===n&&t&&h.flushSync(()=>d("ANIMATION_END"))},t=e=>{e.target===n&&(l.current=k(a.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(e=>{e&&(a.current=getComputedStyle(e)),o(e)},[])}}(n),l="function"==typeof o?o({present:a.isPresent}):i.Children.only(o),c=s(a.ref,(t=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?l.ref:(t=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?l.props.ref:l.props.ref||l.ref);return"function"==typeof o||a.isPresent?i.cloneElement(l,{ref:c}):null};function k(e){return e?.animationName||"none"}C.displayName="Presence";var E=0;function S(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var N=r(97582),P=r(71642),L=r(99495),T=(0,r(87122)._)(),O=function(){},R=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:O,onWheelCapture:O,onTouchMoveCapture:O}),o=n[0],a=n[1],s=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=e.gapMode,x=(0,N._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=(0,L.q)([r,t]),w=(0,N.pi)((0,N.pi)({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(p,{sideCar:T,removeScrollBar:c,shards:f,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:y}),s?i.cloneElement(i.Children.only(l),(0,N.pi)((0,N.pi)({},w),{ref:b})):i.createElement(void 0===v?"div":v,(0,N.pi)({},w,{className:u,ref:b}),l))});R.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},R.classNames={fullWidth:P.zi,zeroRight:P.pF};var A=r(66781),I=r(37087),M=r(6525),D=!1;if("undefined"!=typeof window)try{var F=Object.defineProperty({},"passive",{get:function(){return D=!0,!0}});window.addEventListener("test",F,F),window.removeEventListener("test",F,F)}catch(e){D=!1}var z=!!D&&{passive:!1},B=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===r[t])},U=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),V(e,n)){var i=$(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},V=function(e,t){return"v"===e?B(t,"overflowY"):B(t,"overflowX")},$=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},H=function(e,t,r,n,i){var o,a=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),s=a*n,l=r.target,u=t.contains(l),c=!1,d=s>0,f=0,p=0;do{var h=$(e,l),m=h[0],g=h[1]-h[2]-a*m;(m||g)&&V(e,l)&&(f+=g,p+=m),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return d&&(i&&1>Math.abs(f)||!i&&s>f)?c=!0:!d&&(i&&1>Math.abs(p)||!i&&-s>p)&&(c=!0),c},Z=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},W=function(e){return[e.deltaX,e.deltaY]},q=function(e){return e&&"current"in e?e.current:e},G=0,Y=[],K=(0,A.L)(T,function(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),o=i.useState(G++)[0],a=i.useState(M.Ws)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,N.ev)([e.lockRef.current],(e.shards||[]).map(q),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var i,o=Z(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-o[0],u="deltaY"in e?e.deltaY:a[1]-o[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=U(d,c);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=U(d,c)),!f)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var p=n.current||i;return H(p,t,e,"h"===p?l:u,!0)},[]),u=i.useCallback(function(e){if(Y.length&&Y[Y.length-1]===a){var r="deltaY"in e?W(e):Z(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta)[0]===r[0]&&n[1]===r[1]})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var i=(s.current.shards||[]).map(q).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?l(e,i[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=i.useCallback(function(e,r,n,i){var o={name:e,delta:r,target:n,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),d=i.useCallback(function(e){r.current=Z(e),n.current=void 0},[]),f=i.useCallback(function(t){c(t.type,W(t),t.target,l(t,e.lockRef.current))},[]),p=i.useCallback(function(t){c(t.type,Z(t),t.target,l(t,e.lockRef.current))},[]);i.useEffect(function(){return Y.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,z),document.addEventListener("touchmove",u,z),document.addEventListener("touchstart",d,z),function(){Y=Y.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,z),document.removeEventListener("touchmove",u,z),document.removeEventListener("touchstart",d,z)}},[]);var h=e.removeScrollBar,m=e.inert;return i.createElement(i.Fragment,null,m?i.createElement(a,{styles:"\n  .block-interactivity-".concat(o," {pointer-events: none;}\n  .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,h?i.createElement(I.jp,{gapMode:e.gapMode}):null)}),X=i.forwardRef(function(e,t){return i.createElement(R,(0,N.pi)({},e,{ref:t,sideCar:K}))});X.classNames=R.classNames;var J=r(23541),Q="Dialog",[ee,et]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>i.createContext(e));return function(r){let n=r?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let o=i.createContext(n),a=r.length;function s(t){let{scope:r,children:n,...s}=t,u=r?.[e][a]||o,c=i.useMemo(()=>s,Object.values(s));return(0,l.jsx)(u.Provider,{value:c,children:n})}return r=[...r,n],s.displayName=t+"Provider",[s,function(r,s){let l=s?.[e][a]||o,u=i.useContext(l);if(u)return u;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(Q),[er,en]=ee(Q),ei=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=i.useRef(null),c=i.useRef(null),[d=!1,h]=function({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,o]=function({defaultProp:e,onChange:t}){let r=i.useState(e),[n]=r,o=i.useRef(n),a=p(t);return i.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}({defaultProp:t,onChange:r}),a=void 0!==e,s=a?e:n,l=p(r);return[s,i.useCallback(t=>{if(a){let r="function"==typeof t?t(e):t;r!==e&&l(r)}else o(t)},[a,e,o,l])]}({prop:n,defaultProp:o,onChange:a});return(0,l.jsx)(er,{scope:t,triggerRef:u,contentRef:c,contentId:f(),titleId:f(),descriptionId:f(),open:d,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(e=>!e),[h]),modal:s,children:r})};ei.displayName=Q;var eo="DialogTrigger",ea=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=en(eo,r),o=s(t,i.triggerRef);return(0,l.jsx)(g.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ek(i.open),...n,ref:o,onClick:a(e.onClick,i.onOpenToggle)})});ea.displayName=eo;var es="DialogPortal",[el,eu]=ee(es,{forceMount:void 0}),ec=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=en(es,t);return(0,l.jsx)(el,{scope:t,forceMount:r,children:i.Children.map(n,e=>(0,l.jsx)(C,{present:r||a.open,children:(0,l.jsx)(j,{asChild:!0,container:o,children:e})}))})};ec.displayName=es;var ed="DialogOverlay",ef=i.forwardRef((e,t)=>{let r=eu(ed,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=en(ed,e.__scopeDialog);return o.modal?(0,l.jsx)(C,{present:n||o.open,children:(0,l.jsx)(ep,{...i,ref:t})}):null});ef.displayName=ed;var ep=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=en(ed,r);return(0,l.jsx)(X,{as:m.g7,allowPinchZoom:!0,shards:[i.contentRef],children:(0,l.jsx)(g.div,{"data-state":ek(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),eh="DialogContent",em=i.forwardRef((e,t)=>{let r=eu(eh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=en(eh,e.__scopeDialog);return(0,l.jsx)(C,{present:n||o.open,children:o.modal?(0,l.jsx)(eg,{...i,ref:t}):(0,l.jsx)(ev,{...i,ref:t})})});em.displayName=eh;var eg=i.forwardRef((e,t)=>{let r=en(eh,e.__scopeDialog),n=i.useRef(null),o=s(t,r.contentRef,n);return i.useEffect(()=>{let e=n.current;if(e)return(0,J.Ry)(e)},[]),(0,l.jsx)(ey,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault())})}),ev=i.forwardRef((e,t)=>{let r=en(eh,e.__scopeDialog),n=i.useRef(!1),o=i.useRef(!1);return(0,l.jsx)(ey,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"!==t.detail.originalEvent.type||(o.current=!0));let i=t.target;r.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),ey=i.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...u}=e,c=en(eh,r),d=i.useRef(null),f=s(t,d);return i.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??S()),document.body.insertAdjacentElement("beforeend",e[1]??S()),E++,()=>{1===E&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),E--}},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_.M,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,l.jsx)(x,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":ek(c.open),...u,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eP,{titleId:c.titleId}),(0,l.jsx)(eL,{contentRef:d,descriptionId:c.descriptionId})]})]})}),ex="DialogTitle",eb=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=en(ex,r);return(0,l.jsx)(g.h2,{id:i.titleId,...n,ref:t})});eb.displayName=ex;var ew="DialogDescription",e_=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=en(ew,r);return(0,l.jsx)(g.p,{id:i.descriptionId,...n,ref:t})});e_.displayName=ew;var ej="DialogClose",eC=i.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=en(ej,r);return(0,l.jsx)(g.button,{type:"button",...n,ref:t,onClick:a(e.onClick,()=>i.onOpenChange(!1))})});function ek(e){return e?"open":"closed"}eC.displayName=ej;var eE="DialogTitleWarning",[eS,eN]=function(e,t){let r=i.createContext(t);function n(e){let{children:t,...n}=e,o=i.useMemo(()=>n,Object.values(n));return(0,l.jsx)(r.Provider,{value:o,children:t})}return n.displayName=e+"Provider",[n,function(n){let o=i.useContext(r);if(o)return o;if(void 0!==t)return t;throw Error(`\`${n}\` must be used within \`${e}\``)}]}(eE,{contentName:eh,titleName:ex,docsSlug:"dialog"}),eP=({titleId:e})=>{let t=eN(eE),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&!document.getElementById(e)&&console.error(r)},[r,e]),null},eL=({contentRef:e,descriptionId:t})=>{let r=eN("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return i.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&!document.getElementById(t)&&console.warn(n)},[n,e,t]),null},eT=ei,eO=ea,eR=ec,eA=ef,eI=em,eM=eb,eD=e_,eF=eC},78990:function(e,t,r){"use strict";r.d(t,{gm:function(){return o}});var n=r(67294);let i=(0,n.createContext)(void 0);function o(e){let t=(0,n.useContext)(i);return e||t||"ltr"}},46063:function(e,t,r){"use strict";let n;r.d(t,{XB:function(){return f}});var i=r(87462),o=r(67294),a=r(36206),s=r(64757),l=r(28771),u=r(79698);let c="dismissableLayer.update",d=(0,o.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f=(0,o.forwardRef)((e,t)=>{var r;let{disableOutsidePointerEvents:f=!1,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:y,onDismiss:x,...b}=e,w=(0,o.useContext)(d),[_,j]=(0,o.useState)(null),C=null!==(r=null==_?void 0:_.ownerDocument)&&void 0!==r?r:null==globalThis?void 0:globalThis.document,[,k]=(0,o.useState)({}),E=(0,l.e)(t,e=>j(e)),S=Array.from(w.layers),[N]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(N),L=_?S.indexOf(_):-1,T=w.layersWithOutsidePointerEventsDisabled.size>0,O=L>=P,R=function(e,t=null==globalThis?void 0:globalThis.document){let r=(0,u.W)(e),n=(0,o.useRef)(!1),i=(0,o.useRef)(()=>{});return(0,o.useEffect)(()=>{let e=e=>{if(e.target&&!n.current){let n={originalEvent:e};function o(){h("dismissableLayer.pointerDownOutside",r,n,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...w.branches].some(e=>e.contains(t));!O||r||(null==g||g(e),null==y||y(e),e.defaultPrevented||null==x||x())},C),A=function(e,t=null==globalThis?void 0:globalThis.document){let r=(0,u.W)(e),n=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{let e=e=>{e.target&&!n.current&&h("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;[...w.branches].some(e=>e.contains(t))||(null==v||v(e),null==y||y(e),e.defaultPrevented||null==x||x())},C);return!function(e,t=null==globalThis?void 0:globalThis.document){let r=(0,u.W)(e);(0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[r,t])}(e=>{L!==w.layers.size-1||(null==m||m(e),!e.defaultPrevented&&x&&(e.preventDefault(),x()))},C),(0,o.useEffect)(()=>{if(_)return f&&(0===w.layersWithOutsidePointerEventsDisabled.size&&(n=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(_)),w.layers.add(_),p(),()=>{f&&1===w.layersWithOutsidePointerEventsDisabled.size&&(C.body.style.pointerEvents=n)}},[_,C,f,w]),(0,o.useEffect)(()=>()=>{_&&(w.layers.delete(_),w.layersWithOutsidePointerEventsDisabled.delete(_),p())},[_,w]),(0,o.useEffect)(()=>{let e=()=>k({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,o.createElement)(s.WV.div,(0,i.Z)({},b,{ref:E,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:(0,a.M)(e.onFocusCapture,A.onFocusCapture),onBlurCapture:(0,a.M)(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:(0,a.M)(e.onPointerDownCapture,R.onPointerDownCapture)}))});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function h(e,t,r,{discrete:n}){let i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?(0,s.jH)(i,o):i.dispatchEvent(o)}},2113:function(e,t,r){"use strict";let n;r.d(t,{oC:function(){return th},VY:function(){return tc},nC:function(){return tn},ZA:function(){return td},ck:function(){return tp},wU:function(){return tv},__:function(){return tf},Uv:function(){return tu},Ee:function(){return tm},Rk:function(){return tg},fC:function(){return ts},Z0:function(){return ty},Tr:function(){return tx},tu:function(){return tw},fF:function(){return tb},xz:function(){return tl}});var i=r(87462),o=r(67294),a=r(36206),s=r(28771),l=r(25360),u=r(77342),c=r(64757),d=r(13879),f=r(78990),p=r(46063),h=r(27552),m=r(79698);let g="focusScope.autoFocusOnMount",v="focusScope.autoFocusOnUnmount",y={bubbles:!1,cancelable:!0},x=(0,o.forwardRef)((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:l,...u}=e,[d,f]=(0,o.useState)(null),p=(0,m.W)(a),h=(0,m.W)(l),x=(0,o.useRef)(null),C=(0,s.e)(t,e=>f(e)),k=(0,o.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,o.useEffect)(()=>{if(n){function e(e){if(k.paused||!d)return;let t=e.target;d.contains(t)?x.current=t:_(x.current,{select:!0})}function t(e){if(k.paused||!d)return;let t=e.relatedTarget;null===t||d.contains(t)||_(x.current,{select:!0})}document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){let t=document.activeElement;for(let r of e)r.removedNodes.length>0&&!(null!=d&&d.contains(t))&&_(d)});return d&&r.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,d,k.paused]),(0,o.useEffect)(()=>{if(d){j.add(k);let e=document.activeElement;if(!d.contains(e)){let t=new CustomEvent(g,y);d.addEventListener(g,p),d.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(_(n,{select:t}),document.activeElement!==r)return}(b(d).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&_(d))}return()=>{d.removeEventListener(g,p),setTimeout(()=>{let t=new CustomEvent(v,y);d.addEventListener(v,h),d.dispatchEvent(t),t.defaultPrevented||_(null!=e?e:document.body,{select:!0}),d.removeEventListener(v,h),j.remove(k)},0)}}},[d,p,h,k]);let E=(0,o.useCallback)(e=>{if(!r&&!n||k.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,o]=function(e){let t=b(e);return[w(t,e),w(t.reverse(),e)]}(t);n&&o?e.shiftKey||i!==o?e.shiftKey&&i===n&&(e.preventDefault(),r&&_(o,{select:!0})):(e.preventDefault(),r&&_(n,{select:!0})):i===t&&e.preventDefault()}},[r,n,k.paused]);return(0,o.createElement)(c.WV.div,(0,i.Z)({tabIndex:-1},u,{ref:C,onKeyDown:E}))});function b(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function w(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function _(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}let j=(n=[],{add(e){let t=n[0];e!==t&&(null==t||t.pause()),(n=C(n,e)).unshift(e)},remove(e){var t;null===(t=(n=C(n,e))[0])||void 0===t||t.resume()}});function C(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var k=r(91276),E=r(16450),S=r(42651),N=r(29115);let P="rovingFocusGroup.onEntryFocus",L={bubbles:!1,cancelable:!0},T="RovingFocusGroup",[O,R,A]=(0,d.B)(T),[I,M]=(0,l.b)(T,[A]),[D,F]=I(T),z=(0,o.forwardRef)((e,t)=>(0,o.createElement)(O.Provider,{scope:e.__scopeRovingFocusGroup},(0,o.createElement)(O.Slot,{scope:e.__scopeRovingFocusGroup},(0,o.createElement)(B,(0,i.Z)({},e,{ref:t}))))),B=(0,o.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:l=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:v,...y}=e,x=(0,o.useRef)(null),b=(0,s.e)(t,x),w=(0,f.gm)(d),[_=null,j]=(0,u.T)({prop:p,defaultProp:h,onChange:g}),[C,k]=(0,o.useState)(!1),E=(0,m.W)(v),S=R(r),N=(0,o.useRef)(!1),[T,O]=(0,o.useState)(0);return(0,o.useEffect)(()=>{let e=x.current;if(e)return e.addEventListener(P,E),()=>e.removeEventListener(P,E)},[E]),(0,o.createElement)(D,{scope:r,orientation:n,dir:w,loop:l,currentTabStopId:_,onItemFocus:(0,o.useCallback)(e=>j(e),[j]),onItemShiftTab:(0,o.useCallback)(()=>k(!0),[]),onFocusableItemAdd:(0,o.useCallback)(()=>O(e=>e+1),[]),onFocusableItemRemove:(0,o.useCallback)(()=>O(e=>e-1),[])},(0,o.createElement)(c.WV.div,(0,i.Z)({tabIndex:C||0===T?-1:0,"data-orientation":n},y,{ref:b,style:{outline:"none",...e.style},onMouseDown:(0,a.M)(e.onMouseDown,()=>{N.current=!0}),onFocus:(0,a.M)(e.onFocus,e=>{let t=!N.current;if(e.target===e.currentTarget&&t&&!C){let t=new CustomEvent(P,L);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);$([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current))}}N.current=!1}),onBlur:(0,a.M)(e.onBlur,()=>k(!1))})))}),U=(0,o.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:l,...u}=e,d=(0,k.M)(),f=l||d,p=F("RovingFocusGroupItem",r),h=p.currentTabStopId===f,m=R(r),{onFocusableItemAdd:g,onFocusableItemRemove:v}=p;return(0,o.useEffect)(()=>{if(n)return g(),()=>v()},[n,g,v]),(0,o.createElement)(O.ItemSlot,{scope:r,id:f,focusable:n,active:s},(0,o.createElement)(c.WV.span,(0,i.Z)({tabIndex:h?0:-1,"data-orientation":p.orientation},u,{ref:t,onMouseDown:(0,a.M)(e.onMouseDown,e=>{n?p.onItemFocus(f):e.preventDefault()}),onFocus:(0,a.M)(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:(0,a.M)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return V[i]}(e,p.orientation,p.dir);if(void 0!==t){e.preventDefault();let i=m().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=p.loop?(r=i,n=o+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(o+1)}setTimeout(()=>$(i))}})})))}),V={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}let H=(0,o.forwardRef)((e,t)=>{let{children:r,...n}=e,a=o.Children.toArray(r),s=a.find(q);if(s){let e=s.props.children,r=a.map(t=>t!==s?t:o.Children.count(e)>1?o.Children.only(null):(0,o.isValidElement)(e)?e.props.children:null);return(0,o.createElement)(Z,(0,i.Z)({},n,{ref:t}),(0,o.isValidElement)(e)?(0,o.cloneElement)(e,void 0,r):null)}return(0,o.createElement)(Z,(0,i.Z)({},n,{ref:t}),r)});H.displayName="Slot";let Z=(0,o.forwardRef)((e,t)=>{let{children:r,...n}=e;return(0,o.isValidElement)(r)?(0,o.cloneElement)(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?(0,s.F)(t,r.ref):r.ref}):o.Children.count(r)>1?o.Children.only(null):null});Z.displayName="SlotClone";let W=({children:e})=>(0,o.createElement)(o.Fragment,null,e);function q(e){return(0,o.isValidElement)(e)&&e.type===W}var G=r(23541),Y=r(42026);let K=["Enter"," "],X=["ArrowUp","PageDown","End"],J=["ArrowDown","PageUp","Home",...X],Q={ltr:[...K,"ArrowRight"],rtl:[...K,"ArrowLeft"]},ee={ltr:["ArrowLeft"],rtl:["ArrowRight"]},et="Menu",[er,en,ei]=(0,d.B)(et),[eo,ea]=(0,l.b)(et,[ei,E.D7,M]),es=(0,E.D7)(),el=M(),[eu,ec]=eo(et),[ed,ef]=eo(et),ep=(0,o.forwardRef)((e,t)=>{let{__scopeMenu:r,...n}=e,a=es(r);return(0,o.createElement)(E.ee,(0,i.Z)({},a,n,{ref:t}))}),eh="MenuPortal",[em,eg]=eo(eh,{forceMount:void 0}),ev="MenuContent",[ey,ex]=eo(ev),eb=(0,o.forwardRef)((e,t)=>{let r=eg(ev,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=ec(ev,e.__scopeMenu),l=ef(ev,e.__scopeMenu);return(0,o.createElement)(er.Provider,{scope:e.__scopeMenu},(0,o.createElement)(N.z,{present:n||s.open},(0,o.createElement)(er.Slot,{scope:e.__scopeMenu},l.modal?(0,o.createElement)(ew,(0,i.Z)({},a,{ref:t})):(0,o.createElement)(e_,(0,i.Z)({},a,{ref:t})))))}),ew=(0,o.forwardRef)((e,t)=>{let r=ec(ev,e.__scopeMenu),n=(0,o.useRef)(null),l=(0,s.e)(t,n);return(0,o.useEffect)(()=>{let e=n.current;if(e)return(0,G.Ry)(e)},[]),(0,o.createElement)(ej,(0,i.Z)({},e,{ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:(0,a.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))}),e_=(0,o.forwardRef)((e,t)=>{let r=ec(ev,e.__scopeMenu);return(0,o.createElement)(ej,(0,i.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))}),ej=(0,o.forwardRef)((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:y,onDismiss:b,disableOutsideScroll:w,..._}=e,j=ec(ev,r),C=ef(ev,r),k=es(r),S=el(r),N=en(r),[P,L]=(0,o.useState)(null),T=(0,o.useRef)(null),O=(0,s.e)(t,T,j.onContentChange),R=(0,o.useRef)(0),A=(0,o.useRef)(""),I=(0,o.useRef)(0),M=(0,o.useRef)(null),D=(0,o.useRef)("right"),F=(0,o.useRef)(0),B=w?Y.Z:o.Fragment,U=e=>{var t,r;let n=A.current+e,i=N().filter(e=>!e.disabled),o=document.activeElement,a=null===(t=i.find(e=>e.ref.current===o))||void 0===t?void 0:t.textValue,s=function(e,t,r){var n;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=(n=Math.max(r?e.indexOf(r):-1,0),e.map((t,r)=>e[(n+r)%e.length]));1===i.length&&(o=o.filter(e=>e!==r));let a=o.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return a!==r?a:void 0}(i.map(e=>e.textValue),n,a),l=null===(r=i.find(e=>e.textValue===s))||void 0===r?void 0:r.ref.current;!function e(t){A.current=t,window.clearTimeout(R.current),""!==t&&(R.current=window.setTimeout(()=>e(""),1e3))}(n),l&&setTimeout(()=>l.focus())};(0,o.useEffect)(()=>()=>window.clearTimeout(R.current),[]),(0,h.EW)();let V=(0,o.useCallback)(e=>{var t,r,n;return D.current===(null===(t=M.current)||void 0===t?void 0:t.side)&&!!(n=null===(r=M.current)||void 0===r?void 0:r.area)&&function(e,t){let{x:r,y:n}=e,i=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){let a=t[e].x,s=t[e].y,l=t[o].x,u=t[o].y;s>n!=u>n&&r<(l-a)*(n-s)/(u-s)+a&&(i=!i)}return i}({x:e.clientX,y:e.clientY},n)},[]);return(0,o.createElement)(ey,{scope:r,searchRef:A,onItemEnter:(0,o.useCallback)(e=>{V(e)&&e.preventDefault()},[V]),onItemLeave:(0,o.useCallback)(e=>{var t;V(e)||(null===(t=T.current)||void 0===t||t.focus(),L(null))},[V]),onTriggerLeave:(0,o.useCallback)(e=>{V(e)&&e.preventDefault()},[V]),pointerGraceTimerRef:I,onPointerGraceIntentChange:(0,o.useCallback)(e=>{M.current=e},[])},(0,o.createElement)(B,w?{as:H,allowPinchZoom:!0}:void 0,(0,o.createElement)(x,{asChild:!0,trapped:l,onMountAutoFocus:(0,a.M)(u,e=>{var t;e.preventDefault(),null===(t=T.current)||void 0===t||t.focus()}),onUnmountAutoFocus:c},(0,o.createElement)(p.XB,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:y,onDismiss:b},(0,o.createElement)(z,(0,i.Z)({asChild:!0},S,{dir:C.dir,orientation:"vertical",loop:n,currentTabStopId:P,onCurrentTabStopIdChange:L,onEntryFocus:(0,a.M)(f,e=>{C.isUsingKeyboardRef.current||e.preventDefault()})}),(0,o.createElement)(E.VY,(0,i.Z)({role:"menu","aria-orientation":"vertical","data-state":eW(j.open),"data-radix-menu-content":"",dir:C.dir},k,_,{ref:O,style:{outline:"none",..._.style},onKeyDown:(0,a.M)(_.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&U(e.key));let i=T.current;if(e.target!==i||!J.includes(e.key))return;e.preventDefault();let o=N().filter(e=>!e.disabled).map(e=>e.ref.current);X.includes(e.key)&&o.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(o)}),onBlur:(0,a.M)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(R.current),A.current="")}),onPointerMove:(0,a.M)(e.onPointerMove,eY(e=>{let t=e.target,r=F.current!==e.clientX;if(e.currentTarget.contains(t)&&r){let t=e.clientX>F.current?"right":"left";D.current=t,F.current=e.clientX}}))})))))))}),eC=(0,o.forwardRef)((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,o.createElement)(c.WV.div,(0,i.Z)({role:"group"},n,{ref:t}))}),ek=(0,o.forwardRef)((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,o.createElement)(c.WV.div,(0,i.Z)({},n,{ref:t}))}),eE="MenuItem",eS="menu.itemSelect",eN=(0,o.forwardRef)((e,t)=>{let{disabled:r=!1,onSelect:n,...l}=e,u=(0,o.useRef)(null),d=ef(eE,e.__scopeMenu),f=ex(eE,e.__scopeMenu),p=(0,s.e)(t,u),h=(0,o.useRef)(!1);return(0,o.createElement)(eP,(0,i.Z)({},l,{ref:p,disabled:r,onClick:(0,a.M)(e.onClick,()=>{let e=u.current;if(!r&&e){let t=new CustomEvent(eS,{bubbles:!0,cancelable:!0});e.addEventListener(eS,e=>null==n?void 0:n(e),{once:!0}),(0,c.jH)(e,t),t.defaultPrevented?h.current=!1:d.onClose()}}),onPointerDown:t=>{var r;null===(r=e.onPointerDown)||void 0===r||r.call(e,t),h.current=!0},onPointerUp:(0,a.M)(e.onPointerUp,e=>{var t;h.current||null===(t=e.currentTarget)||void 0===t||t.click()}),onKeyDown:(0,a.M)(e.onKeyDown,e=>{let t=""!==f.searchRef.current;!r&&(!t||" "!==e.key)&&K.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})}))}),eP=(0,o.forwardRef)((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:l,...u}=e,d=ex(eE,r),f=el(r),p=(0,o.useRef)(null),h=(0,s.e)(t,p),[m,g]=(0,o.useState)(!1),[v,y]=(0,o.useState)("");return(0,o.useEffect)(()=>{let e=p.current;if(e){var t;y((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}},[u.children]),(0,o.createElement)(er.ItemSlot,{scope:r,disabled:n,textValue:null!=l?l:v},(0,o.createElement)(U,(0,i.Z)({asChild:!0},f,{focusable:!n}),(0,o.createElement)(c.WV.div,(0,i.Z)({role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},u,{ref:h,onPointerMove:(0,a.M)(e.onPointerMove,eY(e=>{n?d.onItemLeave(e):(d.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())})),onPointerLeave:(0,a.M)(e.onPointerLeave,eY(e=>d.onItemLeave(e))),onFocus:(0,a.M)(e.onFocus,()=>g(!0)),onBlur:(0,a.M)(e.onBlur,()=>g(!1))}))))}),eL=(0,o.forwardRef)((e,t)=>{let{checked:r=!1,onCheckedChange:n,...s}=e;return(0,o.createElement)(eM,{scope:e.__scopeMenu,checked:r},(0,o.createElement)(eN,(0,i.Z)({role:"menuitemcheckbox","aria-checked":eq(r)?"mixed":r},s,{ref:t,"data-state":eG(r),onSelect:(0,a.M)(s.onSelect,()=>null==n?void 0:n(!!eq(r)||!r),{checkForDefaultPrevented:!1})})))}),[eT,eO]=eo("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),eR=(0,o.forwardRef)((e,t)=>{let{value:r,onValueChange:n,...a}=e,s=(0,m.W)(n);return(0,o.createElement)(eT,{scope:e.__scopeMenu,value:r,onValueChange:s},(0,o.createElement)(eC,(0,i.Z)({},a,{ref:t})))}),eA=(0,o.forwardRef)((e,t)=>{let{value:r,...n}=e,s=eO("MenuRadioItem",e.__scopeMenu),l=r===s.value;return(0,o.createElement)(eM,{scope:e.__scopeMenu,checked:l},(0,o.createElement)(eN,(0,i.Z)({role:"menuitemradio","aria-checked":l},n,{ref:t,"data-state":eG(l),onSelect:(0,a.M)(n.onSelect,()=>{var e;return null===(e=s.onValueChange)||void 0===e?void 0:e.call(s,r)},{checkForDefaultPrevented:!1})})))}),eI="MenuItemIndicator",[eM,eD]=eo(eI,{checked:!1}),eF=(0,o.forwardRef)((e,t)=>{let{__scopeMenu:r,forceMount:n,...a}=e,s=eD(eI,r);return(0,o.createElement)(N.z,{present:n||eq(s.checked)||!0===s.checked},(0,o.createElement)(c.WV.span,(0,i.Z)({},a,{ref:t,"data-state":eG(s.checked)})))}),ez=(0,o.forwardRef)((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,o.createElement)(c.WV.div,(0,i.Z)({role:"separator","aria-orientation":"horizontal"},n,{ref:t}))}),eB=((e,t)=>{let{__scopeMenu:r,...n}=e,a=es(r);return(0,o.createElement)(E.Eh,(0,i.Z)({},a,n,{ref:t}))},"MenuSub"),[eU,eV]=eo(eB),e$="MenuSubTrigger",eH=(0,o.forwardRef)((e,t)=>{let r=ec(e$,e.__scopeMenu),n=ef(e$,e.__scopeMenu),l=eV(e$,e.__scopeMenu),u=ex(e$,e.__scopeMenu),c=(0,o.useRef)(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=u,p={__scopeMenu:e.__scopeMenu},h=(0,o.useCallback)(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return(0,o.useEffect)(()=>h,[h]),(0,o.useEffect)(()=>{let e=d.current;return()=>{window.clearTimeout(e),f(null)}},[d,f]),(0,o.createElement)(ep,(0,i.Z)({asChild:!0},p),(0,o.createElement)(eP,(0,i.Z)({id:l.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":l.contentId,"data-state":eW(r.open)},e,{ref:(0,s.F)(t,l.onTriggerChange),onClick:t=>{var n;null===(n=e.onClick)||void 0===n||n.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:(0,a.M)(e.onPointerMove,eY(t=>{u.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||c.current||(u.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),h()},100))})),onPointerLeave:(0,a.M)(e.onPointerLeave,eY(e=>{var t,n;h();let i=null===(t=r.content)||void 0===t?void 0:t.getBoundingClientRect();if(i){let t=null===(n=r.content)||void 0===n?void 0:n.dataset.side,o="right"===t,a=i[o?"left":"right"],s=i[o?"right":"left"];u.onPointerGraceIntentChange({area:[{x:e.clientX+(o?-5:5),y:e.clientY},{x:a,y:i.top},{x:s,y:i.top},{x:s,y:i.bottom},{x:a,y:i.bottom}],side:t}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(e),e.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:(0,a.M)(e.onKeyDown,t=>{let i=""!==u.searchRef.current;if(!e.disabled&&(!i||" "!==t.key)&&Q[n.dir].includes(t.key)){var o;r.onOpenChange(!0),null===(o=r.content)||void 0===o||o.focus(),t.preventDefault()}})})))}),eZ=(0,o.forwardRef)((e,t)=>{let r=eg(ev,e.__scopeMenu),{forceMount:n=r.forceMount,...l}=e,u=ec(ev,e.__scopeMenu),c=ef(ev,e.__scopeMenu),d=eV("MenuSubContent",e.__scopeMenu),f=(0,o.useRef)(null),p=(0,s.e)(t,f);return(0,o.createElement)(er.Provider,{scope:e.__scopeMenu},(0,o.createElement)(N.z,{present:n||u.open},(0,o.createElement)(er.Slot,{scope:e.__scopeMenu},(0,o.createElement)(ej,(0,i.Z)({id:d.contentId,"aria-labelledby":d.triggerId},l,{ref:p,align:"start",side:"rtl"===c.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;c.isUsingKeyboardRef.current&&(null===(t=f.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,a.M)(e.onFocusOutside,e=>{e.target!==d.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:(0,a.M)(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:(0,a.M)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=ee[c.dir].includes(e.key);if(t&&r){var n;u.onOpenChange(!1),null===(n=d.trigger)||void 0===n||n.focus(),e.preventDefault()}})})))))});function eW(e){return e?"open":"closed"}function eq(e){return"indeterminate"===e}function eG(e){return eq(e)?"indeterminate":e?"checked":"unchecked"}function eY(e){return t=>"mouse"===t.pointerType?e(t):void 0}let eK=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:a,modal:s=!0}=e,l=es(t),[u,c]=(0,o.useState)(null),d=(0,o.useRef)(!1),p=(0,m.W)(a),h=(0,f.gm)(i);return(0,o.useEffect)(()=>{let e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,o.createElement)(E.fC,l,(0,o.createElement)(eu,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:c},(0,o.createElement)(ed,{scope:t,onClose:(0,o.useCallback)(()=>p(!1),[p]),isUsingKeyboardRef:d,dir:h,modal:s},n)))},eX=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:i}=e,a=ec(eh,t);return(0,o.createElement)(em,{scope:t,forceMount:r},(0,o.createElement)(N.z,{present:r||a.open},(0,o.createElement)(S.h,{asChild:!0,container:i},n)))},eJ=e=>{let{__scopeMenu:t,children:r,open:n=!1,onOpenChange:i}=e,a=ec(eB,t),s=es(t),[l,u]=(0,o.useState)(null),[c,d]=(0,o.useState)(null),f=(0,m.W)(i);return(0,o.useEffect)(()=>(!1===a.open&&f(!1),()=>f(!1)),[a.open,f]),(0,o.createElement)(E.fC,s,(0,o.createElement)(eu,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:d},(0,o.createElement)(eU,{scope:t,contentId:(0,k.M)(),triggerId:(0,k.M)(),trigger:l,onTriggerChange:u},r)))},eQ="DropdownMenu",[e0,e1]=(0,l.b)(eQ,[ea]),e2=ea(),[e5,e4]=e0(eQ),e3=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...l}=e,u=e4("DropdownMenuTrigger",r),d=e2(r);return(0,o.createElement)(ep,(0,i.Z)({asChild:!0},d),(0,o.createElement)(c.WV.button,(0,i.Z)({type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":n?"":void 0,disabled:n},l,{ref:(0,s.F)(t,u.triggerRef),onPointerDown:(0,a.M)(e.onPointerDown,e=>{n||0!==e.button||!1!==e.ctrlKey||(u.onOpenToggle(),u.open||e.preventDefault())}),onKeyDown:(0,a.M)(e.onKeyDown,e=>{!n&&(["Enter"," "].includes(e.key)&&u.onOpenToggle(),"ArrowDown"===e.key&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})))}),e6=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=e4("DropdownMenuContent",r),l=e2(r),u=(0,o.useRef)(!1);return(0,o.createElement)(eb,(0,i.Z)({id:s.contentId,"aria-labelledby":s.triggerId},l,n,{ref:t,onCloseAutoFocus:(0,a.M)(e.onCloseAutoFocus,e=>{var t;u.current||null===(t=s.triggerRef.current)||void 0===t||t.focus(),u.current=!1,e.preventDefault()}),onInteractOutside:(0,a.M)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!s.modal||n)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),e8=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(eC,(0,i.Z)({},a,n,{ref:t}))}),e7=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(ek,(0,i.Z)({},a,n,{ref:t}))}),e9=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(eN,(0,i.Z)({},a,n,{ref:t}))}),te=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(eL,(0,i.Z)({},a,n,{ref:t}))}),tt=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(eR,(0,i.Z)({},a,n,{ref:t}))}),tr=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(eA,(0,i.Z)({},a,n,{ref:t}))}),tn=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(eF,(0,i.Z)({},a,n,{ref:t}))}),ti=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(ez,(0,i.Z)({},a,n,{ref:t}))}),to=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(eH,(0,i.Z)({},a,n,{ref:t}))}),ta=(0,o.forwardRef)((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=e2(r);return(0,o.createElement)(eZ,(0,i.Z)({},a,n,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),ts=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,d=e2(t),f=(0,o.useRef)(null),[p=!1,h]=(0,u.T)({prop:a,defaultProp:s,onChange:l});return(0,o.createElement)(e5,{scope:t,triggerId:(0,k.M)(),triggerRef:f,contentId:(0,k.M)(),open:p,onOpenChange:h,onOpenToggle:(0,o.useCallback)(()=>h(e=>!e),[h]),modal:c},(0,o.createElement)(eK,(0,i.Z)({},d,{open:p,onOpenChange:h,dir:n,modal:c}),r))},tl=e3,tu=e=>{let{__scopeDropdownMenu:t,...r}=e,n=e2(t);return(0,o.createElement)(eX,(0,i.Z)({},n,r))},tc=e6,td=e8,tf=e7,tp=e9,th=te,tm=tt,tg=tr,tv=tn,ty=ti,tx=e=>{let{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:a,defaultOpen:s}=e,l=e2(t),[c=!1,d]=(0,u.T)({prop:n,defaultProp:s,onChange:a});return(0,o.createElement)(eJ,(0,i.Z)({},l,{open:c,onOpenChange:d}),r)},tb=to,tw=ta},27552:function(e,t,r){"use strict";r.d(t,{EW:function(){return o}});var n=r(67294);let i=0;function o(){(0,n.useEffect)(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:a()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:a()),i++,()=>{1===i&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),i--}},[])}function a(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}},72371:function(e,t,r){"use strict";let n;r.d(t,{M:function(){return f}});var i=r(67294);r(73935);var o=r(4222),a=r(85893),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=i.forwardRef((e,r)=>{let{asChild:n,...i}=e,s=n?o.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(s,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function l(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var u="focusScope.autoFocusOnMount",c="focusScope.autoFocusOnUnmount",d={bubbles:!1,cancelable:!0},f=i.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:f,...v}=e,[y,x]=i.useState(null),b=l(o),w=l(f),_=i.useRef(null),j=function(...e){return i.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}(t,e=>x(e)),C=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let e=function(e){if(C.paused||!y)return;let t=e.target;y.contains(t)?_.current=t:m(_.current,{select:!0})},t=function(e){if(C.paused||!y)return;let t=e.relatedTarget;null===t||y.contains(t)||m(_.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&m(y)});return y&&r.observe(y,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,y,C.paused]),i.useEffect(()=>{if(y){g.add(C);let e=document.activeElement;if(!y.contains(e)){let t=new CustomEvent(u,d);y.addEventListener(u,b),y.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(m(n,{select:t}),document.activeElement!==r)return}(p(y).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&m(y))}return()=>{y.removeEventListener(u,b),setTimeout(()=>{let t=new CustomEvent(c,d);y.addEventListener(c,w),y.dispatchEvent(t),t.defaultPrevented||m(e??document.body,{select:!0}),y.removeEventListener(c,w),g.remove(C)},0)}}},[y,b,w,C]);let k=i.useCallback(e=>{if(!r&&!n||C.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,o]=function(e){let t=p(e);return[h(t,e),h(t.reverse(),e)]}(t);n&&o?e.shiftKey||i!==o?e.shiftKey&&i===n&&(e.preventDefault(),r&&m(o,{select:!0})):(e.preventDefault(),r&&m(n,{select:!0})):i===t&&e.preventDefault()}},[r,n,C.paused]);return(0,a.jsx)(s.div,{tabIndex:-1,...v,ref:j,onKeyDown:k})});function p(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function h(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function m(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}f.displayName="FocusScope";var g=(n=[],{add(e){let t=n[0];e!==t&&t?.pause(),(n=v(n,e)).unshift(e)},remove(e){n=v(n,e),n[0]?.resume()}});function v(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}},40:function(e,t,r){"use strict";let n;r.d(t,{VY:function(){return O},fC:function(){return P},h_:function(){return T},xz:function(){return L}});var i=r(87462),o=r(67294),a=r(36206),s=r(25360),l=r(77342),u=r(28771),c=r(16450),d=r(42651),f=r(29115),p=r(64757),h=r(46063);let m="HoverCard",[g,v]=(0,s.b)(m,[c.D7]),y=(0,c.D7)(),[x,b]=g(m),w=(0,o.forwardRef)((e,t)=>{let{__scopeHoverCard:r,...n}=e,s=b("HoverCardTrigger",r),l=y(r);return(0,o.createElement)(c.ee,(0,i.Z)({asChild:!0},l),(0,o.createElement)(p.WV.a,(0,i.Z)({"data-state":s.open?"open":"closed"},n,{ref:t,onPointerEnter:(0,a.M)(e.onPointerEnter,N(s.onOpen)),onPointerLeave:(0,a.M)(e.onPointerLeave,N(s.onClose)),onFocus:(0,a.M)(e.onFocus,s.onOpen),onBlur:(0,a.M)(e.onBlur,s.onClose),onTouchStart:(0,a.M)(e.onTouchStart,e=>e.preventDefault())})))}),_="HoverCardPortal",[j,C]=g(_,{forceMount:void 0}),k="HoverCardContent",E=(0,o.forwardRef)((e,t)=>{let r=C(k,e.__scopeHoverCard),{forceMount:n=r.forceMount,...s}=e,l=b(k,e.__scopeHoverCard);return(0,o.createElement)(f.z,{present:n||l.open},(0,o.createElement)(S,(0,i.Z)({"data-state":l.open?"open":"closed"},s,{onPointerEnter:(0,a.M)(e.onPointerEnter,N(l.onOpen)),onPointerLeave:(0,a.M)(e.onPointerLeave,N(l.onClose)),ref:t})))}),S=(0,o.forwardRef)((e,t)=>{let{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,...p}=e,m=b(k,r),g=y(r),v=(0,o.useRef)(null),x=(0,u.e)(t,v),[w,_]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(w){let e=document.body;return n=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=n,e.style.webkitUserSelect=n}}},[w]),(0,o.useEffect)(()=>{if(v.current){let e=()=>{_(!1),m.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;(null===(e=document.getSelection())||void 0===e?void 0:e.toString())!==""&&(m.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!1}}},[m.isPointerDownOnContentRef,m.hasSelectionRef]),(0,o.useEffect)(()=>{v.current&&(function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t})(v.current).forEach(e=>e.setAttribute("tabindex","-1"))}),(0,o.createElement)(h.XB,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:(0,a.M)(d,e=>{e.preventDefault()}),onDismiss:m.onDismiss},(0,o.createElement)(c.VY,(0,i.Z)({},g,p,{onPointerDown:(0,a.M)(p.onPointerDown,e=>{e.currentTarget.contains(e.target)&&_(!0),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!0}),ref:x,style:{...p.style,userSelect:w?"text":void 0,WebkitUserSelect:w?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))});function N(e){return t=>"touch"===t.pointerType?void 0:e()}let P=e=>{let{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:a,openDelay:s=700,closeDelay:u=300}=e,d=y(t),f=(0,o.useRef)(0),p=(0,o.useRef)(0),h=(0,o.useRef)(!1),m=(0,o.useRef)(!1),[g=!1,v]=(0,l.T)({prop:n,defaultProp:i,onChange:a}),b=(0,o.useCallback)(()=>{clearTimeout(p.current),f.current=window.setTimeout(()=>v(!0),s)},[s,v]),w=(0,o.useCallback)(()=>{clearTimeout(f.current),h.current||m.current||(p.current=window.setTimeout(()=>v(!1),u))},[u,v]),_=(0,o.useCallback)(()=>v(!1),[v]);return(0,o.useEffect)(()=>()=>{clearTimeout(f.current),clearTimeout(p.current)},[]),(0,o.createElement)(x,{scope:t,open:g,onOpenChange:v,onOpen:b,onClose:w,onDismiss:_,hasSelectionRef:h,isPointerDownOnContentRef:m},(0,o.createElement)(c.fC,d,r))},L=w,T=e=>{let{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,a=b(_,t);return(0,o.createElement)(j,{scope:t,forceMount:r},(0,o.createElement)(f.z,{present:r||a.open},(0,o.createElement)(d.h,{asChild:!0,container:i},n)))},O=E},91276:function(e,t,r){"use strict";r.d(t,{M:function(){return l}});var n,i=r(67294),o=r(9981);let a=(n||(n=r.t(i,2)))["useId".toString()]||(()=>void 0),s=0;function l(e){let[t,r]=i.useState(a());return(0,o.b)(()=>{e||r(e=>null!=e?e:String(s++))},[e]),e||(t?`radix-${t}`:"")}},90021:function(e,t,r){"use strict";r.d(t,{ee:function(){return eZ},Eh:function(){return eK},x8:function(){return eY},VY:function(){return eG},h_:function(){return eq},fC:function(){return eH},xz:function(){return eW}});var n,i=r(67294),o=r.t(i,2);function a(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function s(...e){return i.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}var l=r(85893);function u(e,t=[]){let r=[],n=()=>{let t=r.map(e=>i.createContext(e));return function(r){let n=r?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let o=i.createContext(n),a=r.length;function s(t){let{scope:r,children:n,...s}=t,u=r?.[e][a]||o,c=i.useMemo(()=>s,Object.values(s));return(0,l.jsx)(u.Provider,{value:c,children:n})}return r=[...r,n],s.displayName=t+"Provider",[s,function(r,s){let l=s?.[e][a]||o,u=i.useContext(l);if(u)return u;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}var c=r(73935),d=r(4222),f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=i.forwardRef((e,r)=>{let{asChild:n,...i}=e,o=n?d.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(o,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function p(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var h="dismissableLayer.update",m=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),g=i.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,onDismiss:g,...x}=e,b=i.useContext(m),[w,_]=i.useState(null),j=w?.ownerDocument??globalThis?.document,[,C]=i.useState({}),k=s(t,e=>_(e)),E=Array.from(b.layers),[S]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),N=E.indexOf(S),P=w?E.indexOf(w):-1,L=b.layersWithOutsidePointerEventsDisabled.size>0,T=P>=N,O=function(e,t=globalThis?.document){let r=p(e),n=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){y("dismissableLayer.pointerDownOutside",r,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=n,t.addEventListener("click",o.current,{once:!0})):n()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...b.branches].some(e=>e.contains(t));!T||r||(u?.(e),d?.(e),e.defaultPrevented||g?.())},j),R=function(e,t=globalThis?.document){let r=p(e),n=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!n.current&&y("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;[...b.branches].some(e=>e.contains(t))||(c?.(e),d?.(e),e.defaultPrevented||g?.())},j);return!function(e,t=globalThis?.document){let r=p(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{P!==b.layers.size-1||(o?.(e),!e.defaultPrevented&&g&&(e.preventDefault(),g()))},j),i.useEffect(()=>{if(w)return r&&(0===b.layersWithOutsidePointerEventsDisabled.size&&(n=j.body.style.pointerEvents,j.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),v(),()=>{r&&1===b.layersWithOutsidePointerEventsDisabled.size&&(j.body.style.pointerEvents=n)}},[w,j,r,b]),i.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersWithOutsidePointerEventsDisabled.delete(w),v())},[w,b]),i.useEffect(()=>{let e=()=>C({});return document.addEventListener(h,e),()=>document.removeEventListener(h,e)},[]),(0,l.jsx)(f.div,{...x,ref:k,style:{pointerEvents:L?T?"auto":"none":void 0,...e.style},onFocusCapture:a(e.onFocusCapture,R.onFocusCapture),onBlurCapture:a(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:a(e.onPointerDownCapture,O.onPointerDownCapture)})});function v(){let e=new CustomEvent(h);document.dispatchEvent(e)}function y(e,t,r,{discrete:n}){let i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});(t&&i.addEventListener(e,t,{once:!0}),n)?i&&c.flushSync(()=>i.dispatchEvent(o)):i.dispatchEvent(o)}g.displayName="DismissableLayer",i.forwardRef((e,t)=>{let r=i.useContext(m),n=i.useRef(null),o=s(t,n);return i.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,l.jsx)(f.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var x=0;function b(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var w=r(72371),_=globalThis?.document?i.useLayoutEffect:()=>{},j=o["useId".toString()]||(()=>void 0),C=0,k=r(1371),E=r(41737),S=i.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...o}=e;return(0,l.jsx)(f.svg,{...o,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,l.jsx)("polygon",{points:"0,0 30,0 15,10"})})});S.displayName="Arrow";var N="Popper",[P,L]=u(N),[T,O]=P(N),R=e=>{let{__scopePopper:t,children:r}=e,[n,o]=i.useState(null);return(0,l.jsx)(T,{scope:t,anchor:n,onAnchorChange:o,children:r})};R.displayName=N;var A="PopperAnchor",I=i.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,a=O(A,r),u=i.useRef(null),c=s(t,u);return i.useEffect(()=>{a.onAnchorChange(n?.current||u.current)}),n?null:(0,l.jsx)(f.div,{...o,ref:c})});I.displayName=A;var M="PopperContent",[D,F]=P(M),z=i.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:x,...b}=e,w=O(M,r),[j,C]=i.useState(null),S=s(t,e=>C(e)),[N,P]=i.useState(null),L=function(e){let[t,r]=i.useState(void 0);return _(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}(N),T=L?.width??0,R=L?.height??0,A="number"==typeof m?m:{top:0,right:0,bottom:0,left:0,...m},I=Array.isArray(h)?h:[h],F=I.length>0,z={padding:A,boundary:I.filter($),altBoundary:F},{refs:B,floatingStyles:U,placement:V,isPositioned:W,middlewareData:q}=(0,k.YF)({strategy:"fixed",placement:n+("center"!==a?"-"+a:""),whileElementsMounted:(...e)=>(0,E.Me)(...e,{animationFrame:"always"===y}),elements:{reference:w.anchor},middleware:[(0,k.cv)({mainAxis:o+R,alignmentAxis:u}),d&&(0,k.uY)({mainAxis:!0,crossAxis:!1,limiter:"partial"===g?(0,k.dr)():void 0,...z}),d&&(0,k.RR)({...z}),(0,k.dp)({...z,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:i,height:o}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${i}px`),a.setProperty("--radix-popper-anchor-height",`${o}px`)}}),N&&(0,k.x7)({element:N,padding:c}),H({arrowWidth:T,arrowHeight:R}),v&&(0,k.Cp)({strategy:"referenceHidden",...z})]}),[G,Y]=Z(V),K=p(x);_(()=>{W&&K?.()},[W,K]);let X=q.arrow?.x,J=q.arrow?.y,Q=q.arrow?.centerOffset!==0,[ee,et]=i.useState();return _(()=>{j&&et(window.getComputedStyle(j).zIndex)},[j]),(0,l.jsx)("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:W?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,l.jsx)(D,{scope:r,placedSide:G,onArrowChange:P,arrowX:X,arrowY:J,shouldHideArrow:Q,children:(0,l.jsx)(f.div,{"data-side":G,"data-align":Y,...b,ref:S,style:{...b.style,animation:W?void 0:"none"}})})})});z.displayName=M;var B="PopperArrow",U={top:"bottom",right:"left",bottom:"top",left:"right"},V=i.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=F(B,r),o=U[i.placedSide];return(0,l.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,l.jsx)(S,{...n,ref:t,style:{...n.style,display:"block"}})})});function $(e){return null!==e}V.displayName=B;var H=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:i}=t,o=i.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,s=o?0:e.arrowHeight,[l,u]=Z(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(i.arrow?.x??0)+a/2,f=(i.arrow?.y??0)+s/2,p="",h="";return"bottom"===l?(p=o?c:`${d}px`,h=`${-s}px`):"top"===l?(p=o?c:`${d}px`,h=`${n.floating.height+s}px`):"right"===l?(p=`${-s}px`,h=o?c:`${f}px`):"left"===l&&(p=`${n.floating.width+s}px`,h=o?c:`${f}px`),{data:{x:p,y:h}}}});function Z(e){let[t,r="center"]=e.split("-");return[t,r]}var W=i.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=i.useState(!1);_(()=>a(!0),[]);let s=r||o&&globalThis?.document?.body;return s?c.createPortal((0,l.jsx)(f.div,{...n,ref:t}),s):null});W.displayName="Portal";var q=e=>{let t,r;let{present:n,children:o}=e,a=function(e){var t,r;let[n,o]=i.useState(),a=i.useRef({}),s=i.useRef(e),l=i.useRef("none"),[u,d]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},i.useReducer((e,t)=>r[e][t]??e,t));return i.useEffect(()=>{let e=G(a.current);l.current="mounted"===u?e:"none"},[u]),_(()=>{let t=a.current,r=s.current;if(r!==e){let n=l.current,i=G(t);e?d("MOUNT"):"none"===i||t?.display==="none"?d("UNMOUNT"):r&&n!==i?d("ANIMATION_OUT"):d("UNMOUNT"),s.current=e}},[e,d]),_(()=>{if(n){let e=e=>{let t=G(a.current).includes(e.animationName);e.target===n&&t&&c.flushSync(()=>d("ANIMATION_END"))},t=e=>{e.target===n&&(l.current=G(a.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(e=>{e&&(a.current=getComputedStyle(e)),o(e)},[])}}(n),l="function"==typeof o?o({present:a.isPresent}):i.Children.only(o),u=s(a.ref,(t=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?l.ref:(t=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?l.props.ref:l.props.ref||l.ref);return"function"==typeof o||a.isPresent?i.cloneElement(l,{ref:u}):null};function G(e){return e?.animationName||"none"}q.displayName="Presence";var Y=r(23541),K=r(97582),X=r(71642),J=r(99495),Q=(0,r(87122)._)(),ee=function(){},et=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:ee,onWheelCapture:ee,onTouchMoveCapture:ee}),o=n[0],a=n[1],s=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=e.gapMode,x=(0,K._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=(0,J.q)([r,t]),w=(0,K.pi)((0,K.pi)({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(p,{sideCar:Q,removeScrollBar:c,shards:f,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:y}),s?i.cloneElement(i.Children.only(l),(0,K.pi)((0,K.pi)({},w),{ref:b})):i.createElement(void 0===v?"div":v,(0,K.pi)({},w,{className:u,ref:b}),l))});et.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},et.classNames={fullWidth:X.zi,zeroRight:X.pF};var er=r(66781),en=r(37087),ei=r(6525),eo=!1;if("undefined"!=typeof window)try{var ea=Object.defineProperty({},"passive",{get:function(){return eo=!0,!0}});window.addEventListener("test",ea,ea),window.removeEventListener("test",ea,ea)}catch(e){eo=!1}var es=!!eo&&{passive:!1},el=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===r[t])},eu=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ec(e,n)){var i=ed(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ec=function(e,t){return"v"===e?el(t,"overflowY"):el(t,"overflowX")},ed=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},ef=function(e,t,r,n,i){var o,a=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),s=a*n,l=r.target,u=t.contains(l),c=!1,d=s>0,f=0,p=0;do{var h=ed(e,l),m=h[0],g=h[1]-h[2]-a*m;(m||g)&&ec(e,l)&&(f+=g,p+=m),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return d&&(i&&1>Math.abs(f)||!i&&s>f)?c=!0:!d&&(i&&1>Math.abs(p)||!i&&-s>p)&&(c=!0),c},ep=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eh=function(e){return[e.deltaX,e.deltaY]},em=function(e){return e&&"current"in e?e.current:e},eg=0,ev=[],ey=(0,er.L)(Q,function(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),o=i.useState(eg++)[0],a=i.useState(ei.Ws)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,K.ev)([e.lockRef.current],(e.shards||[]).map(em),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var i,o=ep(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-o[0],u="deltaY"in e?e.deltaY:a[1]-o[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=eu(d,c);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=eu(d,c)),!f)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var p=n.current||i;return ef(p,t,e,"h"===p?l:u,!0)},[]),u=i.useCallback(function(e){if(ev.length&&ev[ev.length-1]===a){var r="deltaY"in e?eh(e):ep(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta)[0]===r[0]&&n[1]===r[1]})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var i=(s.current.shards||[]).map(em).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?l(e,i[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=i.useCallback(function(e,r,n,i){var o={name:e,delta:r,target:n,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),d=i.useCallback(function(e){r.current=ep(e),n.current=void 0},[]),f=i.useCallback(function(t){c(t.type,eh(t),t.target,l(t,e.lockRef.current))},[]),p=i.useCallback(function(t){c(t.type,ep(t),t.target,l(t,e.lockRef.current))},[]);i.useEffect(function(){return ev.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,es),document.addEventListener("touchmove",u,es),document.addEventListener("touchstart",d,es),function(){ev=ev.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,es),document.removeEventListener("touchmove",u,es),document.removeEventListener("touchstart",d,es)}},[]);var h=e.removeScrollBar,m=e.inert;return i.createElement(i.Fragment,null,m?i.createElement(a,{styles:"\n  .block-interactivity-".concat(o," {pointer-events: none;}\n  .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,h?i.createElement(en.jp,{gapMode:e.gapMode}):null)}),ex=i.forwardRef(function(e,t){return i.createElement(et,(0,K.pi)({},e,{ref:t,sideCar:ey}))});ex.classNames=et.classNames;var eb="Popover",[ew,e_]=u(eb,[L]),ej=L(),[eC,ek]=ew(eb),eE=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,u=ej(t),c=i.useRef(null),[d,f]=i.useState(!1),[h=!1,m]=function({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,o]=function({defaultProp:e,onChange:t}){let r=i.useState(e),[n]=r,o=i.useRef(n),a=p(t);return i.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}({defaultProp:t,onChange:r}),a=void 0!==e,s=a?e:n,l=p(r);return[s,i.useCallback(t=>{if(a){let r="function"==typeof t?t(e):t;r!==e&&l(r)}else o(t)},[a,e,o,l])]}({prop:n,defaultProp:o,onChange:a});return(0,l.jsx)(R,{...u,children:(0,l.jsx)(eC,{scope:t,contentId:function(e){let[t,r]=i.useState(j());return _(()=>{r(e=>e??String(C++))},[void 0]),t?`radix-${t}`:""}(),triggerRef:c,open:h,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>f(!0),[]),onCustomAnchorRemove:i.useCallback(()=>f(!1),[]),modal:s,children:r})})};eE.displayName=eb;var eS="PopoverAnchor",eN=i.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=ek(eS,r),a=ej(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:u}=o;return i.useEffect(()=>(s(),()=>u()),[s,u]),(0,l.jsx)(I,{...a,...n,ref:t})});eN.displayName=eS;var eP="PopoverTrigger",eL=i.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=ek(eP,r),o=ej(r),u=s(t,i.triggerRef),c=(0,l.jsx)(f.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":e$(i.open),...n,ref:u,onClick:a(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?c:(0,l.jsx)(I,{asChild:!0,...o,children:c})});eL.displayName=eP;var eT="PopoverPortal",[eO,eR]=ew(eT,{forceMount:void 0}),eA=e=>{let{__scopePopover:t,forceMount:r,children:n,container:i}=e,o=ek(eT,t);return(0,l.jsx)(eO,{scope:t,forceMount:r,children:(0,l.jsx)(q,{present:r||o.open,children:(0,l.jsx)(W,{asChild:!0,container:i,children:n})})})};eA.displayName=eT;var eI="PopoverContent",eM=i.forwardRef((e,t)=>{let r=eR(eI,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,o=ek(eI,e.__scopePopover);return(0,l.jsx)(q,{present:n||o.open,children:o.modal?(0,l.jsx)(eD,{...i,ref:t}):(0,l.jsx)(eF,{...i,ref:t})})});eM.displayName=eI;var eD=i.forwardRef((e,t)=>{let r=ek(eI,e.__scopePopover),n=i.useRef(null),o=s(t,n),u=i.useRef(!1);return i.useEffect(()=>{let e=n.current;if(e)return(0,Y.Ry)(e)},[]),(0,l.jsx)(ex,{as:d.g7,allowPinchZoom:!0,children:(0,l.jsx)(ez,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{e.preventDefault(),u.current||r.triggerRef.current?.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;u.current=n},{checkForDefaultPrevented:!1}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),eF=i.forwardRef((e,t)=>{let r=ek(eI,e.__scopePopover),n=i.useRef(!1),o=i.useRef(!1);return(0,l.jsx)(ez,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"!==t.detail.originalEvent.type||(o.current=!0));let i=t.target;r.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),ez=i.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...p}=e,h=ek(eI,r),m=ej(r);return i.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??b()),document.body.insertAdjacentElement("beforeend",e[1]??b()),x++,()=>{1===x&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),x--}},[]),(0,l.jsx)(w.M,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,l.jsx)(g,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:(0,l.jsx)(z,{"data-state":e$(h.open),role:"dialog",id:h.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),eB="PopoverClose",eU=i.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=ek(eB,r);return(0,l.jsx)(f.button,{type:"button",...n,ref:t,onClick:a(e.onClick,()=>i.onOpenChange(!1))})});eU.displayName=eB;var eV=i.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=ej(r);return(0,l.jsx)(V,{...i,...n,ref:t})});function e$(e){return e?"open":"closed"}eV.displayName="PopoverArrow";var eH=eE,eZ=eN,eW=eL,eq=eA,eG=eM,eY=eU,eK=eV},16450:function(e,t,r){"use strict";r.d(t,{ee:function(){return L},Eh:function(){return O},VY:function(){return T},fC:function(){return P},D7:function(){return g}});var n=r(87462),i=r(67294),o=r(1371),a=r(41737),s=r(64757);let l=(0,i.forwardRef)((e,t)=>{let{children:r,width:o=10,height:a=5,...l}=e;return(0,i.createElement)(s.WV.svg,(0,n.Z)({},l,{ref:t,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:(0,i.createElement)("polygon",{points:"0,0 30,0 15,10"}))});var u=r(28771),c=r(25360),d=r(79698),f=r(9981),p=r(7546);let h="Popper",[m,g]=(0,c.b)(h),[v,y]=m(h),x=(0,i.forwardRef)((e,t)=>{let{__scopePopper:r,virtualRef:o,...a}=e,l=y("PopperAnchor",r),c=(0,i.useRef)(null),d=(0,u.e)(t,c);return(0,i.useEffect)(()=>{l.onAnchorChange((null==o?void 0:o.current)||c.current)}),o?null:(0,i.createElement)(s.WV.div,(0,n.Z)({},a,{ref:d}))}),b="PopperContent",[w,_]=m(b),j=(0,i.forwardRef)((e,t)=>{var r,l,c,h,m,g,v,x;let{__scopePopper:_,side:j="bottom",sideOffset:C=0,align:k="center",alignOffset:P=0,arrowPadding:L=0,collisionBoundary:T=[],collisionPadding:O=0,sticky:R="partial",hideWhenDetached:A=!1,avoidCollisions:I=!0,onPlaced:M,...D}=e,F=y(b,_),[z,B]=(0,i.useState)(null),U=(0,u.e)(t,e=>B(e)),[V,$]=(0,i.useState)(null),H=(0,p.t)(V),Z=null!==(r=null==H?void 0:H.width)&&void 0!==r?r:0,W=null!==(l=null==H?void 0:H.height)&&void 0!==l?l:0,q="number"==typeof O?O:{top:0,right:0,bottom:0,left:0,...O},G=Array.isArray(T)?T:[T],Y=G.length>0,K={padding:q,boundary:G.filter(E),altBoundary:Y},{refs:X,floatingStyles:J,placement:Q,isPositioned:ee,middlewareData:et}=(0,o.YF)({strategy:"fixed",placement:j+("center"!==k?"-"+k:""),whileElementsMounted:a.Me,elements:{reference:F.anchor},middleware:[(0,o.cv)({mainAxis:C+W,alignmentAxis:P}),I&&(0,o.uY)({mainAxis:!0,crossAxis:!1,limiter:"partial"===R?(0,o.dr)():void 0,...K}),I&&(0,o.RR)({...K}),(0,o.dp)({...K,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:i,height:o}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${i}px`),a.setProperty("--radix-popper-anchor-height",`${o}px`)}}),V&&(0,o.x7)({element:V,padding:L}),S({arrowWidth:Z,arrowHeight:W}),A&&(0,o.Cp)({strategy:"referenceHidden"})]}),[er,en]=N(Q),ei=(0,d.W)(M);(0,f.b)(()=>{ee&&(null==ei||ei())},[ee,ei]);let eo=null===(c=et.arrow)||void 0===c?void 0:c.x,ea=null===(h=et.arrow)||void 0===h?void 0:h.y,es=(null===(m=et.arrow)||void 0===m?void 0:m.centerOffset)!==0,[el,eu]=(0,i.useState)();return(0,f.b)(()=>{z&&eu(window.getComputedStyle(z).zIndex)},[z]),(0,i.createElement)("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:ee?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:el,"--radix-popper-transform-origin":[null===(g=et.transformOrigin)||void 0===g?void 0:g.x,null===(v=et.transformOrigin)||void 0===v?void 0:v.y].join(" ")},dir:e.dir},(0,i.createElement)(w,{scope:_,placedSide:er,onArrowChange:$,arrowX:eo,arrowY:ea,shouldHideArrow:es},(0,i.createElement)(s.WV.div,(0,n.Z)({"data-side":er,"data-align":en},D,{ref:U,style:{...D.style,animation:ee?void 0:"none",opacity:null!==(x=et.hide)&&void 0!==x&&x.referenceHidden?0:void 0}}))))}),C={top:"bottom",right:"left",bottom:"top",left:"right"},k=(0,i.forwardRef)(function(e,t){let{__scopePopper:r,...o}=e,a=_("PopperArrow",r),s=C[a.placedSide];return(0,i.createElement)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0}},(0,i.createElement)(l,(0,n.Z)({},o,{ref:t,style:{...o.style,display:"block"}})))});function E(e){return null!==e}let S=e=>({name:"transformOrigin",options:e,fn(t){var r,n,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(r=u.arrow)||void 0===r?void 0:r.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=N(s),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(n=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==n?n:0)+d/2,v=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",x="";return"bottom"===p?(y=c?m:`${g}px`,x=`${-f}px`):"top"===p?(y=c?m:`${g}px`,x=`${l.floating.height+f}px`):"right"===p?(y=`${-f}px`,x=c?m:`${v}px`):"left"===p&&(y=`${l.floating.width+f}px`,x=c?m:`${v}px`),{data:{x:y,y:x}}}});function N(e){let[t,r="center"]=e.split("-");return[t,r]}let P=e=>{let{__scopePopper:t,children:r}=e,[n,o]=(0,i.useState)(null);return(0,i.createElement)(v,{scope:t,anchor:n,onAnchorChange:o},r)},L=x,T=j,O=k},42651:function(e,t,r){"use strict";r.d(t,{h:function(){return s}});var n=r(87462),i=r(67294),o=r(73935),a=r(64757);let s=(0,i.forwardRef)((e,t)=>{var r;let{container:s=null==globalThis?void 0:null===(r=globalThis.document)||void 0===r?void 0:r.body,...l}=e;return s?o.createPortal((0,i.createElement)(a.WV.div,(0,n.Z)({},l,{ref:t})),s):null})},29115:function(e,t,r){"use strict";r.d(t,{z:function(){return s}});var n=r(67294),i=r(73935),o=r(28771),a=r(9981);let s=e=>{let{present:t,children:r}=e,s=function(e){var t,r;let[o,s]=(0,n.useState)(),u=(0,n.useRef)({}),c=(0,n.useRef)(e),d=(0,n.useRef)("none"),[f,p]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,n.useReducer)((e,t)=>{let n=r[e][t];return null!=n?n:e},t));return(0,n.useEffect)(()=>{let e=l(u.current);d.current="mounted"===f?e:"none"},[f]),(0,a.b)(()=>{let t=u.current,r=c.current;if(r!==e){let n=d.current,i=l(t);e?p("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?p("UNMOUNT"):r&&n!==i?p("ANIMATION_OUT"):p("UNMOUNT"),c.current=e}},[e,p]),(0,a.b)(()=>{if(o){let e=e=>{let t=l(u.current).includes(e.animationName);e.target===o&&t&&(0,i.flushSync)(()=>p("ANIMATION_END"))},t=e=>{e.target===o&&(d.current=l(u.current))};return o.addEventListener("animationstart",t),o.addEventListener("animationcancel",e),o.addEventListener("animationend",e),()=>{o.removeEventListener("animationstart",t),o.removeEventListener("animationcancel",e),o.removeEventListener("animationend",e)}}p("ANIMATION_END")},[o,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:(0,n.useCallback)(e=>{e&&(u.current=getComputedStyle(e)),s(e)},[])}}(t),u="function"==typeof r?r({present:s.isPresent}):n.Children.only(r),c=(0,o.e)(s.ref,u.ref);return"function"==typeof r||s.isPresent?(0,n.cloneElement)(u,{ref:c}):null};function l(e){return(null==e?void 0:e.animationName)||"none"}s.displayName="Presence"},64757:function(e,t,r){"use strict";r.d(t,{WV:function(){return d},jH:function(){return f}});var n=r(87462),i=r(67294),o=r(73935),a=r(28771);let s=(0,i.forwardRef)((e,t)=>{let{children:r,...o}=e,a=i.Children.toArray(r),s=a.find(c);if(s){let e=s.props.children,r=a.map(t=>t!==s?t:i.Children.count(e)>1?i.Children.only(null):(0,i.isValidElement)(e)?e.props.children:null);return(0,i.createElement)(l,(0,n.Z)({},o,{ref:t}),(0,i.isValidElement)(e)?(0,i.cloneElement)(e,void 0,r):null)}return(0,i.createElement)(l,(0,n.Z)({},o,{ref:t}),r)});s.displayName="Slot";let l=(0,i.forwardRef)((e,t)=>{let{children:r,...n}=e;return(0,i.isValidElement)(r)?(0,i.cloneElement)(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?(0,a.F)(t,r.ref):r.ref}):i.Children.count(r)>1?i.Children.only(null):null});l.displayName="SlotClone";let u=({children:e})=>(0,i.createElement)(i.Fragment,null,e);function c(e){return(0,i.isValidElement)(e)&&e.type===u}let d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=(0,i.forwardRef)((e,r)=>{let{asChild:o,...a}=e,l=o?s:t;return(0,i.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,i.createElement)(l,(0,n.Z)({},a,{ref:r}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function f(e,t){e&&(0,o.flushSync)(()=>e.dispatchEvent(t))}},32036:function(e,t,r){"use strict";let n;r.d(t,{VY:function(){return eD},ZA:function(){return ez},JO:function(){return eI},ck:function(){return eU},wU:function(){return e$},eT:function(){return eV},__:function(){return eB},h_:function(){return eM},fC:function(){return eO},$G:function(){return eZ},u_:function(){return eH},n5:function(){return em},Z0:function(){return eW},xz:function(){return eR},B4:function(){return eA},l_:function(){return eF}});var i=r(87462),o=r(67294),a=r(73935),s=r(42614),l=r(36206),u=r(13879),c=r(28771),d=r(25360),f=r(78990),p=r(46063),h=r(27552),m=r(64757),g=r(79698);let v="focusScope.autoFocusOnMount",y="focusScope.autoFocusOnUnmount",x={bubbles:!1,cancelable:!0},b=(0,o.forwardRef)((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[u,d]=(0,o.useState)(null),f=(0,g.W)(a),p=(0,g.W)(s),h=(0,o.useRef)(null),b=(0,c.e)(t,e=>d(e)),k=(0,o.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,o.useEffect)(()=>{if(n){function e(e){if(k.paused||!u)return;let t=e.target;u.contains(t)?h.current=t:j(h.current,{select:!0})}function t(e){if(k.paused||!u)return;let t=e.relatedTarget;null===t||u.contains(t)||j(h.current,{select:!0})}document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){let t=document.activeElement;for(let r of e)r.removedNodes.length>0&&!(null!=u&&u.contains(t))&&j(u)});return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,u,k.paused]),(0,o.useEffect)(()=>{if(u){C.add(k);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(v,x);u.addEventListener(v,f),u.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(j(n,{select:t}),document.activeElement!==r)return}(w(u).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&j(u))}return()=>{u.removeEventListener(v,f),setTimeout(()=>{let t=new CustomEvent(y,x);u.addEventListener(y,p),u.dispatchEvent(t),t.defaultPrevented||j(null!=e?e:document.body,{select:!0}),u.removeEventListener(y,p),C.remove(k)},0)}}},[u,f,p,k]);let E=(0,o.useCallback)(e=>{if(!r&&!n||k.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,o]=function(e){let t=w(e);return[_(t,e),_(t.reverse(),e)]}(t);n&&o?e.shiftKey||i!==o?e.shiftKey&&i===n&&(e.preventDefault(),r&&j(o,{select:!0})):(e.preventDefault(),r&&j(n,{select:!0})):i===t&&e.preventDefault()}},[r,n,k.paused]);return(0,o.createElement)(m.WV.div,(0,i.Z)({tabIndex:-1},l,{ref:b,onKeyDown:E}))});function w(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function j(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}let C=(n=[],{add(e){let t=n[0];e!==t&&(null==t||t.pause()),(n=k(n,e)).unshift(e)},remove(e){var t;null===(t=(n=k(n,e))[0])||void 0===t||t.resume()}});function k(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var E=r(91276),S=r(16450),N=r(42651);let P=(0,o.forwardRef)((e,t)=>{let{children:r,...n}=e,a=o.Children.toArray(r),s=a.find(O);if(s){let e=s.props.children,r=a.map(t=>t!==s?t:o.Children.count(e)>1?o.Children.only(null):(0,o.isValidElement)(e)?e.props.children:null);return(0,o.createElement)(L,(0,i.Z)({},n,{ref:t}),(0,o.isValidElement)(e)?(0,o.cloneElement)(e,void 0,r):null)}return(0,o.createElement)(L,(0,i.Z)({},n,{ref:t}),r)});P.displayName="Slot";let L=(0,o.forwardRef)((e,t)=>{let{children:r,...n}=e;return(0,o.isValidElement)(r)?(0,o.cloneElement)(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?(0,c.F)(t,r.ref):r.ref}):o.Children.count(r)>1?o.Children.only(null):null});L.displayName="SlotClone";let T=({children:e})=>(0,o.createElement)(o.Fragment,null,e);function O(e){return(0,o.isValidElement)(e)&&e.type===T}var R=r(77342),A=r(9981),I=r(57898),M=r(96219),D=r(23541),F=r(42026);let z=[" ","Enter","ArrowUp","ArrowDown"],B=[" ","Enter"],U="Select",[V,$,H]=(0,u.B)(U),[Z,W]=(0,d.b)(U,[H,S.D7]),q=(0,S.D7)(),[G,Y]=Z(U),[K,X]=Z(U),J=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...a}=e,s=q(r),u=Y("SelectTrigger",r),d=u.disabled||n,f=(0,c.e)(t,u.onTriggerChange),p=$(r),[h,g,v]=eL(e=>{let t=p().filter(e=>!e.disabled),r=t.find(e=>e.value===u.value),n=eT(t,e,r);void 0!==n&&u.onValueChange(n.value)}),y=()=>{d||(u.onOpenChange(!0),v())};return(0,o.createElement)(S.ee,(0,i.Z)({asChild:!0},s),(0,o.createElement)(m.WV.button,(0,i.Z)({type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":void 0===u.value?"":void 0},a,{ref:f,onClick:(0,l.M)(a.onClick,e=>{e.currentTarget.focus()}),onPointerDown:(0,l.M)(a.onPointerDown,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(y(),u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())}),onKeyDown:(0,l.M)(a.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||g(e.key),(!t||" "!==e.key)&&z.includes(e.key)&&(y(),e.preventDefault())})})))}),Q=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,className:n,style:a,children:s,placeholder:l,...u}=e,d=Y("SelectValue",r),{onValueNodeHasChildrenChange:f}=d,p=void 0!==s,h=(0,c.e)(t,d.onValueNodeChange);return(0,A.b)(()=>{f(p)},[f,p]),(0,o.createElement)(m.WV.span,(0,i.Z)({},u,{ref:h,style:{pointerEvents:"none"}}),void 0===d.value&&void 0!==l?l:s)}),ee=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,children:n,...a}=e;return(0,o.createElement)(m.WV.span,(0,i.Z)({"aria-hidden":!0},a,{ref:t}),n||"▼")}),et="SelectContent",er=(0,o.forwardRef)((e,t)=>{let r=Y(et,e.__scopeSelect),[n,s]=(0,o.useState)();return((0,A.b)(()=>{s(new DocumentFragment)},[]),r.open)?(0,o.createElement)(eo,(0,i.Z)({},e,{ref:t})):n?(0,a.createPortal)((0,o.createElement)(en,{scope:e.__scopeSelect},(0,o.createElement)(V.Slot,{scope:e.__scopeSelect},(0,o.createElement)("div",null,e.children))),n):null}),[en,ei]=Z(et),eo=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:u,side:d,sideOffset:f,align:m,alignOffset:g,arrowPadding:v,collisionBoundary:y,collisionPadding:x,sticky:w,hideWhenDetached:_,avoidCollisions:j,...C}=e,k=Y(et,r),[E,S]=(0,o.useState)(null),[N,L]=(0,o.useState)(null),T=(0,c.e)(t,e=>S(e)),[O,R]=(0,o.useState)(null),[A,I]=(0,o.useState)(null),M=$(r),[z,B]=(0,o.useState)(!1),U=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(E)return(0,D.Ry)(E)},[E]),(0,h.EW)();let V=(0,o.useCallback)(e=>{let[t,...r]=M().map(e=>e.ref.current),[n]=r.slice(-1),i=document.activeElement;for(let r of e)if(r===i||(null==r||r.scrollIntoView({block:"nearest"}),r===t&&N&&(N.scrollTop=0),r===n&&N&&(N.scrollTop=N.scrollHeight),null==r||r.focus(),document.activeElement!==i))return},[M,N]),H=(0,o.useCallback)(()=>V([O,E]),[V,O,E]);(0,o.useEffect)(()=>{z&&H()},[z,H]);let{onOpenChange:Z,triggerPointerDownPosRef:W}=k;(0,o.useEffect)(()=>{if(E){let e={x:0,y:0},t=t=>{var r,n,i,o;e={x:Math.abs(Math.round(t.pageX)-(null!==(r=null===(n=W.current)||void 0===n?void 0:n.x)&&void 0!==r?r:0)),y:Math.abs(Math.round(t.pageY)-(null!==(i=null===(o=W.current)||void 0===o?void 0:o.y)&&void 0!==i?i:0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():E.contains(r.target)||Z(!1),document.removeEventListener("pointermove",t),W.current=null};return null!==W.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[E,Z,W]),(0,o.useEffect)(()=>{let e=()=>Z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[Z]);let[q,G]=eL(e=>{let t=M().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eT(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),K=(0,o.useCallback)((e,t,r)=>{let n=!U.current&&!r;(void 0!==k.value&&k.value===t||n)&&(R(e),n&&(U.current=!0))},[k.value]),X=(0,o.useCallback)(()=>null==E?void 0:E.focus(),[E]),J=(0,o.useCallback)((e,t,r)=>{let n=!U.current&&!r;(void 0!==k.value&&k.value===t||n)&&I(e)},[k.value]),Q="popper"===n?es:ea;return(0,o.createElement)(en,{scope:r,content:E,viewport:N,onViewportChange:L,itemRefCallback:K,selectedItem:O,onItemLeave:X,itemTextRefCallback:J,focusSelectedItem:H,selectedItemText:A,position:n,isPositioned:z,searchRef:q},(0,o.createElement)(F.Z,{as:P,allowPinchZoom:!0},(0,o.createElement)(b,{asChild:!0,trapped:k.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,l.M)(a,e=>{var t;null===(t=k.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()})},(0,o.createElement)(p.XB,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>k.onOpenChange(!1)},(0,o.createElement)(Q,(0,i.Z)({role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:e=>e.preventDefault()},C,Q===es?{side:d,sideOffset:f,align:m,alignOffset:g,arrowPadding:v,collisionBoundary:y,collisionPadding:x,sticky:w,hideWhenDetached:_,avoidCollisions:j}:{},{onPlaced:()=>B(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:(0,l.M)(C.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||G(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=M().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>V(t)),e.preventDefault()}})}))))))}),ea=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,onPlaced:n,...a}=e,l=Y(et,r),u=ei(et,r),[d,f]=(0,o.useState)(null),[p,h]=(0,o.useState)(null),g=(0,c.e)(t,e=>h(e)),v=$(r),y=(0,o.useRef)(!1),x=(0,o.useRef)(!0),{viewport:b,selectedItem:w,selectedItemText:_,focusSelectedItem:j}=u,C=(0,o.useCallback)(()=>{if(l.trigger&&l.valueNode&&d&&p&&b&&w&&_){let e=l.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),r=l.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if("rtl"!==l.dir){let n=i.left-t.left,o=r.left-n,a=e.left-o,l=e.width+a,u=Math.max(l,t.width),c=window.innerWidth-10,f=(0,s.u)(o,[10,c-u]);d.style.minWidth=l+"px",d.style.left=f+"px"}else{let n=t.right-i.right,o=window.innerWidth-r.right-n,a=window.innerWidth-e.right-o,l=e.width+a,u=Math.max(l,t.width),c=window.innerWidth-10,f=(0,s.u)(o,[10,c-u]);d.style.minWidth=l+"px",d.style.right=f+"px"}let o=v(),a=window.innerHeight-20,u=b.scrollHeight,c=window.getComputedStyle(p),f=parseInt(c.borderTopWidth,10),h=parseInt(c.paddingTop,10),m=parseInt(c.borderBottomWidth,10),g=f+h+u+parseInt(c.paddingBottom,10)+m,x=Math.min(5*w.offsetHeight,g),j=window.getComputedStyle(b),C=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),E=e.top+e.height/2-10,S=w.offsetHeight/2,N=f+h+(w.offsetTop+S);if(N<=E){let e=w===o[o.length-1].ref.current;d.style.bottom="0px";let t=p.clientHeight-b.offsetTop-b.offsetHeight;d.style.height=N+Math.max(a-E,S+(e?k:0)+t+m)+"px"}else{let e=w===o[0].ref.current;d.style.top="0px";let t=Math.max(E,f+b.offsetTop+(e?C:0)+S);d.style.height=t+(g-N)+"px",b.scrollTop=N-E+b.offsetTop}d.style.margin="10px 0",d.style.minHeight=x+"px",d.style.maxHeight=a+"px",null==n||n(),requestAnimationFrame(()=>y.current=!0)}},[v,l.trigger,l.valueNode,d,p,b,w,_,l.dir,n]);(0,A.b)(()=>C(),[C]);let[k,E]=(0,o.useState)();(0,A.b)(()=>{p&&E(window.getComputedStyle(p).zIndex)},[p]);let S=(0,o.useCallback)(e=>{e&&!0===x.current&&(C(),null==j||j(),x.current=!1)},[C,j]);return(0,o.createElement)(el,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:y,onScrollButtonChange:S},(0,o.createElement)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k}},(0,o.createElement)(m.WV.div,(0,i.Z)({},a,{ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}}))))}),es=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:a=10,...s}=e,l=q(r);return(0,o.createElement)(S.VY,(0,i.Z)({},l,s,{ref:t,align:n,collisionPadding:a,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[el,eu]=Z(et,{}),ec="SelectViewport",ed=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,...n}=e,a=ei(ec,r),s=eu(ec,r),u=(0,c.e)(t,a.onViewportChange),d=(0,o.useRef)(0);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),(0,o.createElement)(V.Slot,{scope:r},(0,o.createElement)(m.WV.div,(0,i.Z)({"data-radix-select-viewport":"",role:"presentation"},n,{ref:u,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:(0,l.M)(n.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=s;if(null!=n&&n.current&&r){let e=Math.abs(d.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,i=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(i<n){let o=i+e,a=Math.min(n,o),s=o-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=s>0?s:0,r.style.justifyContent="flex-end")}}}d.current=t.scrollTop})}))))}),[ef,ep]=Z("SelectGroup"),eh=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,...n}=e,a=(0,E.M)();return(0,o.createElement)(ef,{scope:r,id:a},(0,o.createElement)(m.WV.div,(0,i.Z)({role:"group","aria-labelledby":a},n,{ref:t})))}),em=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,...n}=e,a=ep("SelectLabel",r);return(0,o.createElement)(m.WV.div,(0,i.Z)({id:a.id},n,{ref:t}))}),eg="SelectItem",[ev,ey]=Z(eg),ex=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,value:n,disabled:a=!1,textValue:s,...u}=e,d=Y(eg,r),f=ei(eg,r),p=d.value===n,[h,g]=(0,o.useState)(null!=s?s:""),[v,y]=(0,o.useState)(!1),x=(0,c.e)(t,e=>{var t;return null===(t=f.itemRefCallback)||void 0===t?void 0:t.call(f,e,n,a)}),b=(0,E.M)(),w=()=>{a||(d.onValueChange(n),d.onOpenChange(!1))};return(0,o.createElement)(ev,{scope:r,value:n,disabled:a,textId:b,isSelected:p,onItemTextChange:(0,o.useCallback)(e=>{g(t=>{var r;return t||(null!==(r=null==e?void 0:e.textContent)&&void 0!==r?r:"").trim()})},[])},(0,o.createElement)(V.ItemSlot,{scope:r,value:n,disabled:a,textValue:h},(0,o.createElement)(m.WV.div,(0,i.Z)({role:"option","aria-labelledby":b,"data-highlighted":v?"":void 0,"aria-selected":p&&v,"data-state":p?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1},u,{ref:x,onFocus:(0,l.M)(u.onFocus,()=>y(!0)),onBlur:(0,l.M)(u.onBlur,()=>y(!1)),onPointerUp:(0,l.M)(u.onPointerUp,w),onPointerMove:(0,l.M)(u.onPointerMove,e=>{if(a){var t;null===(t=f.onItemLeave)||void 0===t||t.call(f)}else e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,l.M)(u.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null===(t=f.onItemLeave)||void 0===t||t.call(f)}}),onKeyDown:(0,l.M)(u.onKeyDown,e=>{var t;(null===(t=f.searchRef)||void 0===t?void 0:t.current)!==""&&" "===e.key||(B.includes(e.key)&&w()," "===e.key&&e.preventDefault())})}))))}),eb="SelectItemText",ew=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,className:n,style:s,...l}=e,u=Y(eb,r),d=ei(eb,r),f=ey(eb,r),p=X(eb,r),[h,g]=(0,o.useState)(null),v=(0,c.e)(t,e=>g(e),f.onItemTextChange,e=>{var t;return null===(t=d.itemTextRefCallback)||void 0===t?void 0:t.call(d,e,f.value,f.disabled)}),y=null==h?void 0:h.textContent,x=(0,o.useMemo)(()=>(0,o.createElement)("option",{key:f.value,value:f.value,disabled:f.disabled},y),[f.disabled,f.value,y]),{onNativeOptionAdd:b,onNativeOptionRemove:w}=p;return(0,A.b)(()=>(b(x),()=>w(x)),[b,w,x]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(m.WV.span,(0,i.Z)({id:f.textId},l,{ref:v})),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren?(0,a.createPortal)(l.children,u.valueNode):null)}),e_=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,...n}=e;return ey("SelectItemIndicator",r).isSelected?(0,o.createElement)(m.WV.span,(0,i.Z)({"aria-hidden":!0},n,{ref:t})):null}),ej="SelectScrollUpButton",eC=(0,o.forwardRef)((e,t)=>{let r=ei(ej,e.__scopeSelect),n=eu(ej,e.__scopeSelect),[a,s]=(0,o.useState)(!1),l=(0,c.e)(t,n.onScrollButtonChange);return(0,A.b)(()=>{if(r.viewport&&r.isPositioned){let t=r.viewport;function e(){s(t.scrollTop>0)}return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?(0,o.createElement)(eS,(0,i.Z)({},e,{ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null}),ek="SelectScrollDownButton",eE=(0,o.forwardRef)((e,t)=>{let r=ei(ek,e.__scopeSelect),n=eu(ek,e.__scopeSelect),[a,s]=(0,o.useState)(!1),l=(0,c.e)(t,n.onScrollButtonChange);return(0,A.b)(()=>{if(r.viewport&&r.isPositioned){let t=r.viewport;function e(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)}return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?(0,o.createElement)(eS,(0,i.Z)({},e,{ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null}),eS=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...a}=e,s=ei("SelectScrollButton",r),u=(0,o.useRef)(null),c=$(r),d=(0,o.useCallback)(()=>{null!==u.current&&(window.clearInterval(u.current),u.current=null)},[]);return(0,o.useEffect)(()=>()=>d(),[d]),(0,A.b)(()=>{var e;let t=c().find(e=>e.ref.current===document.activeElement);null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[c]),(0,o.createElement)(m.WV.div,(0,i.Z)({"aria-hidden":!0},a,{ref:t,style:{flexShrink:0,...a.style},onPointerDown:(0,l.M)(a.onPointerDown,()=>{null===u.current&&(u.current=window.setInterval(n,50))}),onPointerMove:(0,l.M)(a.onPointerMove,()=>{var e;null===(e=s.onItemLeave)||void 0===e||e.call(s),null===u.current&&(u.current=window.setInterval(n,50))}),onPointerLeave:(0,l.M)(a.onPointerLeave,()=>{d()})}))}),eN=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,o.createElement)(m.WV.div,(0,i.Z)({"aria-hidden":!0},n,{ref:t}))}),eP=(0,o.forwardRef)((e,t)=>{let{value:r,...n}=e,a=(0,o.useRef)(null),s=(0,c.e)(t,a),l=(0,I.D)(r);return(0,o.useEffect)(()=>{let e=a.current,t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(l!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[l,r]),(0,o.createElement)(M.T,{asChild:!0},(0,o.createElement)("select",(0,i.Z)({},n,{ref:s,defaultValue:r})))});function eL(e){let t=(0,g.W)(e),r=(0,o.useRef)(""),n=(0,o.useRef)(0),i=(0,o.useCallback)(e=>{let i=r.current+e;t(i),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(i)},[t]),a=(0,o.useCallback)(()=>{r.current="",window.clearTimeout(n.current)},[]);return(0,o.useEffect)(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function eT(e,t,r){var n;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=(n=Math.max(r?e.indexOf(r):-1,0),e.map((t,r)=>e[(n+r)%e.length]));1===i.length&&(o=o.filter(e=>e!==r));let a=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==r?a:void 0}eP.displayName="BubbleSelect";let eO=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:l,onValueChange:u,dir:c,name:d,autoComplete:p,disabled:h,required:m}=e,g=q(t),[v,y]=(0,o.useState)(null),[x,b]=(0,o.useState)(null),[w,_]=(0,o.useState)(!1),j=(0,f.gm)(c),[C=!1,k]=(0,R.T)({prop:n,defaultProp:i,onChange:a}),[N,P]=(0,R.T)({prop:s,defaultProp:l,onChange:u}),L=(0,o.useRef)(null),T=!v||!!v.closest("form"),[O,A]=(0,o.useState)(new Set),I=Array.from(O).map(e=>e.props.value).join(";");return(0,o.createElement)(S.fC,g,(0,o.createElement)(G,{required:m,scope:t,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:(0,E.M)(),value:N,onValueChange:P,open:C,onOpenChange:k,dir:j,triggerPointerDownPosRef:L,disabled:h},(0,o.createElement)(V.Provider,{scope:t},(0,o.createElement)(K,{scope:e.__scopeSelect,onNativeOptionAdd:(0,o.useCallback)(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:(0,o.useCallback)(e=>{A(t=>{let r=new Set(t);return r.delete(e),r})},[])},r)),T?(0,o.createElement)(eP,{key:I,"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:p,value:N,onChange:e=>P(e.target.value),disabled:h},void 0===N?(0,o.createElement)("option",{value:""}):null,Array.from(O)):null))},eR=J,eA=Q,eI=ee,eM=e=>(0,o.createElement)(N.h,(0,i.Z)({asChild:!0},e)),eD=er,eF=ed,ez=eh,eB=em,eU=ex,eV=ew,e$=e_,eH=eC,eZ=eE,eW=eN},4222:function(e,t,r){"use strict";r.d(t,{g7:function(){return o}});var n=r(67294),i=r(85893),o=n.forwardRef((e,t)=>{let{children:r,...o}=e,s=n.Children.toArray(r),u=s.find(l);if(u){let e=u.props.children,r=s.map(t=>t!==u?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,i.jsx)(a,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return(0,i.jsx)(a,{...o,ref:t,children:r})});o.displayName="Slot";var a=n.forwardRef((e,t)=>{let{children:r,...i}=e;if(n.isValidElement(r)){let e,o;let a=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref;return n.cloneElement(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(i,r.props),ref:t?function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(t,a):a})}return n.Children.count(r)>1?n.Children.only(null):null});a.displayName="SlotClone";var s=({children:e})=>(0,i.jsx)(i.Fragment,{children:e});function l(e){return n.isValidElement(e)&&e.type===s}},12993:function(e,t,r){"use strict";r.d(t,{VY:function(){return $},h_:function(){return V},zt:function(){return z},fC:function(){return B},xz:function(){return U}});var n=r(87462),i=r(67294),o=r(36206),a=r(28771),s=r(25360),l=r(46063),u=r(91276),c=r(16450),d=r(42651),f=r(29115),p=r(64757);(0,i.forwardRef)((e,t)=>{let{children:r,...o}=e,a=i.Children.toArray(r),s=a.find(g);if(s){let e=s.props.children,r=a.map(t=>t!==s?t:i.Children.count(e)>1?i.Children.only(null):(0,i.isValidElement)(e)?e.props.children:null);return(0,i.createElement)(h,(0,n.Z)({},o,{ref:t}),(0,i.isValidElement)(e)?(0,i.cloneElement)(e,void 0,r):null)}return(0,i.createElement)(h,(0,n.Z)({},o,{ref:t}),r)}).displayName="Slot";let h=(0,i.forwardRef)((e,t)=>{let{children:r,...n}=e;return(0,i.isValidElement)(r)?(0,i.cloneElement)(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?(0,a.F)(t,r.ref):r.ref}):i.Children.count(r)>1?i.Children.only(null):null});h.displayName="SlotClone";let m=({children:e})=>(0,i.createElement)(i.Fragment,null,e);function g(e){return(0,i.isValidElement)(e)&&e.type===m}var v=r(77342),y=r(96219);let[x,b]=(0,s.b)("Tooltip",[c.D7]),w=(0,c.D7)(),_="tooltip.open",[j,C]=x("TooltipProvider"),k="Tooltip",[E,S]=x(k),N="TooltipTrigger",P=(0,i.forwardRef)((e,t)=>{let{__scopeTooltip:r,...s}=e,l=S(N,r),u=C(N,r),d=w(r),f=(0,i.useRef)(null),h=(0,a.e)(t,f,l.onTriggerChange),m=(0,i.useRef)(!1),g=(0,i.useRef)(!1),v=(0,i.useCallback)(()=>m.current=!1,[]);return(0,i.useEffect)(()=>()=>document.removeEventListener("pointerup",v),[v]),(0,i.createElement)(c.ee,(0,n.Z)({asChild:!0},d),(0,i.createElement)(p.WV.button,(0,n.Z)({"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute},s,{ref:h,onPointerMove:(0,o.M)(e.onPointerMove,e=>{"touch"===e.pointerType||g.current||u.isPointerInTransitRef.current||(l.onTriggerEnter(),g.current=!0)}),onPointerLeave:(0,o.M)(e.onPointerLeave,()=>{l.onTriggerLeave(),g.current=!1}),onPointerDown:(0,o.M)(e.onPointerDown,()=>{m.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:(0,o.M)(e.onFocus,()=>{m.current||l.onOpen()}),onBlur:(0,o.M)(e.onBlur,l.onClose),onClick:(0,o.M)(e.onClick,l.onClose)})))}),L="TooltipPortal",[T,O]=x(L,{forceMount:void 0}),R="TooltipContent",A=(0,i.forwardRef)((e,t)=>{let r=O(R,e.__scopeTooltip),{forceMount:o=r.forceMount,side:a="top",...s}=e,l=S(R,e.__scopeTooltip);return(0,i.createElement)(f.z,{present:o||l.open},l.disableHoverableContent?(0,i.createElement)(F,(0,n.Z)({side:a},s,{ref:t})):(0,i.createElement)(I,(0,n.Z)({side:a},s,{ref:t})))}),I=(0,i.forwardRef)((e,t)=>{let r=S(R,e.__scopeTooltip),o=C(R,e.__scopeTooltip),s=(0,i.useRef)(null),l=(0,a.e)(t,s),[u,c]=(0,i.useState)(null),{trigger:d,onClose:f}=r,p=s.current,{onPointerInTransitChange:h}=o,m=(0,i.useCallback)(()=>{c(null),h(!1)},[h]),g=(0,i.useCallback)((e,t)=>{let r=e.currentTarget,n={x:e.clientX,y:e.clientY},i=function(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,i,o)){case o:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw Error("unreachable")}}(n,r.getBoundingClientRect());c(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))r.pop();else break}r.push(n)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}(t)}([...function(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(n,i),...function(e){let{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}(t.getBoundingClientRect())])),h(!0)},[h]);return(0,i.useEffect)(()=>()=>m(),[m]),(0,i.useEffect)(()=>{if(d&&p){let e=e=>g(e,p),t=e=>g(e,d);return d.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{d.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[d,p,g,m]),(0,i.useEffect)(()=>{if(u){let e=e=>{let t=e.target,r={x:e.clientX,y:e.clientY},n=(null==d?void 0:d.contains(t))||(null==p?void 0:p.contains(t)),i=!function(e,t){let{x:r,y:n}=e,i=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){let a=t[e].x,s=t[e].y,l=t[o].x,u=t[o].y;s>n!=u>n&&r<(l-a)*(n-s)/(u-s)+a&&(i=!i)}return i}(r,u);n?m():i&&(m(),f())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[d,p,u,f,m]),(0,i.createElement)(F,(0,n.Z)({},e,{ref:l}))}),[M,D]=x(k,{isInside:!1}),F=(0,i.forwardRef)((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:u,...d}=e,f=S(R,r),p=w(r),{onClose:h}=f;return(0,i.useEffect)(()=>(document.addEventListener(_,h),()=>document.removeEventListener(_,h)),[h]),(0,i.useEffect)(()=>{if(f.trigger){let e=e=>{let t=e.target;null!=t&&t.contains(f.trigger)&&h()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[f.trigger,h]),(0,i.createElement)(l.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:h},(0,i.createElement)(c.VY,(0,n.Z)({"data-state":f.stateAttribute},p,d,{ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),(0,i.createElement)(m,null,o),(0,i.createElement)(M,{scope:r,isInside:!0},(0,i.createElement)(y.f,{id:f.contentId,role:"tooltip"},a||o))))}),z=e=>{let{__scopeTooltip:t,delayDuration:r=700,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,l]=(0,i.useState)(!0),u=(0,i.useRef)(!1),c=(0,i.useRef)(0);return(0,i.useEffect)(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,i.createElement)(j,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:(0,i.useCallback)(()=>{window.clearTimeout(c.current),l(!1)},[]),onClose:(0,i.useCallback)(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:(0,i.useCallback)(e=>{u.current=e},[]),disableHoverableContent:o},a)},B=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,d=C(k,e.__scopeTooltip),f=w(t),[p,h]=(0,i.useState)(null),m=(0,u.M)(),g=(0,i.useRef)(0),y=null!=s?s:d.disableHoverableContent,x=null!=l?l:d.delayDuration,b=(0,i.useRef)(!1),[j=!1,S]=(0,v.T)({prop:n,defaultProp:o,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(_))):d.onClose(),null==a||a(e)}}),N=(0,i.useMemo)(()=>j?b.current?"delayed-open":"instant-open":"closed",[j]),P=(0,i.useCallback)(()=>{window.clearTimeout(g.current),b.current=!1,S(!0)},[S]),L=(0,i.useCallback)(()=>{window.clearTimeout(g.current),S(!1)},[S]),T=(0,i.useCallback)(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,S(!0)},x)},[x,S]);return(0,i.useEffect)(()=>()=>window.clearTimeout(g.current),[]),(0,i.createElement)(c.fC,f,(0,i.createElement)(E,{scope:t,contentId:m,open:j,stateAttribute:N,trigger:p,onTriggerChange:h,onTriggerEnter:(0,i.useCallback)(()=>{d.isOpenDelayed?T():P()},[d.isOpenDelayed,T,P]),onTriggerLeave:(0,i.useCallback)(()=>{y?L():window.clearTimeout(g.current)},[L,y]),onOpen:P,onClose:L,disableHoverableContent:y},r))},U=P,V=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=S(L,t);return(0,i.createElement)(T,{scope:t,forceMount:r},(0,i.createElement)(f.z,{present:r||a.open},(0,i.createElement)(d.h,{asChild:!0,container:o},n)))},$=A},79698:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=r(67294);function i(e){let t=(0,n.useRef)(e);return(0,n.useEffect)(()=>{t.current=e}),(0,n.useMemo)(()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)},[])}},77342:function(e,t,r){"use strict";r.d(t,{T:function(){return o}});var n=r(67294),i=r(79698);function o({prop:e,defaultProp:t,onChange:r=()=>{}}){let[o,a]=function({defaultProp:e,onChange:t}){let r=(0,n.useState)(e),[o]=r,a=(0,n.useRef)(o),s=(0,i.W)(t);return(0,n.useEffect)(()=>{a.current!==o&&(s(o),a.current=o)},[o,a,s]),r}({defaultProp:t,onChange:r}),s=void 0!==e,l=s?e:o,u=(0,i.W)(r);return[l,(0,n.useCallback)(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&u(r)}else a(t)},[s,e,a,u])]}},9981:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(67294);let i=(null==globalThis?void 0:globalThis.document)?n.useLayoutEffect:()=>{}},57898:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(67294);function i(e){let t=(0,n.useRef)({value:e,previous:e});return(0,n.useMemo)(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}},7546:function(e,t,r){"use strict";r.d(t,{t:function(){return o}});var n=r(67294),i=r(9981);function o(e){let[t,r]=(0,n.useState)(void 0);return(0,i.b)(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}},96219:function(e,t,r){"use strict";r.d(t,{T:function(){return a},f:function(){return s}});var n=r(87462),i=r(67294),o=r(64757);let a=(0,i.forwardRef)((e,t)=>(0,i.createElement)(o.WV.span,(0,n.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),s=a},45139:function(e,t,r){"use strict";r.d(t,{j:function(){return o}});let n=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,i=function(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n);else for(r in t)t[r]&&(i&&(i+=" "),i+=r)}return i}(e))&&(n&&(n+=" "),n+=t);return n},o=(e,t)=>r=>{var o;if((null==t?void 0:t.variants)==null)return i(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:a,defaultVariants:s}=t,l=Object.keys(a).map(e=>{let t=null==r?void 0:r[e],i=null==s?void 0:s[e];if(null===t)return null;let o=n(t)||n(i);return a[e][o]}),u=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return i(e,l,null==t?void 0:null===(o=t.compoundVariants)||void 0===o?void 0:o.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...s,...u}[t]):({...s,...u})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},12668:function(e,t,r){"use strict";r.d(t,{M:function(){return y}});var n=r(67294),i=r(49304),o=r(30404),a=r(58868);function s(){let e=(0,n.useRef)(!1);return(0,a.L)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var l=r(240),u=r(96681);class c extends n.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function d({children:e,isPresent:t}){let r=(0,n.useId)(),i=(0,n.useRef)(null),o=(0,n.useRef)({width:0,height:0,top:0,left:0});return(0,n.useInsertionEffect)(()=>{let{width:e,height:n,top:a,left:s}=o.current;if(t||!i.current||!e||!n)return;i.current.dataset.motionPopId=r;let l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
          [data-motion-pop-id="${r}"] {
            position: absolute !important;
            width: ${e}px !important;
            height: ${n}px !important;
            top: ${a}px !important;
            left: ${s}px !important;
          }
        `),()=>{document.head.removeChild(l)}},[t]),n.createElement(c,{isPresent:t,childRef:i,sizeRef:o},n.cloneElement(e,{ref:i}))}let f=({children:e,initial:t,isPresent:r,onExitComplete:i,custom:o,presenceAffectsLayout:a,mode:s})=>{let c=(0,u.h)(p),f=(0,n.useId)(),h=(0,n.useMemo)(()=>({id:f,initial:t,isPresent:r,custom:o,onExitComplete:e=>{for(let t of(c.set(e,!0),c.values()))if(!t)return;i&&i()},register:e=>(c.set(e,!1),()=>c.delete(e))}),a?void 0:[r]);return(0,n.useMemo)(()=>{c.forEach((e,t)=>c.set(t,!1))},[r]),n.useEffect(()=>{r||c.size||!i||i()},[r]),"popLayout"===s&&(e=n.createElement(d,{isPresent:r},e)),n.createElement(l.O.Provider,{value:h},e)};function p(){return new Map}var h=r(25364),m=r(65411),g=r(16034);let v=e=>e.key||"",y=({children:e,custom:t,initial:r=!0,onExitComplete:l,exitBeforeEnter:u,presenceAffectsLayout:c=!0,mode:d="sync"})=>{u&&(d="wait",(0,g.O)(!1,"Replace exitBeforeEnter with mode='wait'"));let[p]=function(){let e=s(),[t,r]=(0,n.useState)(0),i=(0,n.useCallback)(()=>{e.current&&r(t+1)},[t]);return[(0,n.useCallback)(()=>o.Z_.postRender(i),[i]),t]}(),y=(0,n.useContext)(h.p).forceRender;y&&(p=y);let x=s(),b=function(e){let t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}(e),w=b,_=new Set,j=(0,n.useRef)(w),C=(0,n.useRef)(new Map).current,k=(0,n.useRef)(!0);if((0,a.L)(()=>{k.current=!1,function(e,t){e.forEach(e=>{let r=v(e);t.set(r,e)})}(b,C),j.current=w}),(0,m.z)(()=>{k.current=!0,C.clear(),_.clear()}),k.current)return n.createElement(n.Fragment,null,w.map(e=>n.createElement(f,{key:v(e),isPresent:!0,initial:!!r&&void 0,presenceAffectsLayout:c,mode:d},e)));w=[...w];let E=j.current.map(v),S=b.map(v),N=E.length;for(let e=0;e<N;e++){let t=E[e];-1===S.indexOf(t)&&_.add(t)}return"wait"===d&&_.size&&(w=[]),_.forEach(e=>{if(-1!==S.indexOf(e))return;let r=C.get(e);if(!r)return;let i=E.indexOf(e);w.splice(i,0,n.createElement(f,{key:v(r),isPresent:!1,onExitComplete:()=>{C.delete(e),_.delete(e);let t=j.current.findIndex(t=>t.key===e);if(j.current.splice(t,1),!_.size){if(j.current=b,!1===x.current)return;p(),l&&l()}},custom:t,presenceAffectsLayout:c,mode:d},r))}),w=w.map(e=>{let t=e.key;return _.has(t)?e:n.createElement(f,{key:v(e),isPresent:!0,presenceAffectsLayout:c,mode:d},e)}),"production"!==i.O&&"wait"===d&&w.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),n.createElement(n.Fragment,null,_.size?w:w.map(e=>(0,n.cloneElement)(e)))}},15947:function(e,t,r){"use strict";r.d(t,{hO:function(){return a},oO:function(){return o}});var n=r(67294),i=r(240);function o(){let e=(0,n.useContext)(i.O);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:r,register:o}=e,a=(0,n.useId)();return(0,n.useEffect)(()=>o(a),[]),!t&&r?[!1,()=>r&&r(a)]:[!0]}function a(){var e;return null===(e=(0,n.useContext)(i.O))||e.isPresent}},25364:function(e,t,r){"use strict";r.d(t,{p:function(){return n}});let n=(0,r(67294).createContext)({})},240:function(e,t,r){"use strict";r.d(t,{O:function(){return n}});let n=(0,r(67294).createContext)(null)},37367:function(e,t,r){"use strict";r.d(t,{frameData:function(){return n}});let n={delta:0,timestamp:0}},30404:function(e,t,r){"use strict";r.d(t,{qY:function(){return p},iW:function(){return h},Z_:function(){return f}});let n=1/60*1e3,i="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),o="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(i()),n);var a=r(37367);let s=!0,l=!1,u=!1,c=["read","update","preRender","render","postRender"],d=c.reduce((e,t)=>(e[t]=function(e){let t=[],r=[],n=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:r;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(n=t.length)),e},cancel:e=>{let t=r.indexOf(e);-1!==t&&r.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length)for(let r=0;r<n;r++){let n=t[r];n(l),a.has(n)&&(s.schedule(n),e())}i=!1,o&&(o=!1,s.process(l))}};return s}(()=>l=!0),e),{}),f=c.reduce((e,t)=>{let r=d[t];return e[t]=(e,t=!1,n=!1)=>(l||v(),r.schedule(e,t,n)),e},{}),p=c.reduce((e,t)=>(e[t]=d[t].cancel,e),{}),h=c.reduce((e,t)=>(e[t]=()=>d[t].process(a.frameData),e),{}),m=e=>d[e].process(a.frameData),g=e=>{l=!1,a.frameData.delta=s?n:Math.max(Math.min(e-a.frameData.timestamp,40),1),a.frameData.timestamp=e,u=!0,c.forEach(m),u=!1,l&&(s=!1,o(g))},v=()=>{l=!0,s=!0,u||o(g)}},88361:function(e,t,r){"use strict";r.d(t,{E:function(){return iK}});var n,i,o,a,s,l=r(67294);let u=(0,l.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),c=(0,l.createContext)({});var d=r(240),f=r(58868);let p=(0,l.createContext)({strict:!1});function h(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function m(e){return"string"==typeof e||Array.isArray(e)}function g(e){return"object"==typeof e&&"function"==typeof e.start}let v=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function y(e){return g(e.animate)||v.some(t=>m(e[t]))}function x(e){return!!(y(e)||e.variants)}function b(e){return Array.isArray(e)?e.join(" "):e}let w=e=>({isEnabled:t=>e.some(e=>!!t[e])}),_={measureLayout:w(["layout","layoutId","drag"]),animation:w(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:w(["exit"]),drag:w(["drag","dragControls"]),focus:w(["whileFocus"]),hover:w(["whileHover","onHoverStart","onHoverEnd"]),tap:w(["whileTap","onTap","onTapStart","onTapCancel"]),pan:w(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:w(["whileInView","onViewportEnter","onViewportLeave"])};var j=r(11741),C=r(96681);let k={hasAnimatedSinceResize:!0,hasEverUpdated:!1},E=1;var S=r(25364);class N extends l.Component{getSnapshotBeforeUpdate(){let{visualElement:e,props:t}=this.props;return e&&e.setProps(t),null}componentDidUpdate(){}render(){return this.props.children}}let P=(0,l.createContext)({}),L=Symbol.for("motionComponentSymbol"),T=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function O(e){if("string"!=typeof e||e.includes("-"));else if(T.indexOf(e)>-1||/[A-Z]/.test(e))return!0;return!1}let R={},A=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],I=new Set(A);function M(e,{layout:t,layoutId:r}){return I.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!R[e]||"opacity"===e)}let D=e=>!!(null==e?void 0:e.getVelocity),F={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},z=(e,t)=>A.indexOf(e)-A.indexOf(t);function B(e){return e.startsWith("--")}let U=(e,t)=>t&&"number"==typeof e?t.transform(e):e,V=(e,t,r)=>Math.min(Math.max(r,e),t),$={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},H={...$,transform:e=>V(0,1,e)},Z={...$,default:1},W=e=>Math.round(1e5*e)/1e5,q=/(-)?([\d]*\.?[\d])+/g,G=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Y=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function K(e){return"string"==typeof e}let X=e=>({test:t=>K(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),J=X("deg"),Q=X("%"),ee=X("px"),et=X("vh"),er=X("vw"),en={...Q,parse:e=>Q.parse(e)/100,transform:e=>Q.transform(100*e)},ei={...$,transform:Math.round},eo={borderWidth:ee,borderTopWidth:ee,borderRightWidth:ee,borderBottomWidth:ee,borderLeftWidth:ee,borderRadius:ee,radius:ee,borderTopLeftRadius:ee,borderTopRightRadius:ee,borderBottomRightRadius:ee,borderBottomLeftRadius:ee,width:ee,maxWidth:ee,height:ee,maxHeight:ee,size:ee,top:ee,right:ee,bottom:ee,left:ee,padding:ee,paddingTop:ee,paddingRight:ee,paddingBottom:ee,paddingLeft:ee,margin:ee,marginTop:ee,marginRight:ee,marginBottom:ee,marginLeft:ee,rotate:J,rotateX:J,rotateY:J,rotateZ:J,scale:Z,scaleX:Z,scaleY:Z,scaleZ:Z,skew:J,skewX:J,skewY:J,distance:ee,translateX:ee,translateY:ee,translateZ:ee,x:ee,y:ee,z:ee,perspective:ee,transformPerspective:ee,opacity:H,originX:en,originY:en,originZ:ee,zIndex:ei,fillOpacity:H,strokeOpacity:H,numOctaves:ei};function ea(e,t,r,n){let{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,c=!1,d=!0;for(let e in t){let r=t[e];if(B(e)){o[e]=r;continue}let n=eo[e],f=U(r,n);if(I.has(e)){if(u=!0,a[e]=f,s.push(e),!d)continue;r!==(n.default||0)&&(d=!1)}else e.startsWith("origin")?(c=!0,l[e]=f):i[e]=f}if(!t.transform&&(u||n?i.transform=function({transform:e,transformKeys:t},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,o){let a="";for(let r of(t.sort(z),t))a+=`${F[r]||r}(${e[r]}) `;return r&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):n&&i&&(a="none"),a}(e,r,d,n):i.transform&&(i.transform="none")),c){let{originX:e="50%",originY:t="50%",originZ:r=0}=l;i.transformOrigin=`${e} ${t} ${r}`}}let es=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function el(e,t,r){for(let n in t)D(t[n])||M(n,r)||(e[n]=t[n])}let eu=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function ec(e){return eu.has(e)}let ed=e=>!ec(e);try{(n=require("@emotion/is-prop-valid").default)&&(ed=e=>e.startsWith("on")?!ec(e):n(e))}catch(e){}function ef(e,t,r){return"string"==typeof e?e:ee.transform(t+r*e)}let ep={offset:"stroke-dashoffset",array:"stroke-dasharray"},eh={offset:"strokeDashoffset",array:"strokeDasharray"};function em(e,{attrX:t,attrY:r,originX:n,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,c,d){if(ea(e,l,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(void 0!==n||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,r){let n=ef(t,e.x,e.width),i=ef(r,e.y,e.height);return`${n} ${i}`}(h,void 0!==n?n:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==r&&(f.y=r),void 0!==o&&function(e,t,r=1,n=0,i=!0){e.pathLength=1;let o=i?ep:eh;e[o.offset]=ee.transform(-n);let a=ee.transform(t),s=ee.transform(r);e[o.array]=`${a} ${s}`}(f,o,a,s,!1)}let eg=()=>({...es(),attrs:{}}),ev=e=>"string"==typeof e&&"svg"===e.toLowerCase(),ey=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ex(e,{style:t,vars:r},n,i){for(let o in Object.assign(e.style,t,i&&i.getProjectionStyles(n)),r)e.style.setProperty(o,r[o])}let eb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ew(e,t,r,n){for(let r in ex(e,t,void 0,n),t.attrs)e.setAttribute(eb.has(r)?r:ey(r),t.attrs[r])}function e_(e){let{style:t}=e,r={};for(let n in t)(D(t[n])||M(n,e))&&(r[n]=t[n]);return r}function ej(e){let t=e_(e);for(let r in e)D(e[r])&&(t["x"===r||"y"===r?"attr"+r.toUpperCase():r]=e[r]);return t}function eC(e,t,r,n={},i={}){return"function"==typeof t&&(t=t(void 0!==r?r:e.custom,n,i)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==r?r:e.custom,n,i)),t}let ek=e=>Array.isArray(e),eE=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),eS=e=>ek(e)?e[e.length-1]||0:e;function eN(e){let t=D(e)?e.get():e;return eE(t)?t.toValue():t}let eP=e=>(t,r)=>{let n=(0,l.useContext)(c),i=(0,l.useContext)(d.O),o=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,i,o){let a={latestValues:function(e,t,r,n){let i={},o=n(e);for(let e in o)i[e]=eN(o[e]);let{initial:a,animate:s}=e,l=y(e),u=x(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let c=!!r&&!1===r.initial,d=(c=c||!1===a)?s:a;return d&&"boolean"!=typeof d&&!g(d)&&(Array.isArray(d)?d:[d]).forEach(t=>{let r=eC(e,t);if(!r)return;let{transitionEnd:n,transition:o,...a}=r;for(let e in a){let t=a[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let e in n)i[e]=n[e]}),i}(n,i,o,e),renderState:t()};return r&&(a.mount=e=>r(n,e,a)),a})(e,t,n,i);return r?o():(0,C.h)(o)},eL={useVisualState:eP({scrapeMotionValuesFromProps:ej,createRenderState:eg,onMount:(e,t,{renderState:r,latestValues:n})=>{try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}em(r,n,{enableHardwareAcceleration:!1},ev(t.tagName),e.transformTemplate),ew(t,r)}})},eT={useVisualState:eP({scrapeMotionValuesFromProps:e_,createRenderState:es})};function eO(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function eR(e,t,r,n){(0,l.useEffect)(()=>{let i=e.current;if(r&&i)return eO(i,t,r,n)},[e,t,r,n])}function eA(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}(i=a||(a={})).Animate="animate",i.Hover="whileHover",i.Tap="whileTap",i.Drag="whileDrag",i.Focus="whileFocus",i.InView="whileInView",i.Exit="exit";let eI={pageX:0,pageY:0};function eM(e,t="page"){return{point:e.touches?function(e,t="page"){let r=e.touches[0]||e.changedTouches[0]||eI;return{x:r[t+"X"],y:r[t+"Y"]}}(e,t):function(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}(e,t)}}let eD=(e,t=!1)=>{let r=t=>e(t,eM(t));return t?e=>{let t=e instanceof MouseEvent;(!t||t&&0===e.button)&&r(e)}:r},eF=()=>j.j&&null===window.onpointerdown,ez=()=>j.j&&null===window.ontouchstart,eB=()=>j.j&&null===window.onmousedown,eU={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},eV={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function e$(e){if(eF());else if(ez())return eV[e];else if(eB())return eU[e];return e}function eH(e,t,r,n){return eO(e,e$(t),eD(r,"pointerdown"===t),n)}function eZ(e,t,r,n){return eR(e,e$(t),r&&eD(r,"pointerdown"===t),n)}function eW(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}let eq=eW("dragHorizontal"),eG=eW("dragVertical");function eY(e){let t=!1;if("y"===e)t=eG();else if("x"===e)t=eq();else{let e=eq(),r=eG();e&&r?t=()=>{e(),r()}:(e&&e(),r&&r())}return t}function eK(){let e=eY(!0);return!e||(e(),!1)}function eX(e,t,r){return(n,i)=>{!(!eA(n)||eK())&&(e.animationState&&e.animationState.setActive(a.Hover,t),r&&r(n,i))}}let eJ=(e,t)=>!!t&&(e===t||eJ(e,t.parentElement));var eQ=r(65411);let e0=(e,t)=>r=>t(e(r)),e1=(...e)=>e.reduce(e0);var e2=r(49304),e5=r(16034);let e4=new WeakMap,e3=new WeakMap,e6=e=>{let t=e4.get(e.target);t&&t(e)},e8=e=>{e.forEach(e6)},e7={some:0,all:1},e9=e=>t=>(e(t),null),te={inView:e9(function({visualElement:e,whileInView:t,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){let o=(0,l.useRef)({hasEnteredView:!1,isInView:!1}),s=!!(t||r||n);i.once&&o.current.hasEnteredView&&(s=!1),("undefined"==typeof IntersectionObserver?function(e,t,r,{fallback:n=!0}){(0,l.useEffect)(()=>{e&&n&&("production"!==e2.O&&(0,e5.O)(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;let{onViewportEnter:e}=r.getProps();e&&e(null),r.animationState&&r.animationState.setActive(a.InView,!0)}))},[e])}:function(e,t,r,{root:n,margin:i,amount:o="some",once:s}){(0,l.useEffect)(()=>{if(!e||!r.current)return;let l={root:null==n?void 0:n.current,rootMargin:i,threshold:"number"==typeof o?o:e7[o]};return function(e,t,r){let n=function({root:e,...t}){let r=e||document;e3.has(r)||e3.set(r,{});let n=e3.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(e8,{root:e,...t})),n[i]}(t);return e4.set(e,r),n.observe(e),()=>{e4.delete(e),n.unobserve(e)}}(r.current,l,e=>{let{isIntersecting:n}=e;if(t.isInView===n||(t.isInView=n,s&&!n&&t.hasEnteredView))return;n&&(t.hasEnteredView=!0),r.animationState&&r.animationState.setActive(a.InView,n);let i=r.getProps(),o=n?i.onViewportEnter:i.onViewportLeave;o&&o(e)})},[e,n,i,o])})(s,o.current,e,i)}),tap:e9(function({onTap:e,onTapStart:t,onTapCancel:r,whileTap:n,visualElement:i}){let o=e||t||r||n,s=(0,l.useRef)(!1),u=(0,l.useRef)(null),c={passive:!(t||e||r||m)};function d(){u.current&&u.current(),u.current=null}function f(){return d(),s.current=!1,i.animationState&&i.animationState.setActive(a.Tap,!1),!eK()}function p(t,n){f()&&(eJ(i.current,t.target)?e&&e(t,n):r&&r(t,n))}function h(e,t){f()&&r&&r(e,t)}function m(e,r){d(),!s.current&&(s.current=!0,u.current=e1(eH(window,"pointerup",p,c),eH(window,"pointercancel",h,c)),i.animationState&&i.animationState.setActive(a.Tap,!0),t&&t(e,r))}eZ(i,"pointerdown",o?m:void 0,c),(0,eQ.z)(d)}),focus:e9(function({whileFocus:e,visualElement:t}){let{animationState:r}=t;eR(t,"focus",e?()=>{r&&r.setActive(a.Focus,!0)}:void 0),eR(t,"blur",e?()=>{r&&r.setActive(a.Focus,!1)}:void 0)}),hover:e9(function({onHoverStart:e,onHoverEnd:t,whileHover:r,visualElement:n}){eZ(n,"pointerenter",e||r?eX(n,!0,e):void 0,{passive:!e}),eZ(n,"pointerleave",t||r?eX(n,!1,t):void 0,{passive:!t})})};var tt=r(15947);function tr(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}let tn=e=>/^\-?\d*\.?\d+$/.test(e),ti=e=>/^0[^.\s]+$/.test(e);var to=r(37367),ta=r(30404);function ts(e,t){-1===e.indexOf(t)&&e.push(t)}function tl(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}class tu{constructor(){this.subscriptions=[]}add(e){return ts(this.subscriptions,e),()=>tl(this.subscriptions,e)}notify(e,t,r){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](e,t,r);else for(let i=0;i<n;i++){let n=this.subscriptions[i];n&&n(e,t,r)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tc(e,t){return t?1e3/t*e:0}let td=e=>!isNaN(parseFloat(e));class tf{constructor(e,t={}){this.version="7.10.3",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;let{delta:r,timestamp:n}=to.frameData;this.lastUpdated!==n&&(this.timeDelta=r,this.lastUpdated=n,ta.Z_.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ta.Z_.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=td(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){return this.events[e]||(this.events[e]=new tu),this.events[e].add(t)}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e){this.passiveEffect=e}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,r){this.set(t),this.prev=e,this.timeDelta=r}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?tc(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.stopAnimation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.stopAnimation&&(this.stopAnimation(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.clearListeners(),this.stop()}}function tp(e,t){return new tf(e,t)}let th=(e,t)=>r=>!!(K(r)&&Y.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),tm=(e,t,r)=>n=>{if(!K(n))return n;let[i,o,a,s]=n.match(q);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},tg=e=>V(0,255,e),tv={...$,transform:e=>Math.round(tg(e))},ty={test:th("rgb","red"),parse:tm("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+tv.transform(e)+", "+tv.transform(t)+", "+tv.transform(r)+", "+W(H.transform(n))+")"},tx={test:th("#"),parse:function(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:ty.transform},tb={test:th("hsl","hue"),parse:tm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Q.transform(W(t))+", "+Q.transform(W(r))+", "+W(H.transform(n))+")"},tw={test:e=>ty.test(e)||tx.test(e)||tb.test(e),parse:e=>ty.test(e)?ty.parse(e):tb.test(e)?tb.parse(e):tx.parse(e),transform:e=>K(e)?e:e.hasOwnProperty("red")?ty.transform(e):tb.transform(e)},t_="${c}",tj="${n}";function tC(e){"number"==typeof e&&(e=`${e}`);let t=[],r=0,n=0,i=e.match(G);i&&(r=i.length,e=e.replace(G,t_),t.push(...i.map(tw.parse)));let o=e.match(q);return o&&(n=o.length,e=e.replace(q,tj),t.push(...o.map($.parse))),{values:t,numColors:r,numNumbers:n,tokenised:e}}function tk(e){return tC(e).values}function tE(e){let{values:t,numColors:r,tokenised:n}=tC(e),i=t.length;return e=>{let t=n;for(let n=0;n<i;n++)t=t.replace(n<r?t_:tj,n<r?tw.transform(e[n]):W(e[n]));return t}}let tS=e=>"number"==typeof e?0:e,tN={test:function(e){var t,r;return isNaN(e)&&K(e)&&((null===(t=e.match(q))||void 0===t?void 0:t.length)||0)+((null===(r=e.match(G))||void 0===r?void 0:r.length)||0)>0},parse:tk,createTransformer:tE,getAnimatableNone:function(e){let t=tk(e);return tE(e)(t.map(tS))}},tP=new Set(["brightness","contrast","saturate","opacity"]);function tL(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[n]=r.match(q)||[];if(!n)return e;let i=r.replace(n,""),o=tP.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+i+")"}let tT=/([a-z-]*)\(.*?\)/g,tO={...tN,getAnimatableNone:e=>{let t=e.match(tT);return t?t.map(tL).join(" "):e}},tR={...eo,color:tw,backgroundColor:tw,outlineColor:tw,fill:tw,stroke:tw,borderColor:tw,borderTopColor:tw,borderRightColor:tw,borderBottomColor:tw,borderLeftColor:tw,filter:tO,WebkitFilter:tO},tA=e=>tR[e];function tI(e,t){var r;let n=tA(e);return n!==tO&&(n=tN),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,t)}let tM=e=>t=>t.test(e),tD=[$,ee,Q,J,er,et,{test:e=>"auto"===e,parse:e=>e}],tF=e=>tD.find(tM(e)),tz=[...tD,tw,tN],tB=e=>tz.find(tM(e));function tU(e,t,r){let n=e.getProps();return eC(n,t,void 0!==r?r:n.custom,function(e){let t={};return e.values.forEach((e,r)=>t[r]=e.get()),t}(e),function(e){let t={};return e.values.forEach((e,r)=>t[r]=e.getVelocity()),t}(e))}function tV(e){return!!(D(e)&&e.add)}let t$=(e,t)=>`${e}: ${t}`,tH="data-"+ey("framerAppearId");var tZ=function(){},tW=function(){};let tq=e=>1e3*e,tG={current:!1},tY=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tK=e=>t=>1-e(1-t),tX=e=>e*e,tJ=tK(tX),tQ=tY(tX),t0=(e,t,r)=>-r*e+r*t+e;function t1(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}let t2=(e,t,r)=>{let n=e*e;return Math.sqrt(Math.max(0,r*(t*t-n)+n))},t5=[tx,ty,tb],t4=e=>t5.find(t=>t.test(e));function t3(e){let t=t4(e);tW(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let r=t.parse(e);return t===tb&&(r=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let i=0,o=0,a=0;if(t/=100){let n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;i=t1(s,n,e+1/3),o=t1(s,n,e),a=t1(s,n,e-1/3)}else i=o=a=r;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:n}}(r)),r}let t6=(e,t)=>{let r=t3(e),n=t3(t),i={...r};return e=>(i.red=t2(r.red,n.red,e),i.green=t2(r.green,n.green,e),i.blue=t2(r.blue,n.blue,e),i.alpha=t0(r.alpha,n.alpha,e),ty.transform(i))};function t8(e,t){return"number"==typeof e?r=>t0(e,t,r):tw.test(e)?t6(e,t):re(e,t)}let t7=(e,t)=>{let r=[...e],n=r.length,i=e.map((e,r)=>t8(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=i[t](e);return r}},t9=(e,t)=>{let r={...e,...t},n={};for(let i in r)void 0!==e[i]&&void 0!==t[i]&&(n[i]=t8(e[i],t[i]));return e=>{for(let t in n)r[t]=n[t](e);return r}},re=(e,t)=>{let r=tN.createTransformer(t),n=tC(e),i=tC(t);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?e1(t7(n.values,i.values),r):(tZ(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),r=>`${r>0?t:e}`)},rt=(e,t,r)=>{let n=t-e;return 0===n?1:(r-e)/n},rr=(e,t)=>r=>t0(e,t,r);function rn(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let o=e.length;tW(o===t.length,"Both input and output ranges must be the same length"),tW(!n||!Array.isArray(n)||n.length===o-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=function(e,t,r){let n=[],i=r||function(e){if("number"==typeof e);else if("string"==typeof e)return tw.test(e)?t6:re;else if(Array.isArray(e))return t7;else if("object"==typeof e)return t9;return rr}(e[0]),o=e.length-1;for(let r=0;r<o;r++){let o=i(e[r],e[r+1]);t&&(o=e1(Array.isArray(t)?t[r]:t,o)),n.push(o)}return n}(t,n,i),s=a.length,l=t=>{let r=0;if(s>1)for(;r<e.length-2&&!(t<e[r+1]);r++);let n=rt(e[r],e[r+1],t);return a[r](n)};return r?t=>l(V(e[0],e[o-1],t)):l}let ri=e=>e,ro=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function ra(e,t,r,n){if(e===t&&r===n)return ri;let i=t=>(function(e,t,r,n,i){let o,a;let s=0;do(o=ro(a=t+(r-t)/2,n,i)-e)>0?r=a:t=a;while(Math.abs(o)>1e-7&&++s<12);return a})(t,0,1,e,r);return e=>0===e||1===e?e:ro(i(e),t,n)}let rs=e=>1-Math.sin(Math.acos(e)),rl=tK(rs),ru=tY(rl),rc=ra(.33,1.53,.69,.99),rd=tK(rc),rf=tY(rd),rp={linear:ri,easeIn:tX,easeInOut:tQ,easeOut:tJ,circIn:rs,circInOut:ru,circOut:rl,backIn:rd,backInOut:rf,backOut:rc,anticipate:e=>(e*=2)<1?.5*rd(e):.5*(2-Math.pow(2,-10*(e-1)))},rh=e=>{if(Array.isArray(e)){tW(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,i]=e;return ra(t,r,n,i)}return"string"==typeof e?(tW(void 0!==rp[e],`Invalid easing type '${e}'`),rp[e]):e},rm=e=>Array.isArray(e)&&"number"!=typeof e[0];function rg({keyframes:e,ease:t=tQ,times:r,duration:n=300}){e=[...e];let i=rg[0],o=rm(t)?t.map(rh):rh(t),a={done:!1,value:i},s=(r&&r.length===rg.length?r:function(e){let t=e.length;return e.map((e,r)=>0!==r?r/(t-1):0)}(e)).map(e=>e*n);function l(){var t;return rn(s,e,{ease:Array.isArray(o)?o:(t=e).map(()=>o||tQ).splice(0,t.length-1)})}let u=l();return{next:e=>(a.value=u(e),a.done=e>=n,a),flipTarget:()=>{e.reverse(),u=l()}}}function rv(e,t){return e*Math.sqrt(1-t*t)}let ry=["duration","bounce"],rx=["stiffness","damping","mass"];function rb(e,t){return t.some(t=>void 0!==e[t])}function rw({keyframes:e,restSpeed:t=2,restDelta:r=.01,...n}){let i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!rb(e,rx)&&rb(e,ry)){let r=function({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o;tZ(e<=1e4,"Spring duration must be 10 seconds or less");let a=1-t;a=V(.05,1,a),e=V(.01,10,e/1e3),a<1?(i=t=>{let n=t*a,i=n*e;return .001-(n-r)/rv(t,a)*Math.exp(-i)},o=t=>{let n=t*a*e,o=Math.pow(a,2)*Math.pow(t,2)*e,s=rv(Math.pow(t,2),a);return(n*r+r-o)*Math.exp(-n)*(-i(t)+.001>0?-1:1)/s}):(i=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),o=t=>e*e*(r-t)*Math.exp(-t*e));let s=function(e,t,r){let n=r;for(let r=1;r<12;r++)n-=e(n)/t(n);return n}(i,o,5/e);if(e*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(s,2)*n;return{stiffness:t,damping:2*a*Math.sqrt(n*t),duration:e}}}(e);(t={...t,...r,velocity:0,mass:1}).isResolvedFromDuration=!0}return t}(n),p=r_,h=c?-(c/1e3):0,m=l/(2*Math.sqrt(s*u));function g(){let e=o-i,t=Math.sqrt(s/u)/1e3;if(void 0===r&&(r=Math.min(Math.abs(o-i)/100,.4)),m<1){let r=rv(t,m);p=n=>o-Math.exp(-m*t*n)*((h+m*t*e)/r*Math.sin(r*n)+e*Math.cos(r*n))}else if(1===m)p=r=>o-Math.exp(-t*r)*(e+(h+t*e)*r);else{let r=t*Math.sqrt(m*m-1);p=n=>{let i=Math.exp(-m*t*n),a=Math.min(r*n,300);return o-i*((h+m*t*e)*Math.sinh(a)+r*e*Math.cosh(a))/r}}}return g(),{next:e=>{let n=p(e);if(f)a.done=e>=d;else{let i=h;if(0!==e){if(m<1){let t=Math.max(0,e-5);i=tc(n-p(t),e-t)}else i=0}let s=Math.abs(i)<=t,l=Math.abs(o-n)<=r;a.done=s&&l}return a.value=a.done?o:n,a},flipTarget:()=>{h=-h,[i,o]=[o,i],g()}}}rw.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;let r_=e=>0,rj={decay:function({keyframes:e=[0],velocity:t=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:o}){let a=e[0],s={done:!1,value:a},l=r*t,u=a+l,c=void 0===o?u:o(u);return c!==u&&(l=c-a),{next:e=>{let t=-l*Math.exp(-e/n);return s.done=!(t>i||t<-i),s.value=s.done?c:c+t,s},flipTarget:()=>{}}},keyframes:rg,tween:rg,spring:rw};function rC(e,t,r=0){return e-t-r}let rk=e=>{let t=({delta:t})=>e(t);return{start:()=>ta.Z_.update(t,!0),stop:()=>ta.qY.update(t)}};function rE({duration:e,driver:t=rk,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:o=0,keyframes:a,autoplay:s=!0,onPlay:l,onStop:u,onComplete:c,onRepeat:d,onUpdate:f,type:p="keyframes",...h}){var m;let g,v,y;let x=0,b=e,w=!1,_=!0,j=rj[a.length>2?"keyframes":p],C=a[0],k=a[a.length-1];(null===(m=j.needsInterpolation)||void 0===m?void 0:m.call(j,C,k))&&(y=rn([0,100],[C,k],{clamp:!1}),a=[0,100]);let E=j({...h,duration:e,keyframes:a});return s&&(l&&l(),(g=t(function(e){if(_||(e=-e),r+=e,!w){let e=E.next(Math.max(0,r));v=e.value,y&&(v=y(v)),w=_?e.done:r<=0}if(f&&f(v),w){if(0===x&&(b=void 0!==b?b:r),x<n){var t,a;t=r,a=b,(_?t>=a+o:t<=-o)&&(x++,"reverse"===i?r=function(e,t=0,r=0,n=!0){return n?rC(t+-e,t,r):t-(e-t)+r}(r,b,o,_=x%2==0):(r=rC(r,b,o),"mirror"===i&&E.flipTarget()),w=!1,d&&d())}else g.stop(),c&&c()}})).start()),{stop:()=>{u&&u(),g.stop()},sample:e=>E.next(Math.max(0,e))}}let rS=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,rN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:rS([0,.65,.55,1]),circOut:rS([.55,0,1,.45]),backIn:rS([.31,.01,.66,-.59]),backOut:rS([.33,1.53,.69,.99])};function rP(e,t){let r=performance.now(),n=({timestamp:i})=>{let o=i-r;o>=t&&(ta.qY.read(n),e(o-t))};return ta.Z_.read(n,!0),()=>ta.qY.read(n)}let rL=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),rT=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),rO=()=>({type:"keyframes",ease:"linear",duration:.3}),rR={type:"keyframes",duration:.8},rA={x:rL,y:rL,z:rL,rotate:rL,rotateX:rL,rotateY:rL,rotateZ:rL,scaleX:rT,scaleY:rT,scale:rT,opacity:rO,backgroundColor:rO,color:rO,default:rT},rI=(e,{keyframes:t})=>t.length>2?rR:(rA[e]||rA.default)(t[1]),rM=(e,t)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&tN.test(t)&&!t.startsWith("url("));function rD(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function rF(e){return"number"==typeof e?0:tI("",e)}function rz(e,t){return e[t]||e.default||e}let rB={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},rU={},rV={};for(let e in rB)rV[e]=()=>(void 0===rU[e]&&(rU[e]=rB[e]()),rU[e]);let r$=new Set(["opacity"]),rH=(e,t,r,n={})=>i=>{let o=rz(n,e)||{},a=o.delay||n.delay||0,{elapsed:s=0}=n;s-=tq(a);let l=function(e,t,r,n){let i=rM(t,r),o=void 0!==n.from?n.from:e.get();return("none"===o&&i&&"string"==typeof r?o=tI(t,r):rD(o)&&"string"==typeof r?o=rF(r):!Array.isArray(r)&&rD(r)&&"string"==typeof o&&(r=rF(o)),Array.isArray(r))?(null===r[0]&&(r[0]=o),r):[o,r]}(t,e,r,o),u=l[0],c=l[l.length-1],d=rM(e,u),f=rM(e,c);tZ(d===f,`You are trying to animate ${e} from "${u}" to "${c}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${c} via the \`style\` property.`);let p={keyframes:l,velocity:t.getVelocity(),...o,elapsed:s,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(!d||!f||tG.current||!1===o.type)return function({keyframes:e,elapsed:t,onUpdate:r,onComplete:n}){let i=()=>(r&&r(e[e.length-1]),n&&n(),()=>{});return t?rP(i,-t):i()}(p);if("inertia"===o.type){let e=function({keyframes:e,velocity:t=0,min:r,max:n,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:p}){let h;let m=e[0];function g(e){return void 0!==r&&e<r||void 0!==n&&e>n}function v(e){return void 0===r?n:void 0===n?r:Math.abs(r-e)<Math.abs(n-e)?r:n}function y(e){null==h||h.stop(),h=rE({keyframes:[0,1],velocity:0,...e,driver:c,onUpdate:t=>{var r;null==d||d(t),null===(r=e.onUpdate)||void 0===r||r.call(e,t)},onComplete:f,onStop:p})}function x(e){y({type:"spring",stiffness:a,damping:s,restDelta:l,...e})}if(g(m))x({velocity:t,keyframes:[m,v(m)]});else{let e,n,a=i*t+m;void 0!==u&&(a=u(a));let s=v(a),c=s===r?-1:1;y({type:"decay",keyframes:[m,0],velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:g(a)?r=>{e=n,n=r,t=tc(r-e,to.frameData.delta),(1===c&&r>s||-1===c&&r<s)&&x({keyframes:[r,s],velocity:t})}:void 0})}return{stop:()=>null==h?void 0:h.stop()}}(p);return()=>e.stop()}!function({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}(o)&&(p={...p,...rI(e,p)}),p.duration&&(p.duration=tq(p.duration)),p.repeatDelay&&(p.repeatDelay=tq(p.repeatDelay));let h=t.owner,m=h&&h.current;if(rV.waapi()&&r$.has(e)&&!p.repeatDelay&&"mirror"!==p.repeatType&&0!==p.damping&&h&&m instanceof HTMLElement&&!h.getProps().onUpdate)return function(e,t,{onUpdate:r,onComplete:n,...i}){var o;let{keyframes:a,duration:s=.3,elapsed:l=0,ease:u}=i;if("spring"===i.type||!(!(o=i.ease)||Array.isArray(o)||"string"==typeof o&&rN[o])){let e=rE(i),t={done:!1,value:a[0]},r=[],n=0;for(;!t.done;)t=e.sample(n),r.push(t.value),n+=10;a=r,s=n-10,u="linear"}let c=function(e,t,r,{delay:n=0,duration:i,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){return e.animate({[t]:r,offset:l},{delay:n,duration:i,easing:function(e){if(e)return Array.isArray(e)?rS(e):rN[e]}(s),fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,a,{...i,delay:-l,duration:s,ease:u});return c.onfinish=()=>{e.set(a[a.length-1]),n&&n()},()=>{let{currentTime:t}=c;if(t){let r=rE(i);e.setWithVelocity(r.sample(t-10).value,r.sample(t).value,10)}ta.Z_.update(()=>c.cancel())}}(t,e,p);{let e=rE(p);return()=>e.stop()}};function rZ(e,t,r={}){var n;let i=tU(e,t,r.custom),{transition:o=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(o=r.transitionOverride);let a=i?()=>rW(e,i,r):()=>Promise.resolve(),s=(null===(n=e.variantChildren)||void 0===n?void 0:n.size)?(n=0)=>{let{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,r=0,n=0,i=1,o){let a=[],s=(e.variantChildren.size-1)*n,l=1===i?(e=0)=>e*n:(e=0)=>s-e*n;return Array.from(e.variantChildren).sort(rq).forEach((e,n)=>{a.push(rZ(e,t,{...o,delay:r+l(n)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(a)}(e,t,i+n,a,s,r)}:()=>Promise.resolve(),{when:l}=o;if(!l)return Promise.all([a(),s(r.delay)]);{let[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(t)}}function rW(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t),u=e.getValue("willChange");n&&(a=n);let c=[],d=i&&(null===(o=e.animationState)||void 0===o?void 0:o.getState()[i]);for(let t in l){let n=e.getValue(t),i=l[t];if(!n||void 0===i||d&&function({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}(d,t))continue;let o={delay:r,elapsed:0,...a};if(e.shouldReduceMotion&&I.has(t)&&(o={...o,type:!1,delay:0}),!n.hasAnimated){let r=e.getProps()[tH];r&&(o.elapsed=function(e,t){let{MotionAppearAnimations:r}=window,n=t$(e,I.has(t)?"transform":t),i=r&&r.get(n);return i?(ta.Z_.render(()=>{try{i.cancel(),r.delete(n)}catch(e){}}),i.currentTime||0):0}(r,t))}let s=n.start(rH(t,n,i,o));tV(u)&&(u.add(t),s=s.then(()=>u.remove(t))),c.push(s)}return Promise.all(c).then(()=>{s&&function(e,t){let r=tU(e,t),{transitionEnd:n={},transition:i={},...o}=r?e.makeTargetAnimatable(r,!1):{};for(let t in o={...o,...n}){let r=eS(o[t]);e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,tp(r))}}(e,s)})}function rq(e,t){return e.sortNodePosition(t)}let rG=[a.Animate,a.InView,a.Focus,a.Hover,a.Tap,a.Drag,a.Exit],rY=[...rG].reverse(),rK=rG.length;function rX(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let rJ={animation:e9(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t))n=Promise.all(t.map(t=>rZ(e,t,r)));else if("string"==typeof t)n=rZ(e,t,r);else{let i="function"==typeof t?tU(e,t,r.custom):t;n=rW(e,i,r)}return n.then(()=>e.notify("AnimationComplete",t))})(e,t,r))),r={[a.Animate]:rX(!0),[a.InView]:rX(),[a.Hover]:rX(),[a.Tap]:rX(),[a.Drag]:rX(),[a.Focus]:rX(),[a.Exit]:rX()},n=!0,i=(t,r)=>{let n=tU(e,r);if(n){let{transition:e,transitionEnd:r,...i}=n;t={...t,...i,...r}}return t};function o(o,a){let s=e.getProps(),l=e.getVariantContext(!0)||{},u=[],c=new Set,d={},f=1/0;for(let t=0;t<rK;t++){var p;let h=rY[t],v=r[h],y=void 0!==s[h]?s[h]:l[h],x=m(y),b=h===a?v.isActive:null;!1===b&&(f=t);let w=y===l[h]&&y!==s[h]&&x;if(w&&n&&e.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...d},!v.isActive&&null===b||!y&&!v.prevProp||g(y)||"boolean"==typeof y)continue;let _=(p=v.prevProp,"string"==typeof y?y!==p:!!Array.isArray(y)&&!tr(y,p)),j=_||h===a&&v.isActive&&!w&&x||t>f&&x,C=Array.isArray(y)?y:[y],k=C.reduce(i,{});!1===b&&(k={});let{prevResolvedValues:E={}}=v,S={...E,...k},N=e=>{j=!0,c.delete(e),v.needsAnimating[e]=!0};for(let e in S){let t=k[e],r=E[e];d.hasOwnProperty(e)||(t!==r?ek(t)&&ek(r)?!tr(t,r)||_?N(e):v.protectedKeys[e]=!0:void 0!==t?N(e):c.add(e):void 0!==t&&c.has(e)?N(e):v.protectedKeys[e]=!0)}v.prevProp=y,v.prevResolvedValues=k,v.isActive&&(d={...d,...k}),n&&e.blockInitialAnimation&&(j=!1),j&&!w&&u.push(...C.map(e=>({animation:e,options:{type:h,...o}})))}if(c.size){let t={};c.forEach(r=>{let n=e.getBaseTarget(r);void 0!==n&&(t[r]=n)}),u.push({animation:t})}let h=!!u.length;return n&&!1===s.initial&&!e.manuallyAnimateOnMount&&(h=!1),n=!1,h?t(u):Promise.resolve()}return{animateChanges:o,setActive:function(t,n,i){var a;if(r[t].isActive===n)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach(e=>{var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)}),r[t].isActive=n;let s=o(i,t);for(let e in r)r[e].protectedKeys={};return s},setAnimateFunction:function(r){t=r(e)},getState:()=>r}}(e)),g(t)&&(0,l.useEffect)(()=>t.subscribe(e),[t])}),exit:e9(e=>{let{custom:t,visualElement:r}=e,[n,i]=(0,tt.oO)(),o=(0,l.useContext)(d.O);(0,l.useEffect)(()=>{r.isPresent=n;let e=r.animationState&&r.animationState.setActive(a.Exit,!n,{custom:o&&o.custom||t});e&&!n&&e.then(i)},[n])})},rQ=(e,t)=>Math.abs(e-t);class r0{constructor(e,t,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=r5(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,i=(e=r.offset,t={x:0,y:0},Math.sqrt(rQ(e.x,t.x)**2+rQ(e.y,t.y)**2)>=3);if(!n&&!i)return;let{point:o}=r,{timestamp:a}=to.frameData;this.history.push({...o,timestamp:a});let{onStart:s,onMove:l}=this.handlers;n||(s&&s(this.lastMoveEvent,r),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,r)},this.handlePointerMove=(e,t)=>{if(this.lastMoveEvent=e,this.lastMoveEventInfo=r1(t,this.transformPagePoint),eA(e)&&0===e.buttons){this.handlePointerUp(e,t);return}ta.Z_.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:r,onSessionEnd:n}=this.handlers,i=r5(r1(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,i),n&&n(e,i)},e.touches&&e.touches.length>1)return;this.handlers=t,this.transformPagePoint=r;let n=r1(eM(e),this.transformPagePoint),{point:i}=n,{timestamp:o}=to.frameData;this.history=[{...i,timestamp:o}];let{onSessionStart:a}=t;a&&a(e,r5(n,this.history)),this.removeListeners=e1(eH(window,"pointermove",this.handlePointerMove),eH(window,"pointerup",this.handlePointerUp),eH(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ta.qY.update(this.updatePoint)}}function r1(e,t){return t?{point:t(e.point)}:e}function r2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function r5({point:e},t){return{point:e,delta:r2(e,r4(t)),offset:r2(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,i=r4(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>tq(.1)));)r--;if(!n)return{x:0,y:0};let o=(i.timestamp-n.timestamp)/1e3;if(0===o)return{x:0,y:0};let a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,0)}}function r4(e){return e[e.length-1]}function r3(e){return e.max-e.min}function r6(e,t=0,r=.01){return Math.abs(e-t)<=r}function r8(e,t,r,n=.5){e.origin=n,e.originPoint=t0(t.min,t.max,e.origin),e.scale=r3(r)/r3(t),(r6(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=t0(r.min,r.max,e.origin)-e.originPoint,(r6(e.translate)||isNaN(e.translate))&&(e.translate=0)}function r7(e,t,r,n){r8(e.x,t.x,r.x,null==n?void 0:n.originX),r8(e.y,t.y,r.y,null==n?void 0:n.originY)}function r9(e,t,r){e.min=r.min+t.min,e.max=e.min+r3(t)}function ne(e,t,r){e.min=t.min-r.min,e.max=e.min+r3(t)}function nt(e,t,r){ne(e.x,t.x,r.x),ne(e.y,t.y,r.y)}function nr(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function nn(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function ni(e,t,r){return{min:no(e,t),max:no(e,r)}}function no(e,t){return"number"==typeof e?e:e[t]||0}let na=()=>({translate:0,scale:1,origin:0,originPoint:0}),ns=()=>({x:na(),y:na()}),nl=()=>({min:0,max:0}),nu=()=>({x:nl(),y:nl()});function nc(e){return[e("x"),e("y")]}function nd({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function nf(e){return void 0===e||1===e}function np({scale:e,scaleX:t,scaleY:r}){return!nf(e)||!nf(t)||!nf(r)}function nh(e){return np(e)||nm(e)||e.z||e.rotate||e.rotateX||e.rotateY}function nm(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}function ng(e,t,r,n,i){return void 0!==i&&(e=n+i*(e-n)),n+r*(e-n)+t}function nv(e,t=0,r=1,n,i){e.min=ng(e.min,t,r,n,i),e.max=ng(e.max,t,r,n,i)}function ny(e,{x:t,y:r}){nv(e.x,t.translate,t.scale,t.originPoint),nv(e.y,r.translate,r.scale,r.originPoint)}function nx(e){return Number.isInteger(e)?e:e>1.0000000000001||e<.999999999999?e:1}function nb(e,t){e.min=e.min+t,e.max=e.max+t}function nw(e,t,[r,n,i]){let o=void 0!==t[i]?t[i]:.5,a=t0(e.min,e.max,o);nv(e,t[r],t[n],a,t.scale)}let n_=["x","scaleX","originX"],nj=["y","scaleY","originY"];function nC(e,t){nw(e.x,t,n_),nw(e.y,t,nj)}function nk(e,t){return nd(function(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}let nE=new WeakMap;class nS{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nu(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){!1!==this.visualElement.isPresent&&(this.panSession=new r0(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(eM(e,"page").point)},onStart:(e,t)=>{var r;let{drag:n,dragPropagation:i,onDragStart:o}=this.getProps();(!n||i||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=eY(n),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nc(e=>{var t,r;let n=this.getAxisMotionValue(e).get()||0;if(Q.test(n)){let i=null===(r=null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===r?void 0:r.layoutBox[e];if(i){let e=r3(i);n=parseFloat(n)/100*e}}this.originPoint[e]=n}),null==o||o(e,t),null===(r=this.visualElement.animationState)||void 0===r||r.setActive(a.Drag,!0))},onMove:(e,t)=>{let{dragPropagation:r,dragDirectionLock:n,onDirectionLock:i,onDrag:o}=this.getProps();if(!r&&!this.openGlobalLock)return;let{offset:a}=t;if(n&&null===this.currentDirection){this.currentDirection=function(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(a),null!==this.currentDirection&&(null==i||i(this.currentDirection));return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),null==o||o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()}))}stop(e,t){let r=this.isDragging;if(this.cancel(),!r)return;let{velocity:n}=t;this.startAnimation(n);let{onDragEnd:i}=this.getProps();null==i||i(e,t)}cancel(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(a.Drag,!1)}updateAxis(e,t,r){let{drag:n}=this.getProps();if(!r||!nN(e,n,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?t0(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?t0(r,e,n.max):Math.min(e,r)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:r}=this.visualElement.projection||{},n=this.constraints;e&&h(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=function(e,{top:t,left:r,bottom:n,right:i}){return{x:nr(e.x,r,i),y:nr(e.y,t,n)}}(r.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:ni(e,"left","right"),y:ni(e,"top","bottom")}}(t),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&nc(e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!h(t))return!1;let n=t.current;tW(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,r){let n=nk(e,r),{scroll:i}=t;return i&&(nb(n.x,i.offset.x),nb(n.y,i.offset.y)),n}(n,i.root,this.visualElement.getTransformPagePoint()),a={x:nn((e=i.layout.layoutBox).x,o.x),y:nn(e.y,o.y)};if(r){let e=r(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=nd(e))}return a}startAnimation(e){let{drag:t,dragMomentum:r,dragElastic:n,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{};return Promise.all(nc(a=>{if(!nN(a,t,this.currentDirection))return;let l=(null==s?void 0:s[a])||{};o&&(l={min:0,max:0});let u={type:"inertia",velocity:r?e[a]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(a,u)})).then(a)}startAxisValueAnimation(e,t){let r=this.getAxisMotionValue(e);return r.start(rH(e,r,0,t))}stopAnimation(){nc(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var t;let r="_drag"+e.toUpperCase();return this.visualElement.getProps()[r]||this.visualElement.getValue(e,(null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])||0)}snapToCursor(e){nc(t=>{let{drag:r}=this.getProps();if(!nN(t,r,this.currentDirection))return;let{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){let{min:r,max:o}=n.layout.layoutBox[t];i.set(e[t]-t0(r,o,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!h(r)||!n||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};nc(e=>{let t=this.getAxisMotionValue(e);if(t){let r=t.get();i[e]=function(e,t){let r=.5,n=r3(e),i=r3(t);return i>n?r=rt(t.min,t.max-n,e.min):n>i&&(r=rt(e.min,e.max-i,t.min)),V(0,1,r)}({min:r,max:r},this.constraints[e])}});let{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",null===(e=n.root)||void 0===e||e.updateScroll(),n.updateLayout(),this.resolveConstraints(),nc(e=>{if(!nN(e,t,null))return;let r=this.getAxisMotionValue(e),{min:n,max:o}=this.constraints[e];r.set(t0(n,o,i[e]))})}addListeners(){var e;if(!this.visualElement.current)return;nE.set(this.visualElement,this);let t=eH(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),r=()=>{let{dragConstraints:e}=this.getProps();h(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",r);n&&!n.layout&&(null===(e=n.root)||void 0===e||e.updateScroll(),n.updateLayout()),r();let o=eO(window,"resize",()=>this.scalePositionWithinConstraints()),a=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(nc(t=>{let r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),i(),null==a||a()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function nN(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}let nP={pan:e9(function({onPan:e,onPanStart:t,onPanEnd:r,onPanSessionStart:n,visualElement:i}){let o=(0,l.useRef)(null),{transformPagePoint:a}=(0,l.useContext)(u),s={onSessionStart:n,onStart:t,onMove:e,onEnd:(e,t)=>{o.current=null,r&&r(e,t)}};(0,l.useEffect)(()=>{null!==o.current&&o.current.updateHandlers(s)}),eZ(i,"pointerdown",(e||t||r||n)&&function(e){o.current=new r0(e,s,{transformPagePoint:a})}),(0,eQ.z)(()=>o.current&&o.current.end())}),drag:e9(function(e){let{dragControls:t,visualElement:r}=e,n=(0,C.h)(()=>new nS(r));(0,l.useEffect)(()=>t&&t.subscribe(n),[n,t]),(0,l.useEffect)(()=>n.addListeners(),[n])})};function nL(e){return"string"==typeof e&&e.startsWith("var(--")}let nT=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function nO(e,t,r=1){tW(r<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[n,i]=function(e){let t=nT.exec(e);if(!t)return[,];let[,r,n]=t;return[r,n]}(e);if(!n)return;let o=window.getComputedStyle(t).getPropertyValue(n);return o?o.trim():nL(i)?nO(i,t,r+1):i}let nR=new Set(["width","height","top","left","right","bottom","x","y"]),nA=e=>nR.has(e),nI=e=>Object.keys(e).some(nA),nM=(e,t)=>{e.set(t,!1),e.set(t)},nD=e=>e===$||e===ee;(o=s||(s={})).width="width",o.height="height",o.left="left",o.right="right",o.top="top",o.bottom="bottom";let nF=(e,t)=>parseFloat(e.split(", ")[t]),nz=(e,t)=>(r,{transform:n})=>{if("none"===n||!n)return 0;let i=n.match(/^matrix3d\((.+)\)$/);if(i)return nF(i[1],t);{let t=n.match(/^matrix\((.+)\)$/);return t?nF(t[1],e):0}},nB=new Set(["x","y","z"]),nU=A.filter(e=>!nB.has(e)),nV={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:nz(4,13),y:nz(5,14)},n$=(e,t,r)=>{let n=t.measureViewportBox(),i=getComputedStyle(t.current),{display:o}=i,a={};"none"===o&&t.setStaticValue("display",e.display||"block"),r.forEach(e=>{a[e]=nV[e](n,i)}),t.render();let s=t.measureViewportBox();return r.forEach(r=>{nM(t.getValue(r),a[r]),e[r]=nV[r](s,i)}),e},nH=(e,t,r={},n={})=>{t={...t},n={...n};let i=Object.keys(t).filter(nA),o=[],a=!1,s=[];if(i.forEach(i=>{let l;let u=e.getValue(i);if(!e.hasValue(i))return;let c=r[i],d=tF(c),f=t[i];if(ek(f)){let e=f.length,t=null===f[0]?1:0;d=tF(c=f[t]);for(let r=t;r<e;r++)l?tW(tF(f[r])===l,"All keyframes must be of the same type"):tW((l=tF(f[r]))===d||nD(d)&&nD(l),"Keyframes must be of the same dimension as the current value")}else l=tF(f);if(d!==l){if(nD(d)&&nD(l)){let e=u.get();"string"==typeof e&&u.set(parseFloat(e)),"string"==typeof f?t[i]=parseFloat(f):Array.isArray(f)&&l===ee&&(t[i]=f.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==l?void 0:l.transform)&&(0===c||0===f)?0===c?u.set(l.transform(c)):t[i]=d.transform(f):(a||(o=function(e){let t=[];return nU.forEach(r=>{let n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.render(),t}(e),a=!0),s.push(i),n[i]=void 0!==n[i]?n[i]:t[i],nM(u,f))}}),!s.length)return{target:t,transitionEnd:n};{let r=s.indexOf("height")>=0?window.pageYOffset:null,i=n$(t,e,s);return o.length&&o.forEach(([t,r])=>{e.getValue(t).set(r)}),e.render(),j.j&&null!==r&&window.scrollTo({top:r}),{target:i,transitionEnd:n}}},nZ=(e,t,r,n)=>{var i,o;let a=function(e,{...t},r){let n=e.current;if(!(n instanceof Element))return{target:t,transitionEnd:r};for(let i in r&&(r={...r}),e.values.forEach(e=>{let t=e.get();if(!nL(t))return;let r=nO(t,n);r&&e.set(r)}),t){let e=t[i];if(!nL(e))continue;let o=nO(e,n);o&&(t[i]=o,r&&void 0===r[i]&&(r[i]=e))}return{target:t,transitionEnd:r}}(e,t,n);return t=a.target,n=a.transitionEnd,i=t,o=n,nI(i)?nH(e,i,r,o):{target:i,transitionEnd:o}},nW={current:null},nq={current:!1},nG=Object.keys(_),nY=nG.length,nK=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class nX{constructor({parent:e,props:t,reducedMotionConfig:r,visualState:n},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ta.Z_.render(this.render,!1,!0);let{latestValues:o,renderState:a}=n;this.latestValues=o,this.baseTarget={...o},this.initialValues=t.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=t,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.isControllingVariants=y(t),this.isVariantNode=x(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:s,...l}=this.scrapeMotionValuesFromProps(t);for(let e in l){let t=l[e];void 0!==o[e]&&D(t)&&(t.set(o[e],!1),tV(s)&&s.add(e))}}scrapeMotionValuesFromProps(e){return{}}mount(e){var t;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),nq.current||function(){if(nq.current=!0,j.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nW.current=e.matches;e.addListener(t),t()}else nW.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||nW.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,t,r;for(let n in null===(e=this.projection)||void 0===e||e.unmount(),ta.qY.update(this.notifyUpdate),ta.qY.render(this.render),this.valueSubscriptions.forEach(e=>e()),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(r=this.parent)||void 0===r||r.children.delete(this),this.events)this.events[n].clear();this.current=null}bindToMotionValue(e,t){let r=I.has(e),n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ta.Z_.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{n(),i()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures(e,t,r,n,i,o){let a=[];"production"!==e2.O&&r&&t&&tW(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(let t=0;t<nY;t++){let r=nG[t],{isEnabled:n,Component:i}=_[r];n(e)&&i&&a.push((0,l.createElement)(i,{key:r,...e,visualElement:this}))}if(!this.projection&&i){this.projection=new i(n,this.latestValues,this.parent&&this.parent.projection);let{layoutId:t,layout:r,drag:a,dragConstraints:s,layoutScroll:l}=e;this.projection.setOptions({layoutId:t,layout:r,alwaysMeasureLayout:!!a||s&&h(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof r?r:"both",initialPromotionConfig:o,layoutScroll:l})}return a}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nu()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(let t=0;t<nK.length;t++){let r=nK[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){let{willChange:n}=t;for(let i in t){let o=t[i],a=r[i];if(D(o))e.addValue(i,o),tV(n)&&n.add(i);else if(D(a))e.addValue(i,tp(o,{owner:e})),tV(n)&&n.remove(i);else if(a!==o){if(e.hasValue(i)){let t=e.getValue(i);t.hasAnimated||t.set(o)}else{let t=e.getStaticValue(i);e.addValue(i,tp(void 0!==t?t:o))}}}for(let n in r)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e),this.prevMotionValues)}getProps(){return this.props}getVariant(e){var t;return null===(t=this.props.variants)||void 0===t?void 0:t[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:null===(e=this.parent)||void 0===e?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var t,r;if(e)return null===(t=this.parent)||void 0===t?void 0:t.getVariantContext();if(!this.isControllingVariants){let e=(null===(r=this.parent)||void 0===r?void 0:r.getVariantContext())||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}let n={};for(let e=0;e<nQ;e++){let t=nJ[e],r=this.props[t];(m(r)||!1===r)&&(n[t]=r)}return n}addVariantChild(e){var t;let r=this.getClosestVariantNode();if(r)return null===(t=r.variantChildren)||void 0===t||t.add(e),()=>r.variantChildren.delete(e)}addValue(e,t){this.hasValue(e)&&this.removeValue(e),this.values.set(e,t),this.latestValues[e]=t.get(),this.bindToMotionValue(e,t)}removeValue(e){var t;this.values.delete(e),null===(t=this.valueSubscriptions.get(e))||void 0===t||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=tp(t,{owner:this}),this.addValue(e,r)),r}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let{initial:r}=this.props,n="string"==typeof r||"object"==typeof r?null===(t=eC(this.props,r))||void 0===t?void 0:t[e]:void 0;if(r&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||D(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new tu),this.events[e].add(t)}notify(e,...t){var r;null===(r=this.events[e])||void 0===r||r.notify(...t)}}let nJ=["initial",...rG],nQ=nJ.length;class n0 extends nX{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){var r;return null===(r=e.style)||void 0===r?void 0:r[t]}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...r},{transformValues:n},i){let o=function(e,t,r){var n;let i={};for(let o in e){let e=function(e,t){if(t)return(t[e]||t.default||t).from}(o,t);i[o]=void 0!==e?e:null===(n=r.getValue(o))||void 0===n?void 0:n.get()}return i}(r,e||{},this);if(n&&(t&&(t=n(t)),r&&(r=n(r)),o&&(o=n(o))),i){!function(e,t,r){var n,i;let o=Object.keys(t).filter(t=>!e.hasValue(t)),a=o.length;if(a)for(let s=0;s<a;s++){let a=o[s],l=t[a],u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(i=null!==(n=r[a])&&void 0!==n?n:e.readValue(a))&&void 0!==i?i:t[a]),null!=u&&("string"==typeof u&&(tn(u)||ti(u))?u=parseFloat(u):!tB(u)&&tN.test(l)&&(u=tI(a,l)),e.addValue(a,tp(u,{owner:e})),void 0===r[a]&&(r[a]=u),null!==u&&e.setBaseTarget(a,u))}}(this,r,o);let e=nZ(this,r,o,t);t=e.transitionEnd,r=e.target}return{transition:e,transitionEnd:t,...r}}}class n1 extends n0{readValueFromInstance(e,t){if(I.has(t)){let e=tA(t);return e&&e.default||0}{let r=window.getComputedStyle(e),n=(B(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return nk(e,t)}build(e,t,r,n){ea(e,t,r,n.transformTemplate)}scrapeMotionValuesFromProps(e){return e_(e)}renderInstance(e,t,r,n){ex(e,t,r,n)}}class n2 extends n0{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){var r;return I.has(t)?(null===(r=tA(t))||void 0===r?void 0:r.default)||0:(t=eb.has(t)?t:ey(t),e.getAttribute(t))}measureInstanceViewportBox(){return nu()}scrapeMotionValuesFromProps(e){return ej(e)}build(e,t,r,n){em(e,t,r,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,r,n){ew(e,t,r,n)}mount(e){this.isSVGTag=ev(e.tagName),super.mount(e)}}let n5=(e,t)=>O(e)?new n2(t,{enableHardwareAcceleration:!1}):new n1(t,{enableHardwareAcceleration:!0});function n4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let n3={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!ee.test(e))return e;e=parseFloat(e)}let r=n4(e,t.target.x),n=n4(e,t.target.y);return`${r}% ${n}%`}},n6="_$css",n8={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,i=e.includes("var("),o=[];i&&(e=e.replace(nT,e=>(o.push(e),n6)));let a=tN.parse(e);if(a.length>5)return n;let s=tN.createTransformer(e),l="number"!=typeof a[0]?1:0,u=r.x.scale*t.x,c=r.y.scale*t.y;a[0+l]/=u,a[1+l]/=c;let d=t0(u,c,.5);"number"==typeof a[2+l]&&(a[2+l]/=d),"number"==typeof a[3+l]&&(a[3+l]/=d);let f=s(a);if(i){let e=0;f=f.replace(n6,()=>{let t=o[e];return e++,t})}return f}};class n7 extends l.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:i}=e;Object.assign(R,n9),i&&(t.group&&t.group.add(i),r&&r.register&&n&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),k.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:r,drag:n,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,n||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||ta.Z_.postRender(()=>{var e;(null===(e=o.getStack())||void 0===e?void 0:e.members.length)||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;n&&(n.scheduleCheckAfterUnmount(),(null==t?void 0:t.group)&&t.group.remove(n),(null==r?void 0:r.deregister)&&r.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;null==e||e()}render(){return null}}let n9={borderRadius:{...n3,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:n3,borderTopRightRadius:n3,borderBottomLeftRadius:n3,borderBottomRightRadius:n3,boxShadow:n8},ie=["TopLeft","TopRight","BottomLeft","BottomRight"],it=ie.length,ir=e=>"string"==typeof e?parseFloat(e):e,ii=e=>"number"==typeof e||ee.test(e);function io(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let ia=il(0,.5,rl),is=il(.5,.95,ri);function il(e,t,r){return n=>n<e?0:n>t?1:r(rt(e,t,n))}function iu(e,t){e.min=t.min,e.max=t.max}function ic(e,t){iu(e.x,t.x),iu(e.y,t.y)}function id(e,t,r,n,i){return e-=t,e=n+1/r*(e-n),void 0!==i&&(e=n+1/i*(e-n)),e}function ip(e,t,[r,n,i],o,a){!function(e,t=0,r=1,n=.5,i,o=e,a=e){if(Q.test(t)&&(t=parseFloat(t),t=t0(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=t0(o.min,o.max,n);e===o&&(s-=t),e.min=id(e.min,t,r,s,i),e.max=id(e.max,t,r,s,i)}(e,t[r],t[n],t[i],t.scale,o,a)}let ih=["x","scaleX","originX"],im=["y","scaleY","originY"];function ig(e,t,r,n){ip(e.x,t,ih,null==r?void 0:r.x,null==n?void 0:n.x),ip(e.y,t,im,null==r?void 0:r.y,null==n?void 0:n.y)}function iv(e){return 0===e.translate&&1===e.scale}function iy(e){return iv(e.x)&&iv(e.y)}function ix(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function ib(e){return r3(e.x)/r3(e.y)}class iw{constructor(){this.members=[]}add(e){ts(this.members,e),e.scheduleRender()}remove(e){if(tl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let r=this.members.findIndex(t=>e===t);if(0===r)return!1;for(let e=r;e>=0;e--){let r=this.members[e];if(!1!==r.isPresent){t=r;break}}return!!t&&(this.promote(t),!0)}promote(e,t){var r;let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),(null===(r=e.root)||void 0===r?void 0:r.isUpdating)&&(e.isLayoutDirty=!0);let{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,r,n,i,o;null===(r=(t=e.options).onExitComplete)||void 0===r||r.call(t),null===(o=null===(n=e.resumingFrom)||void 0===n?void 0:(i=n.options).onExitComplete)||void 0===o||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function i_(e,t,r){let n="",i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(n=`translate3d(${i}px, ${o}px, 0) `),(1!==t.x||1!==t.y)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{rotate:e,rotateX:t,rotateY:i}=r;e&&(n+=`rotate(${e}deg) `),t&&(n+=`rotateX(${t}deg) `),i&&(n+=`rotateY(${i}deg) `)}let a=e.x.scale*t.x,s=e.y.scale*t.y;return(1!==a||1!==s)&&(n+=`scale(${a}, ${s})`),n||"none"}let ij=(e,t)=>e.depth-t.depth;class iC{constructor(){this.children=[],this.isDirty=!1}add(e){ts(this.children,e),this.isDirty=!0}remove(e){tl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ij),this.isDirty=!1,this.children.forEach(e)}}let ik=["","X","Y","Z"],iE=0;function iS({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(e,r={},n=null==t?void 0:t()){this.id=iE++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(iL),this.nodes.forEach(iI),this.nodes.forEach(iM)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=r,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new iC)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new tu),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let r=this.eventHandlers.get(e);null==r||r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}registerPotentialNode(e,t){this.potentialNodes.set(e,t)}mount(t,r=!1){var n;if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;let{layoutId:i,layout:o,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),null===(n=this.parent)||void 0===n||n.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),r&&(o||i)&&(this.isLayoutDirty=!0),e){let r;let n=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,r&&r(),r=rP(n,250),k.hasAnimatedSinceResize&&(k.hasAnimatedSinceResize=!1,this.nodes.forEach(iA))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&a&&(i||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:r,layout:n})=>{var i,o,s,l,u;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let c=null!==(o=null!==(i=this.options.transition)&&void 0!==i?i:a.getDefaultTransition())&&void 0!==o?o:iV,{onLayoutAnimationStart:d,onLayoutAnimationComplete:f}=a.getProps(),p=!this.targetLayout||!ix(this.targetLayout,n)||r,h=!t&&r;if((null===(s=this.resumeFrom)||void 0===s?void 0:s.instance)||h||t&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,h);let t={...rz(c,"layout"),onPlay:d,onComplete:f};a.shouldReduceMotion&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||iA(this),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=n})}unmount(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,ta.qY.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}startUpdate(){var e;!this.isUpdateBlocked()&&(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(iD),this.animationId++)}willUpdate(e=!0){var t,r,n;if(this.root.isUpdateBlocked()){null===(r=(t=this.options).onExitComplete)||void 0===r||r.call(t);return}if(this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot")}let{layoutId:i,layout:o}=this.options;if(void 0===i&&!o)return;let a=null===(n=this.options.visualElement)||void 0===n?void 0:n.getProps().transformTemplate;this.prevTransformTemplateValue=null==a?void 0:a(this.latestValues,""),this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(iO);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(i$),this.potentialNodes.clear()),this.nodes.forEach(iR),this.nodes.forEach(iN),this.nodes.forEach(iP),this.clearAllSnapshots(),ta.iW.update(),ta.iW.preRender(),ta.iW.render())}clearAllSnapshots(){this.nodes.forEach(iT),this.sharedNodes.forEach(iF)}scheduleUpdateProjection(){ta.Z_.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){ta.Z_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){var e;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=nu(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),null===(e=this.options.visualElement)||void 0===e||e.notify("LayoutMeasure",this.layout.layoutBox,null==t?void 0:t.layoutBox)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:n(this.instance),offset:r(this.instance)})}resetTransform(){var e;if(!i)return;let t=this.isLayoutDirty||this.shouldResetTransform,r=this.projectionDelta&&!iy(this.projectionDelta),n=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate,o=null==n?void 0:n(this.latestValues,""),a=o!==this.prevTransformTemplateValue;t&&(r||nh(this.latestValues)||a)&&(i(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let r=this.measurePageBox(),n=this.removeElementScroll(r);return e&&(n=this.removeTransform(n)),iH((t=n).x),iH(t.y),{animationId:this.root.animationId,measuredBox:r,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return nu();let t=e.measureViewportBox(),{scroll:r}=this.root;return r&&(nb(t.x,r.offset.x),nb(t.y,r.offset.y)),t}removeElementScroll(e){let t=nu();ic(t,e);for(let r=0;r<this.path.length;r++){let n=this.path[r],{scroll:i,options:o}=n;if(n!==this.root&&i&&o.layoutScroll){if(i.isRoot){ic(t,e);let{scroll:r}=this.root;r&&(nb(t.x,-r.offset.x),nb(t.y,-r.offset.y))}nb(t.x,i.offset.x),nb(t.y,i.offset.y)}}return t}applyTransform(e,t=!1){let r=nu();ic(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&nC(r,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),nh(n.latestValues)&&nC(r,n.latestValues)}return nh(this.latestValues)&&nC(r,this.latestValues),r}removeTransform(e){var t;let r=nu();ic(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!nh(n.latestValues))continue;np(n.latestValues)&&n.updateSnapshot();let i=nu();ic(i,n.measurePageBox()),ig(r,n.latestValues,null===(t=n.snapshot)||void 0===t?void 0:t.layoutBox,i)}return nh(this.latestValues)&&ig(r,this.latestValues),r}setTargetDelta(e){this.targetDelta=e,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var e,t,r,n;let i=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;let{layout:o,layoutId:a}=this.options;if(this.layout&&(o||a)){if(!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout?(this.relativeParent=e,this.relativeTarget=nu(),this.relativeTargetOrigin=nu(),nt(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if((this.relativeTarget||this.targetDelta)&&((this.target||(this.target=nu(),this.targetWithTransforms=nu()),this.relativeTarget&&this.relativeTargetOrigin&&(null===(e=this.relativeParent)||void 0===e?void 0:e.target))?(t=this.target,r=this.relativeTarget,n=this.relativeParent.target,r9(t.x,r.x,n.x),r9(t.y,r.y,n.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ic(this.target,this.layout.layoutBox),ny(this.target,this.targetDelta)):ic(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target?(this.relativeParent=e,this.relativeTarget=nu(),this.relativeTargetOrigin=nu(),nt(this.relativeTargetOrigin,this.target,e.target),ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||np(this.parent.latestValues)||nm(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var e;let{isProjectionDirty:t,isTransformDirty:r}=this;this.isProjectionDirty=this.isTransformDirty=!1;let n=this.getLead(),i=!!this.resumingFrom||this!==n,o=!0;if(t&&(o=!1),i&&r&&(o=!1),o)return;let{layout:a,layoutId:s}=this.options;if(this.isTreeAnimating=!!((null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(a||s))return;ic(this.layoutCorrected,this.layout.layoutBox),function(e,t,r,n=!1){var i,o;let a,s;let l=r.length;if(l){t.x=t.y=1;for(let u=0;u<l;u++)s=(a=r[u]).projectionDelta,(null===(o=null===(i=a.instance)||void 0===i?void 0:i.style)||void 0===o?void 0:o.display)!=="contents"&&(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&nC(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,ny(e,s)),n&&nh(a.latestValues)&&nC(e,a.latestValues));t.x=nx(t.x),t.y=nx(t.y)}}(this.layoutCorrected,this.treeScale,this.path,i);let{target:l}=n;if(!l)return;this.projectionDelta||(this.projectionDelta=ns(),this.projectionDeltaWithTransform=ns());let u=this.treeScale.x,c=this.treeScale.y,d=this.projectionTransform;r7(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=i_(this.projectionDelta,this.treeScale),(this.projectionTransform!==d||this.treeScale.x!==u||this.treeScale.y!==c)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t,r,n;null===(r=(t=this.options).scheduleRender)||void 0===r||r.call(t),e&&(null===(n=this.getStack())||void 0===n||n.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){var r,n;let i=this.snapshot,o=(null==i?void 0:i.latestValues)||{},a={...this.latestValues},s=ns();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!t;let l=nu(),u=(null==i?void 0:i.source)!==(null===(r=this.layout)||void 0===r?void 0:r.source),c=1>=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0),d=!!(u&&!c&&!0===this.options.crossfade&&!this.path.some(iU));this.animationProgress=0,this.mixTargetDelta=t=>{var r,n,i;let f=t/1e3;iz(s.x,e.x,f),iz(s.y,e.y,f),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(r=this.relativeParent)||void 0===r?void 0:r.layout)&&(nt(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),n=this.relativeTarget,i=this.relativeTargetOrigin,iB(n.x,i.x,l.x,f),iB(n.y,i.y,l.y,f)),u&&(this.animationValues=a,function(e,t,r,n,i,o){i?(e.opacity=t0(0,void 0!==r.opacity?r.opacity:1,ia(n)),e.opacityExit=t0(void 0!==t.opacity?t.opacity:1,0,is(n))):o&&(e.opacity=t0(void 0!==t.opacity?t.opacity:1,void 0!==r.opacity?r.opacity:1,n));for(let i=0;i<it;i++){let o=`border${ie[i]}Radius`,a=io(t,o),s=io(r,o);(void 0!==a||void 0!==s)&&(a||(a=0),s||(s=0),0===a||0===s||ii(a)===ii(s)?(e[o]=Math.max(t0(ir(a),ir(s),n),0),(Q.test(s)||Q.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||r.rotate)&&(e.rotate=t0(t.rotate||0,r.rotate||0,n))}(a,o,this.latestValues,f,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=f},this.mixTargetDelta(0)}startAnimation(e){var t,r;this.notifyListeners("animationStart"),null===(t=this.currentAnimation)||void 0===t||t.stop(),this.resumingFrom&&(null===(r=this.resumingFrom.currentAnimation)||void 0===r||r.stop()),this.pendingAnimation&&(ta.qY.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ta.Z_.update(()=>{k.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,r={}){let n=D(0)?0:tp(0);return n.start(rH("",n,1e3,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}(0,0,{...e,onUpdate:t=>{var r;this.mixTargetDelta(t),null===(r=e.onUpdate)||void 0===r||r.call(e,t)},onComplete:()=>{var t;null===(t=e.onComplete)||void 0===t||t.call(e),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:r,layout:n,latestValues:i}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&iZ(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||nu();let t=r3(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;let n=r3(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}ic(t,r),nC(t,i),r7(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){var r,n,i;this.sharedNodes.has(e)||this.sharedNodes.set(e,new iw),this.sharedNodes.get(e).add(t),t.promote({transition:null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.transition,preserveFollowOpacity:null===(i=null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(n,t)})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){let n=this.getStack();n&&n.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:r}=e;if((r.rotate||r.rotateX||r.rotateY||r.rotateZ)&&(t=!0),!t)return;let n={};for(let t=0;t<ik.length;t++){let i="rotate"+ik[t];r[i]&&(n[i]=r[i],e.setStaticValue(i,0))}for(let t in null==e||e.render(),n)e.setStaticValue(t,n[t]);e.scheduleRender()}getProjectionStyles(e={}){var t,r,n;let i={};if(!this.instance||this.isSVG)return i;if(!this.isVisible)return{visibility:"hidden"};i.visibility="";let o=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=eN(e.pointerEvents)||"",i.transform=o?o(this.latestValues,""):"none",i;let a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){let t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=eN(e.pointerEvents)||""),this.hasProjected&&!nh(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}let s=a.animationValues||a.latestValues;this.applyTransformsToTarget(),i.transform=i_(this.projectionDeltaWithTransform,this.treeScale,s),o&&(i.transform=o(s,i.transform));let{x:l,y:u}=this.projectionDelta;for(let e in i.transformOrigin=`${100*l.origin}% ${100*u.origin}% 0`,a.animationValues?i.opacity=a===this?null!==(n=null!==(r=s.opacity)&&void 0!==r?r:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:i.opacity=a===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,R){if(void 0===s[e])continue;let{correct:t,applyTo:r}=R[e],n=t(s[e],a);if(r){let e=r.length;for(let t=0;t<e;t++)i[r[t]]=n}else i[e]=n}return this.options.layoutId&&(i.pointerEvents=a===this?eN(e.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(iO),this.root.sharedNodes.clear()}}}function iN(e){e.updateLayout()}function iP(e){var t,r,n;let i=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:r}=e.layout,{animationType:n}=e.options,o=i.source!==e.layout.source;"size"===n?nc(e=>{let r=o?i.measuredBox[e]:i.layoutBox[e],n=r3(r);r.min=t[e].min,r.max=r.min+n}):iZ(n,i.layoutBox,t)&&nc(e=>{let r=o?i.measuredBox[e]:i.layoutBox[e],n=r3(t[e]);r.max=r.min+n});let a=ns();r7(a,t,i.layoutBox);let s=ns();o?r7(s,e.applyTransform(r,!0),i.measuredBox):r7(s,t,i.layoutBox);let l=!iy(a),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:e,layout:n}=r;if(e&&n){let r=nu();nt(r,i.layoutBox,e.layoutBox);let o=nu();nt(o,t,n.layoutBox),ix(r,o)||(u=!0)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:i,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else e.isLead()&&(null===(n=(r=e.options).onExitComplete)||void 0===n||n.call(r));e.options.transition=void 0}function iL(e){e.isProjectionDirty||(e.isProjectionDirty=!!(e.parent&&e.parent.isProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=!!(e.parent&&e.parent.isTransformDirty))}function iT(e){e.clearSnapshot()}function iO(e){e.clearMeasurements()}function iR(e){let{visualElement:t}=e.options;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function iA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function iI(e){e.resolveTargetDelta()}function iM(e){e.calcProjection()}function iD(e){e.resetRotation()}function iF(e){e.removeLeadSnapshot()}function iz(e,t,r){e.translate=t0(t.translate,0,r),e.scale=t0(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function iB(e,t,r,n){e.min=t0(t.min,r.min,n),e.max=t0(t.max,r.max,n)}function iU(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let iV={duration:.45,ease:[.4,0,.1,1]};function i$(e,t){let r=e.root;for(let t=e.path.length-1;t>=0;t--)if(e.path[t].instance){r=e.path[t];break}let n=(r&&r!==e.root?r.instance:document).querySelector(`[data-projection-id="${t}"]`);n&&e.mount(n,!0)}function iH(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function iZ(e,t,r){return"position"===e||"preserve-aspect"===e&&!r6(ib(t),ib(r),.2)}let iW=iS({attachResizeListener:(e,t)=>eO(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),iq={current:void 0},iG=iS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!iq.current){let e=new iW(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),iq.current=e}return iq.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position}),iY={...rJ,...te,...nP,measureLayout:function(e){let[t,r]=(0,tt.oO)(),n=(0,l.useContext)(S.p);return l.createElement(n7,{...e,layoutGroup:n,switchLayoutGroup:(0,l.useContext)(P),isPresent:t,safeToRemove:r})}},iK=function(e){function t(t,r={}){return function({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:o}){e&&function(e){for(let t in e)"projectionNodeConstructor"===t?_.projectionNodeConstructor=e[t]:_[t].Component=e[t]}(e);let a=(0,l.forwardRef)(function(a,s){var g;let v={...(0,l.useContext)(u),...a,layoutId:function({layoutId:e}){let t=(0,l.useContext)(S.p).id;return t&&void 0!==e?t+"-"+e:e}(a)},{isStatic:x}=v,w=null,L=function(e){let{initial:t,animate:r}=function(e,t){if(y(e)){let{initial:t,animate:r}=e;return{initial:!1===t||m(t)?t:void 0,animate:m(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,l.useContext)(c));return(0,l.useMemo)(()=>({initial:t,animate:r}),[b(t),b(r)])}(a),T=x?void 0:(0,C.h)(()=>{if(k.hasEverUpdated)return E++}),O=i(a,x);if(!x&&j.j){L.visualElement=function(e,t,r,n){let i=(0,l.useContext)(c).visualElement,o=(0,l.useContext)(p),a=(0,l.useContext)(d.O),s=(0,l.useContext)(u).reducedMotion,h=(0,l.useRef)();n=n||o.renderer,!h.current&&n&&(h.current=n(e,{visualState:t,parent:i,props:r,presenceId:a?a.id:void 0,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));let m=h.current;return(0,f.L)(()=>{m&&m.render()}),(0,f.L)(()=>{m&&m.animationState&&m.animationState.animateChanges()}),(0,f.L)(()=>()=>m&&m.notify("Unmount"),[]),m}(o,O,v,t);let n=(0,l.useContext)(p).strict,i=(0,l.useContext)(P);L.visualElement&&(w=L.visualElement.loadFeatures(v,n,e,T,r||_.projectionNodeConstructor,i))}return l.createElement(N,{visualElement:L.visualElement,props:v},w,l.createElement(c.Provider,{value:L},n(o,a,T,(g=L.visualElement,(0,l.useCallback)(e=>{e&&O.mount&&O.mount(e),g&&(e?g.mount(e):g.unmount()),s&&("function"==typeof s?s(e):h(s)&&(s.current=e))},[g])),O,x,L.visualElement)))});return a[L]=o,a}(e(t,r))}if("undefined"==typeof Proxy)return t;let r=new Map;return new Proxy(t,{get:(e,n)=>(r.has(n)||r.set(n,t(n)),r.get(n))})}((e,t)=>(function(e,{forwardMotionProps:t=!1},r,n,i){return{...O(e)?eL:eT,preloadedFeatures:r,useRender:function(e=!1){return(t,r,n,i,{latestValues:o},a)=>{let s=(O(t)?function(e,t,r,n){let i=(0,l.useMemo)(()=>{let r=eg();return em(r,t,{enableHardwareAcceleration:!1},ev(n),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};el(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t,r){let n={},i=function(e,t,r){let n=e.style||{},i={};return el(i,n,e),Object.assign(i,function({transformTemplate:e},t,r){return(0,l.useMemo)(()=>{let n=es();return ea(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)},[t])}(e,t,r)),e.transformValues?e.transformValues(i):i}(e,t,r);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),n.style=i,n})(r,o,a,t),u={...function(e,t,r){let n={};for(let i in e)(ed(i)||!0===r&&ec(i)||!t&&!ec(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}(r,"string"==typeof t,e),...s,ref:i};return n&&(u["data-projection-id"]=n),(0,l.createElement)(t,u)}}(t),createVisualElement:n,projectionNodeConstructor:i,Component:e}})(e,t,iY,n5,iG))},11741:function(e,t,r){"use strict";r.d(t,{j:function(){return n}});let n="undefined"!=typeof document},49304:function(e,t,r){"use strict";r.d(t,{O:function(){return i}});var n=r(34155);let i=(void 0===n||n.env,"production")},96681:function(e,t,r){"use strict";r.d(t,{h:function(){return i}});var n=r(67294);function i(e){let t=(0,n.useRef)(null);return null===t.current&&(t.current=e()),t.current}},17037:function(e,t,r){"use strict";r.d(t,{Y:function(){return a}});var n=r(67294);let i=e=>"function"==typeof e,o={any:0,all:1};function a(e,{root:t,margin:r,amount:a,once:s=!1}={}){let[l,u]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!e.current||s&&l)return;let n={root:t&&t.current||void 0,margin:r,amount:"some"===a?"any":a};return function(e,t,{root:r,margin:n,amount:a="any"}={}){var s;if("undefined"==typeof IntersectionObserver)return()=>{};let l=("string"==typeof(s=e)?s=document.querySelectorAll(s):s instanceof Element&&(s=[s]),Array.from(s||[])),u=new WeakMap,c=new IntersectionObserver(e=>{e.forEach(e=>{let r=u.get(e.target);if(!!r!==e.isIntersecting){if(e.isIntersecting){let r=t(e);i(r)?u.set(e.target,r):c.unobserve(e.target)}else r&&(r(e),u.delete(e.target))}})},{root:r,rootMargin:n,threshold:"number"==typeof a?a:o[a]});return l.forEach(e=>c.observe(e)),()=>c.disconnect()}(e.current,()=>(u(!0),s?void 0:()=>u(!1)),n)},[t,e,r,s]),l}},58868:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(67294);let i=r(11741).j?n.useLayoutEffect:n.useEffect},65411:function(e,t,r){"use strict";r.d(t,{z:function(){return i}});var n=r(67294);function i(e){return(0,n.useEffect)(()=>()=>e(),[])}},16034:function(e,t,r){"use strict";r.d(t,{O:function(){return i}});let n=new Set;function i(e,t,r){e||n.has(t)||(console.warn(t),r&&console.warn(r),n.add(t))}},53416:function(e,t,r){"use strict";r.d(t,{x0:function(){return n}});let n=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"")},10046:function(e,t,r){"use strict";r.d(t,{$l:function(){return a},BN:function(){return M},DY:function(){return h},Fs:function(){return z},J$:function(){return H},JG:function(){return B},JN:function(){return w},LI:function(){return P},PM:function(){return u},UG:function(){return Z},W6:function(){return S},i_:function(){return o},kY:function(){return Y},ko:function(){return J},kw:function(){return N},mf:function(){return l},o8:function(){return s},qC:function(){return O},s6:function(){return X},sj:function(){return I},u3:function(){return A},u_:function(){return U},w6:function(){return E},xD:function(){return Q}});var n=r(67294);let i=()=>{},o=i(),a=Object,s=e=>e===o,l=e=>"function"==typeof e,u=(e,t)=>({...e,...t}),c=e=>l(e.then),d=new WeakMap,f=0,p=e=>{let t,r;let n=typeof e,i=e&&e.constructor,o=i==Date;if(a(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=d.get(e))return t;if(t=++f+"~",d.set(e,t),i==Array){for(r=0,t="@";r<e.length;r++)t+=p(e[r])+",";d.set(e,t)}if(i==a){t="#";let n=a.keys(e).sort();for(;!s(r=n.pop());)s(e[r])||(t+=r+":"+p(e[r])+",");d.set(e,t)}}return t},h=new WeakMap,m={},g={},v="undefined",y=typeof window!=v,x=typeof document!=v,b=()=>y&&typeof window.requestAnimationFrame!=v,w=(e,t)=>{let r=h.get(e);return[()=>!s(t)&&e.get(t)||m,n=>{if(!s(t)){let i=e.get(t);t in g||(g[t]=i),r[5](t,u(i,n),i||m)}},r[6],()=>!s(t)&&t in g?g[t]:!s(t)&&e.get(t)||m]},_=!0,[j,C]=y&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[i,i],k={initFocus:e=>(x&&document.addEventListener("visibilitychange",e),j("focus",e),()=>{x&&document.removeEventListener("visibilitychange",e),C("focus",e)}),initReconnect:e=>{let t=()=>{_=!0,e()},r=()=>{_=!1};return j("online",t),j("offline",r),()=>{C("online",t),C("offline",r)}}},E=!n.useId,S=!y||"Deno"in window,N=e=>b()?window.requestAnimationFrame(e):setTimeout(e,1),P=S?n.useEffect:n.useLayoutEffect,L="undefined"!=typeof navigator&&navigator.connection,T=!S&&L&&(["slow-2g","2g"].includes(L.effectiveType)||L.saveData),O=e=>{if(l(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?p(e):"",t]},R=0,A=()=>++R;var I={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function M(...e){let[t,r,n,i]=e,a=u({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),d=a.populateCache,f=a.rollbackOnError,p=a.optimisticData,m=e=>"function"==typeof f?f(e):!1!==f,g=a.throwOnError;if(l(r)){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(v))}return v(r);async function v(r){let i;let[u]=O(r);if(!u)return;let[f,v]=w(t,u),[y,x,b,_]=h.get(t),j=()=>{let e=y[u];return(l(a.revalidate)?a.revalidate(f().data,r):!1!==a.revalidate)&&(delete b[u],delete _[u],e&&e[0])?e[0](2).then(()=>f().data):f().data};if(e.length<3)return j();let C=n,k=A();x[u]=[k,0];let E=!s(p),S=f(),N=S.data,P=S._c,L=s(P)?N:P;if(E&&v({data:p=l(p)?p(L,N):p,_c:L}),l(C))try{C=C(L)}catch(e){i=e}if(C&&c(C)){if(C=await C.catch(e=>{i=e}),k!==x[u][0]){if(i)throw i;return C}i&&E&&m(i)&&(d=!0,v({data:L,_c:o}))}if(d&&!i&&(l(d)?v({data:d(C,L),error:o,_c:o}):v({data:C,error:o,_c:o})),x[u][1]=A(),Promise.resolve(j()).then(()=>{v({_c:o})}),i){if(g)throw i;return}return C}}let D=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},F=(e,t)=>{if(!h.has(e)){let r=u(k,t),n={},a=M.bind(o,e),s=i,l={},c=(e,t)=>{let r=l[e]||[];return l[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},d=(t,r,n)=>{e.set(t,r);let i=l[t];if(i)for(let e of i)e(r,n)},f=()=>{if(!h.has(e)&&(h.set(e,[n,{},{},{},a,d,c]),!S)){let t=r.initFocus(setTimeout.bind(o,D.bind(o,n,0))),i=r.initReconnect(setTimeout.bind(o,D.bind(o,n,1)));s=()=>{t&&t(),i&&i(),h.delete(e)}}};return f(),[e,a,f,s]}return[e,h.get(e)[4]]},[z,B]=F(new Map),U=u({onLoadingSlow:i,onSuccess:i,onError:i,onErrorRetry:(e,t,r,n,i)=>{let o=r.errorRetryCount,a=i.retryCount,l=~~((Math.random()+.5)*(1<<(a<8?a:8)))*r.errorRetryInterval;(s(o)||!(a>o))&&setTimeout(n,l,i)},onDiscarded:i,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:T?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:T?5e3:3e3,compare:(e,t)=>p(e)==p(t),isPaused:()=>!1,cache:z,mutate:B,fallback:{}},{isOnline:()=>_,isVisible:()=>{let e=x&&document.visibilityState;return s(e)||"hidden"!==e}}),V=(e,t)=>{let r=u(e,t);if(t){let{use:n,fallback:i}=e,{use:o,fallback:a}=t;n&&o&&(r.use=n.concat(o)),i&&a&&(r.fallback=u(i,a))}return r},$=(0,n.createContext)({}),H=e=>{let{value:t}=e,r=(0,n.useContext)($),i=l(t),a=(0,n.useMemo)(()=>i?t(r):t,[i,r,t]),s=(0,n.useMemo)(()=>i?a:V(r,a),[i,r,a]),c=a&&a.provider,d=(0,n.useRef)(o);c&&!d.current&&(d.current=F(c(s.cache||z),a));let f=d.current;return f&&(s.cache=f[0],s.mutate=f[1]),P(()=>{if(f)return f[2]&&f[2](),f[3]},[]),(0,n.createElement)($.Provider,u(e,{value:s}))},Z="$inf$",W=y&&window.__SWR_DEVTOOLS_USE__,q=W?window.__SWR_DEVTOOLS_USE__:[],G=e=>l(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Y=()=>u(U,(0,n.useContext)($)),K=q.concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=O(t),[,,,i]=h.get(z);if(n.startsWith(Z))return r(...e);let o=i[n];return s(o)?r(...e):(delete i[n],o)});return e(t,i,n)}),X=e=>function(...t){let r=Y(),[n,i,o]=G(t),a=V(r,o),s=e,{use:l}=a,u=(l||[]).concat(K);for(let e=u.length;e--;)s=u[e](s);return s(n,i||a.fetcher||null,a)},J=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}},Q=(e,t)=>(...r)=>{let[n,i,o]=G(r),a=(o.use||[]).concat(t);return e(n,i,{...o,use:a})};W&&(window.__SWR_DEVTOOLS_REACT__=n)},59820:function(e,t,r){"use strict";r.d(t,{J$:function(){return l},JG:function(){return o.JG},ZP:function(){return u},kY:function(){return o.kY}});var n=r(67294),i=r(61688),o=r(10046);let a=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),s={dedupe:!0},l=o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_}),u=(0,o.s6)((e,t,r)=>{let{cache:l,compare:u,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:v}=r,[y,x,b,w]=o.DY.get(l),[_,j]=(0,o.qC)(e),C=(0,n.useRef)(!1),k=(0,n.useRef)(!1),E=(0,n.useRef)(_),S=(0,n.useRef)(t),N=(0,n.useRef)(r),P=()=>N.current,L=()=>P().isVisible()&&P().isOnline(),[T,O,R,A]=(0,o.JN)(l,_),I=(0,n.useRef)({}).current,M=(0,o.o8)(d)?r.fallback[_]:d,D=(e,t)=>{for(let r in I)if("data"===r){if(!u(e[r],t[r])&&(!(0,o.o8)(e[r])||!u(W,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},F=(0,n.useMemo)(()=>{let e=!!_&&!!t&&((0,o.o8)(f)?!P().isPaused()&&!c&&(!!(0,o.o8)(p)||p):f),r=t=>{let r=(0,o.PM)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=T(),i=A(),a=r(n),s=n===i?a:r(i),l=a;return[()=>{let e=r(T());return D(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[l,_]),z=(0,i.useSyncExternalStore)((0,n.useCallback)(e=>R(_,(t,r)=>{D(r,t)||e()}),[l,_]),F[0],F[1]),B=!C.current,U=y[_]&&y[_].length>0,V=z.data,$=(0,o.o8)(V)?M:V,H=z.error,Z=(0,n.useRef)($),W=v?(0,o.o8)(V)?Z.current:V:$,q=(!U||!!(0,o.o8)(H))&&(B&&!(0,o.o8)(f)?f:!P().isPaused()&&(c?!(0,o.o8)($)&&p:(0,o.o8)($)||p)),G=!!(_&&t&&B&&q),Y=(0,o.o8)(z.isValidating)?G:z.isValidating,K=(0,o.o8)(z.isLoading)?G:z.isLoading,X=(0,n.useCallback)(async e=>{let t,n;let i=S.current;if(!_||!i||k.current||P().isPaused())return!1;let a=!0,s=e||{},l=!b[_]||!s.dedupe,c=()=>o.w6?!k.current&&_===E.current&&C.current:_===E.current,d={isValidating:!1,isLoading:!1},f=()=>{O(d)},p=()=>{let e=b[_];e&&e[1]===n&&delete b[_]},h={isValidating:!0};(0,o.o8)(T().data)&&(h.isLoading=!0);try{if(l&&(O(h),r.loadingTimeout&&(0,o.o8)(T().data)&&setTimeout(()=>{a&&c()&&P().onLoadingSlow(_,r)},r.loadingTimeout),b[_]=[i(j),(0,o.u3)()]),[t,n]=b[_],t=await t,l&&setTimeout(p,r.dedupingInterval),!b[_]||b[_][1]!==n)return l&&c()&&P().onDiscarded(_),!1;d.error=o.i_;let e=x[_];if(!(0,o.o8)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&P().onDiscarded(_),!1;let s=T().data;d.data=u(s,t)?s:t,l&&c()&&P().onSuccess(t,_,r)}catch(r){p();let e=P(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,_,e),(!0===t||(0,o.mf)(t)&&t(r))&&(!P().revalidateOnFocus||!P().revalidateOnReconnect||L())&&e.onErrorRetry(r,_,e,e=>{let t=y[_];t&&t[0]&&t[0](o.sj.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,f(),!0},[_,l]),J=(0,n.useCallback)((...e)=>(0,o.BN)(l,E.current,...e),[]);if((0,o.LI)(()=>{S.current=t,N.current=r,(0,o.o8)(V)||(Z.current=V)}),(0,o.LI)(()=>{if(!_)return;let e=X.bind(o.i_,s),t=0,r=(0,o.ko)(_,y,(r,n={})=>{if(r==o.sj.FOCUS_EVENT){let r=Date.now();P().revalidateOnFocus&&r>t&&L()&&(t=r+P().focusThrottleInterval,e())}else if(r==o.sj.RECONNECT_EVENT)P().revalidateOnReconnect&&L()&&e();else if(r==o.sj.MUTATE_EVENT)return X();else if(r==o.sj.ERROR_REVALIDATE_EVENT)return X(n)});return k.current=!1,E.current=_,C.current=!0,O({_k:j}),q&&((0,o.o8)($)||o.W6?e():(0,o.kw)(e)),()=>{k.current=!0,r()}},[_]),(0,o.LI)(()=>{let e;function t(){let t=(0,o.mf)(h)?h(T().data):h;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!T().error&&(m||P().isVisible())&&(g||P().isOnline())?X(s).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,g,_]),(0,n.useDebugValue)(W),c&&(0,o.o8)($)&&_){if(!o.w6&&o.W6)throw Error("Fallback data is required when using suspense in SSR.");S.current=t,N.current=r,k.current=!1;let e=w[_];if((0,o.o8)(e)||a(J(e)),(0,o.o8)(H)){let e=X(s);(0,o.o8)(W)||(e.status="fulfilled",e.value=!0),a(e)}else throw H}return{mutate:J,get data(){return I.data=!0,W},get error(){return I.error=!0,H},get isValidating(){return I.isValidating=!0,Y},get isLoading(){return I.isLoading=!0,K}}})},49870:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(67294),i=r(61688),o=r(10046);let a=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),s={dedupe:!0};o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_});let l=(0,o.s6)((e,t,r)=>{let{cache:l,compare:u,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:v}=r,[y,x,b,w]=o.DY.get(l),[_,j]=(0,o.qC)(e),C=(0,n.useRef)(!1),k=(0,n.useRef)(!1),E=(0,n.useRef)(_),S=(0,n.useRef)(t),N=(0,n.useRef)(r),P=()=>N.current,L=()=>P().isVisible()&&P().isOnline(),[T,O,R,A]=(0,o.JN)(l,_),I=(0,n.useRef)({}).current,M=(0,o.o8)(d)?r.fallback[_]:d,D=(e,t)=>{for(let r in I)if("data"===r){if(!u(e[r],t[r])&&(!(0,o.o8)(e[r])||!u(W,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},F=(0,n.useMemo)(()=>{let e=!!_&&!!t&&((0,o.o8)(f)?!P().isPaused()&&!c&&(!!(0,o.o8)(p)||p):f),r=t=>{let r=(0,o.PM)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=T(),i=A(),a=r(n),s=n===i?a:r(i),l=a;return[()=>{let e=r(T());return D(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[l,_]),z=(0,i.useSyncExternalStore)((0,n.useCallback)(e=>R(_,(t,r)=>{D(r,t)||e()}),[l,_]),F[0],F[1]),B=!C.current,U=y[_]&&y[_].length>0,V=z.data,$=(0,o.o8)(V)?M:V,H=z.error,Z=(0,n.useRef)($),W=v?(0,o.o8)(V)?Z.current:V:$,q=(!U||!!(0,o.o8)(H))&&(B&&!(0,o.o8)(f)?f:!P().isPaused()&&(c?!(0,o.o8)($)&&p:(0,o.o8)($)||p)),G=!!(_&&t&&B&&q),Y=(0,o.o8)(z.isValidating)?G:z.isValidating,K=(0,o.o8)(z.isLoading)?G:z.isLoading,X=(0,n.useCallback)(async e=>{let t,n;let i=S.current;if(!_||!i||k.current||P().isPaused())return!1;let a=!0,s=e||{},l=!b[_]||!s.dedupe,c=()=>o.w6?!k.current&&_===E.current&&C.current:_===E.current,d={isValidating:!1,isLoading:!1},f=()=>{O(d)},p=()=>{let e=b[_];e&&e[1]===n&&delete b[_]},h={isValidating:!0};(0,o.o8)(T().data)&&(h.isLoading=!0);try{if(l&&(O(h),r.loadingTimeout&&(0,o.o8)(T().data)&&setTimeout(()=>{a&&c()&&P().onLoadingSlow(_,r)},r.loadingTimeout),b[_]=[i(j),(0,o.u3)()]),[t,n]=b[_],t=await t,l&&setTimeout(p,r.dedupingInterval),!b[_]||b[_][1]!==n)return l&&c()&&P().onDiscarded(_),!1;d.error=o.i_;let e=x[_];if(!(0,o.o8)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&P().onDiscarded(_),!1;let s=T().data;d.data=u(s,t)?s:t,l&&c()&&P().onSuccess(t,_,r)}catch(r){p();let e=P(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,_,e),(!0===t||(0,o.mf)(t)&&t(r))&&(!P().revalidateOnFocus||!P().revalidateOnReconnect||L())&&e.onErrorRetry(r,_,e,e=>{let t=y[_];t&&t[0]&&t[0](o.sj.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,f(),!0},[_,l]),J=(0,n.useCallback)((...e)=>(0,o.BN)(l,E.current,...e),[]);if((0,o.LI)(()=>{S.current=t,N.current=r,(0,o.o8)(V)||(Z.current=V)}),(0,o.LI)(()=>{if(!_)return;let e=X.bind(o.i_,s),t=0,r=(0,o.ko)(_,y,(r,n={})=>{if(r==o.sj.FOCUS_EVENT){let r=Date.now();P().revalidateOnFocus&&r>t&&L()&&(t=r+P().focusThrottleInterval,e())}else if(r==o.sj.RECONNECT_EVENT)P().revalidateOnReconnect&&L()&&e();else if(r==o.sj.MUTATE_EVENT)return X();else if(r==o.sj.ERROR_REVALIDATE_EVENT)return X(n)});return k.current=!1,E.current=_,C.current=!0,O({_k:j}),q&&((0,o.o8)($)||o.W6?e():(0,o.kw)(e)),()=>{k.current=!0,r()}},[_]),(0,o.LI)(()=>{let e;function t(){let t=(0,o.mf)(h)?h(T().data):h;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!T().error&&(m||P().isVisible())&&(g||P().isOnline())?X(s).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,g,_]),(0,n.useDebugValue)(W),c&&(0,o.o8)($)&&_){if(!o.w6&&o.W6)throw Error("Fallback data is required when using suspense in SSR.");S.current=t,N.current=r,k.current=!1;let e=w[_];if((0,o.o8)(e)||a(J(e)),(0,o.o8)(H)){let e=X(s);(0,o.o8)(W)||(e.status="fulfilled",e.value=!0),a(e)}else throw H}return{mutate:J,get data(){return I.data=!0,W},get error(){return I.error=!0,H},get isValidating(){return I.isValidating=!0,Y},get isLoading(){return I.isLoading=!0,K}}}),u=(0,o.xD)(l,e=>(t,r,n)=>(n.revalidateOnFocus=!1,n.revalidateIfStale=!1,n.revalidateOnReconnect=!1,e(t,r,n)))},76607:function(e,t,r){"use strict";r.d(t,{ZP:function(){return d}});var n=r(67294),i=r(61688),o=r(10046);let a=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),s={dedupe:!0};o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_});let l=(0,o.s6)((e,t,r)=>{let{cache:l,compare:u,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:v}=r,[y,x,b,w]=o.DY.get(l),[_,j]=(0,o.qC)(e),C=(0,n.useRef)(!1),k=(0,n.useRef)(!1),E=(0,n.useRef)(_),S=(0,n.useRef)(t),N=(0,n.useRef)(r),P=()=>N.current,L=()=>P().isVisible()&&P().isOnline(),[T,O,R,A]=(0,o.JN)(l,_),I=(0,n.useRef)({}).current,M=(0,o.o8)(d)?r.fallback[_]:d,D=(e,t)=>{for(let r in I)if("data"===r){if(!u(e[r],t[r])&&(!(0,o.o8)(e[r])||!u(W,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},F=(0,n.useMemo)(()=>{let e=!!_&&!!t&&((0,o.o8)(f)?!P().isPaused()&&!c&&(!!(0,o.o8)(p)||p):f),r=t=>{let r=(0,o.PM)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=T(),i=A(),a=r(n),s=n===i?a:r(i),l=a;return[()=>{let e=r(T());return D(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[l,_]),z=(0,i.useSyncExternalStore)((0,n.useCallback)(e=>R(_,(t,r)=>{D(r,t)||e()}),[l,_]),F[0],F[1]),B=!C.current,U=y[_]&&y[_].length>0,V=z.data,$=(0,o.o8)(V)?M:V,H=z.error,Z=(0,n.useRef)($),W=v?(0,o.o8)(V)?Z.current:V:$,q=(!U||!!(0,o.o8)(H))&&(B&&!(0,o.o8)(f)?f:!P().isPaused()&&(c?!(0,o.o8)($)&&p:(0,o.o8)($)||p)),G=!!(_&&t&&B&&q),Y=(0,o.o8)(z.isValidating)?G:z.isValidating,K=(0,o.o8)(z.isLoading)?G:z.isLoading,X=(0,n.useCallback)(async e=>{let t,n;let i=S.current;if(!_||!i||k.current||P().isPaused())return!1;let a=!0,s=e||{},l=!b[_]||!s.dedupe,c=()=>o.w6?!k.current&&_===E.current&&C.current:_===E.current,d={isValidating:!1,isLoading:!1},f=()=>{O(d)},p=()=>{let e=b[_];e&&e[1]===n&&delete b[_]},h={isValidating:!0};(0,o.o8)(T().data)&&(h.isLoading=!0);try{if(l&&(O(h),r.loadingTimeout&&(0,o.o8)(T().data)&&setTimeout(()=>{a&&c()&&P().onLoadingSlow(_,r)},r.loadingTimeout),b[_]=[i(j),(0,o.u3)()]),[t,n]=b[_],t=await t,l&&setTimeout(p,r.dedupingInterval),!b[_]||b[_][1]!==n)return l&&c()&&P().onDiscarded(_),!1;d.error=o.i_;let e=x[_];if(!(0,o.o8)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&P().onDiscarded(_),!1;let s=T().data;d.data=u(s,t)?s:t,l&&c()&&P().onSuccess(t,_,r)}catch(r){p();let e=P(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,_,e),(!0===t||(0,o.mf)(t)&&t(r))&&(!P().revalidateOnFocus||!P().revalidateOnReconnect||L())&&e.onErrorRetry(r,_,e,e=>{let t=y[_];t&&t[0]&&t[0](o.sj.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,f(),!0},[_,l]),J=(0,n.useCallback)((...e)=>(0,o.BN)(l,E.current,...e),[]);if((0,o.LI)(()=>{S.current=t,N.current=r,(0,o.o8)(V)||(Z.current=V)}),(0,o.LI)(()=>{if(!_)return;let e=X.bind(o.i_,s),t=0,r=(0,o.ko)(_,y,(r,n={})=>{if(r==o.sj.FOCUS_EVENT){let r=Date.now();P().revalidateOnFocus&&r>t&&L()&&(t=r+P().focusThrottleInterval,e())}else if(r==o.sj.RECONNECT_EVENT)P().revalidateOnReconnect&&L()&&e();else if(r==o.sj.MUTATE_EVENT)return X();else if(r==o.sj.ERROR_REVALIDATE_EVENT)return X(n)});return k.current=!1,E.current=_,C.current=!0,O({_k:j}),q&&((0,o.o8)($)||o.W6?e():(0,o.kw)(e)),()=>{k.current=!0,r()}},[_]),(0,o.LI)(()=>{let e;function t(){let t=(0,o.mf)(h)?h(T().data):h;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!T().error&&(m||P().isVisible())&&(g||P().isOnline())?X(s).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,g,_]),(0,n.useDebugValue)(W),c&&(0,o.o8)($)&&_){if(!o.w6&&o.W6)throw Error("Fallback data is required when using suspense in SSR.");S.current=t,N.current=r,k.current=!1;let e=w[_];if((0,o.o8)(e)||a(J(e)),(0,o.o8)(H)){let e=X(s);(0,o.o8)(W)||(e.status="fulfilled",e.value=!0),a(e)}else throw H}return{mutate:J,get data(){return I.data=!0,W},get error(){return I.error=!0,H},get isValidating(){return I.isValidating=!0,Y},get isLoading(){return I.isLoading=!0,K}}}),u=e=>(0,o.qC)(e?e(0,null):null)[0],c=Promise.resolve(),d=(0,o.xD)(l,e=>(t,r,a)=>{let s;let l=(0,n.useRef)(!1),{cache:d,initialSize:f=1,revalidateAll:p=!1,persistSize:h=!1,revalidateFirstPage:m=!0,revalidateOnMount:g=!1,parallel:v=!1}=a,[,,,y]=o.DY.get(o.Fs);try{(s=u(t))&&(s=o.UG+s)}catch(e){}let[x,b,w]=(0,o.JN)(d,s),_=(0,n.useCallback)(()=>(0,o.o8)(x()._l)?f:x()._l,[d,s,f]);(0,i.useSyncExternalStore)((0,n.useCallback)(e=>s?w(s,()=>{e()}):()=>{},[d,s]),_,_);let j=(0,n.useCallback)(()=>{let e=x()._l;return(0,o.o8)(e)?f:e},[s,f]),C=(0,n.useRef)(j());(0,o.LI)(()=>{if(!l.current){l.current=!0;return}s&&b({_l:h?C.current:j()})},[s,d]);let k=g&&!l.current,E=e(s,async e=>{let n=x()._i,i=x()._r;b({_r:o.i_});let s=[],l=j(),[u]=(0,o.JN)(d,e),c=u().data,f=[],h=null;for(let e=0;e<l;++e){let[l,u]=(0,o.qC)(t(e,v?null:h));if(!l)break;let[g,x]=(0,o.JN)(d,l),b=g().data,w=p||n||(0,o.o8)(b)||m&&!e&&!(0,o.o8)(c)||k||c&&!(0,o.o8)(c[e])&&!a.compare(c[e],b);if(r&&("function"==typeof i?i(b,u):w)){let t=async()=>{if(l in y){let e=y[l];delete y[l],b=await e}else b=await r(u);x({data:b,_k:u}),s[e]=b};v?f.push(t):await t()}else s[e]=b;v||(h=b)}return v&&await Promise.all(f.map(e=>e())),b({_i:o.i_}),s},a),S=(0,n.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},n=!1!==r.revalidate;return s?(n&&((0,o.o8)(e)?b({_i:!0,_r:r.revalidate}):b({_i:!1,_r:r.revalidate})),arguments.length?E.mutate(e,{...r,revalidate:n}):E.mutate()):c},[s,d]),N=(0,n.useCallback)(e=>{let r;if(!s)return c;let[,n]=(0,o.JN)(d,s);if((0,o.mf)(e)?r=e(j()):"number"==typeof e&&(r=e),"number"!=typeof r)return c;n({_l:r}),C.current=r;let i=[],[a]=(0,o.JN)(d,s),l=null;for(let e=0;e<r;++e){let[r]=(0,o.qC)(t(e,l)),[n]=(0,o.JN)(d,r),s=r?n().data:o.i_;if((0,o.o8)(s))return S(a().data);i.push(s),l=s}return S(i)},[s,d,S,j]);return{size:j(),setSize:N,mutate:S,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}})},75362:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(67294),i=r(61688),o=r(10046);let a=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),s={dedupe:!0};o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_});let l=(0,o.s6)((e,t,r)=>{let{cache:l,compare:u,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:v}=r,[y,x,b,w]=o.DY.get(l),[_,j]=(0,o.qC)(e),C=(0,n.useRef)(!1),k=(0,n.useRef)(!1),E=(0,n.useRef)(_),S=(0,n.useRef)(t),N=(0,n.useRef)(r),P=()=>N.current,L=()=>P().isVisible()&&P().isOnline(),[T,O,R,A]=(0,o.JN)(l,_),I=(0,n.useRef)({}).current,M=(0,o.o8)(d)?r.fallback[_]:d,D=(e,t)=>{for(let r in I)if("data"===r){if(!u(e[r],t[r])&&(!(0,o.o8)(e[r])||!u(W,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},F=(0,n.useMemo)(()=>{let e=!!_&&!!t&&((0,o.o8)(f)?!P().isPaused()&&!c&&(!!(0,o.o8)(p)||p):f),r=t=>{let r=(0,o.PM)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=T(),i=A(),a=r(n),s=n===i?a:r(i),l=a;return[()=>{let e=r(T());return D(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]},[l,_]),z=(0,i.useSyncExternalStore)((0,n.useCallback)(e=>R(_,(t,r)=>{D(r,t)||e()}),[l,_]),F[0],F[1]),B=!C.current,U=y[_]&&y[_].length>0,V=z.data,$=(0,o.o8)(V)?M:V,H=z.error,Z=(0,n.useRef)($),W=v?(0,o.o8)(V)?Z.current:V:$,q=(!U||!!(0,o.o8)(H))&&(B&&!(0,o.o8)(f)?f:!P().isPaused()&&(c?!(0,o.o8)($)&&p:(0,o.o8)($)||p)),G=!!(_&&t&&B&&q),Y=(0,o.o8)(z.isValidating)?G:z.isValidating,K=(0,o.o8)(z.isLoading)?G:z.isLoading,X=(0,n.useCallback)(async e=>{let t,n;let i=S.current;if(!_||!i||k.current||P().isPaused())return!1;let a=!0,s=e||{},l=!b[_]||!s.dedupe,c=()=>o.w6?!k.current&&_===E.current&&C.current:_===E.current,d={isValidating:!1,isLoading:!1},f=()=>{O(d)},p=()=>{let e=b[_];e&&e[1]===n&&delete b[_]},h={isValidating:!0};(0,o.o8)(T().data)&&(h.isLoading=!0);try{if(l&&(O(h),r.loadingTimeout&&(0,o.o8)(T().data)&&setTimeout(()=>{a&&c()&&P().onLoadingSlow(_,r)},r.loadingTimeout),b[_]=[i(j),(0,o.u3)()]),[t,n]=b[_],t=await t,l&&setTimeout(p,r.dedupingInterval),!b[_]||b[_][1]!==n)return l&&c()&&P().onDiscarded(_),!1;d.error=o.i_;let e=x[_];if(!(0,o.o8)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),l&&c()&&P().onDiscarded(_),!1;let s=T().data;d.data=u(s,t)?s:t,l&&c()&&P().onSuccess(t,_,r)}catch(r){p();let e=P(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,_,e),(!0===t||(0,o.mf)(t)&&t(r))&&(!P().revalidateOnFocus||!P().revalidateOnReconnect||L())&&e.onErrorRetry(r,_,e,e=>{let t=y[_];t&&t[0]&&t[0](o.sj.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,f(),!0},[_,l]),J=(0,n.useCallback)((...e)=>(0,o.BN)(l,E.current,...e),[]);if((0,o.LI)(()=>{S.current=t,N.current=r,(0,o.o8)(V)||(Z.current=V)}),(0,o.LI)(()=>{if(!_)return;let e=X.bind(o.i_,s),t=0,r=(0,o.ko)(_,y,(r,n={})=>{if(r==o.sj.FOCUS_EVENT){let r=Date.now();P().revalidateOnFocus&&r>t&&L()&&(t=r+P().focusThrottleInterval,e())}else if(r==o.sj.RECONNECT_EVENT)P().revalidateOnReconnect&&L()&&e();else if(r==o.sj.MUTATE_EVENT)return X();else if(r==o.sj.ERROR_REVALIDATE_EVENT)return X(n)});return k.current=!1,E.current=_,C.current=!0,O({_k:j}),q&&((0,o.o8)($)||o.W6?e():(0,o.kw)(e)),()=>{k.current=!0,r()}},[_]),(0,o.LI)(()=>{let e;function t(){let t=(0,o.mf)(h)?h(T().data):h;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!T().error&&(m||P().isVisible())&&(g||P().isOnline())?X(s).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,g,_]),(0,n.useDebugValue)(W),c&&(0,o.o8)($)&&_){if(!o.w6&&o.W6)throw Error("Fallback data is required when using suspense in SSR.");S.current=t,N.current=r,k.current=!1;let e=w[_];if((0,o.o8)(e)||a(J(e)),(0,o.o8)(H)){let e=X(s);(0,o.o8)(W)||(e.status="fulfilled",e.value=!0),a(e)}else throw H}return{mutate:J,get data(){return I.data=!0,W},get error(){return I.error=!0,H},get isValidating(){return I.isValidating=!0,Y},get isLoading(){return I.isLoading=!0,K}}}),u=o.w6?e=>{e()}:n.startTransition,c=e=>{let[,t]=(0,n.useState)({}),r=(0,n.useRef)(!1),i=(0,n.useRef)(e),a=(0,n.useRef)({data:!1,error:!1,isValidating:!1}),s=(0,n.useCallback)(e=>{let n=!1,o=i.current;for(let t in e)o[t]!==e[t]&&(o[t]=e[t],a.current[t]&&(n=!0));n&&!r.current&&t({})},[]);return(0,o.LI)(()=>(r.current=!1,()=>{r.current=!0})),[i,a.current,s]},d=(0,o.xD)(l,()=>(e,t,r={})=>{let{mutate:i}=(0,o.kY)(),a=(0,n.useRef)(e),s=(0,n.useRef)(t),l=(0,n.useRef)(r),d=(0,n.useRef)(0),[f,p,h]=c({data:o.i_,error:o.i_,isMutating:!1}),m=f.current,g=(0,n.useCallback)(async(e,t)=>{let[r,n]=(0,o.qC)(a.current);if(!s.current)throw Error("Can’t trigger the mutation: missing fetcher.");if(!r)throw Error("Can’t trigger the mutation: missing key.");let c=(0,o.PM)((0,o.PM)({populateCache:!1,throwOnError:!0},l.current),t),f=(0,o.u3)();d.current=f,h({isMutating:!0});try{let t=await i(r,s.current(n,{arg:e}),(0,o.PM)(c,{throwOnError:!0}));return d.current<=f&&(u(()=>h({data:t,isMutating:!1,error:void 0})),null==c.onSuccess||c.onSuccess.call(c,t,r,c)),t}catch(e){if(d.current<=f&&(u(()=>h({error:e,isMutating:!1})),null==c.onError||c.onError.call(c,e,r,c),c.throwOnError))throw e}},[]),v=(0,n.useCallback)(()=>{d.current=(0,o.u3)(),h({data:o.i_,error:o.i_,isMutating:!1})},[]);return(0,o.LI)(()=>{a.current=e,s.current=t,l.current=r}),{trigger:g,reset:v,get data(){return p.data=!0,m.data},get error(){return p.error=!0,m.error},get isMutating(){return p.isMutating=!0,m.isMutating}}})},97582:function(e,t,r){"use strict";r.d(t,{ZT:function(){return i},_T:function(){return a},ev:function(){return s},pi:function(){return o}});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function s(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError},1604:function(e,t,r){"use strict";let n;r.d(t,{z:function(){return ts}}),(e7=tt||(tt={})).assertEqual=e=>e,e7.assertIs=function(e){},e7.assertNever=function(e){throw Error()},e7.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e7.getValidEnumValues=e=>{let t=e7.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let n of t)r[n]=e[n];return e7.objectValues(r)},e7.objectValues=e=>e7.objectKeys(e).map(function(t){return e[t]}),e7.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e7.find=(e,t)=>{for(let r of e)if(t(r))return r},e7.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e7.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e7.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(tr||(tr={})).mergeShapes=(e,t)=>({...e,...t});let i=tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),o=e=>{switch(typeof e){case"undefined":return i.undefined;case"string":return i.string;case"number":return isNaN(e)?i.nan:i.number;case"boolean":return i.boolean;case"function":return i.function;case"bigint":return i.bigint;case"symbol":return i.symbol;case"object":if(Array.isArray(e))return i.array;if(null===e)return i.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return i.promise;if("undefined"!=typeof Map&&e instanceof Map)return i.map;if("undefined"!=typeof Set&&e instanceof Set)return i.set;if("undefined"!=typeof Date&&e instanceof Date)return i.date;return i.object;default:return i.unknown}},a=tt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class s extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof s))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,tt.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}s.create=e=>new s(e);let l=(e,t)=>{let r;switch(e.code){case a.invalid_type:r=e.received===i.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case a.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,tt.jsonStringifyReplacer)}`;break;case a.unrecognized_keys:r=`Unrecognized key(s) in object: ${tt.joinValues(e.keys,", ")}`;break;case a.invalid_union:r="Invalid input";break;case a.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${tt.joinValues(e.options)}`;break;case a.invalid_enum_value:r=`Invalid enum value. Expected ${tt.joinValues(e.options)}, received '${e.received}'`;break;case a.invalid_arguments:r="Invalid function arguments";break;case a.invalid_return_type:r="Invalid function return type";break;case a.invalid_date:r="Invalid date";break;case a.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:tt.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case a.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case a.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case a.custom:r="Invalid input";break;case a.invalid_intersection_types:r="Intersection results could not be merged";break;case a.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case a.not_finite:r="Number must be finite";break;default:r=t.defaultError,tt.assertNever(e)}return{message:r}},u=l;function c(){return u}let d=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};if(void 0!==i.message)return{...i,path:o,message:i.message};let s="";for(let e of n.filter(e=>!!e).slice().reverse())s=e(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}};function f(e,t){let r=c(),n=d({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===l?void 0:l].filter(e=>!!e)});e.common.issues.push(n)}class p{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return h;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return p.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return h;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let h=Object.freeze({status:"aborted"}),m=e=>({status:"dirty",value:e}),g=e=>({status:"valid",value:e}),v=e=>"aborted"===e.status,y=e=>"dirty"===e.status,x=e=>"valid"===e.status,b=e=>"undefined"!=typeof Promise&&e instanceof Promise;function w(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function _(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}"function"==typeof SuppressedError&&SuppressedError,(e9=tn||(tn={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},e9.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class j{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let C=(e,t)=>{if(x(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new s(e.common.issues);return this._error=t,this._error}}};function k(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var o,a;let{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:i.defaultError}:void 0===i.data?{message:null!==(o=null!=s?s:n)&&void 0!==o?o:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(a=null!=s?s:r)&&void 0!==a?a:i.defaultError}},description:i}}class E{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return o(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new p,ctx:{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(b(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)},i=this._parseSync({data:e,path:n.path,parent:n});return C(n,i)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)},n=this._parse({data:e,path:r.path,parent:r});return C(r,await (b(n)?n:Promise.resolve(n)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{let i=e(t),o=()=>n.addIssue({code:a.custom,...r(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(o(),!1)):!!i||(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new eg({schema:this,typeName:ta.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ev.create(this,this._def)}nullable(){return ey.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Q.create(this,this._def)}promise(){return em.create(this,this._def)}or(e){return et.create([this,e],this._def)}and(e){return ei.create(this,e,this._def)}transform(e){return new eg({...k(this._def),schema:this,typeName:ta.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new ex({...k(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:ta.ZodDefault})}brand(){return new ej({typeName:ta.ZodBranded,type:this,...k(this._def)})}catch(e){return new eb({...k(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:ta.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eC.create(this,e)}readonly(){return ek.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let S=/^c[^\s-]{8,}$/i,N=/^[0-9a-z]+$/,P=/^[0-9A-HJKMNP-TV-Z]{26}$/,L=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,T=/^[a-z0-9_-]{21}$/i,O=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,R=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,A=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,I=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,M=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,D="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",F=RegExp(`^${D}$`);function z(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function B(e){let t=`${D}T${z(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}class U extends E{_parse(e){var t,r;let o;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==i.string){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.string,received:t.parsedType}),h}let s=new p;for(let i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(f(o=this._getOrReturnCtx(e,o),{code:a.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if("max"===i.kind)e.data.length>i.value&&(f(o=this._getOrReturnCtx(e,o),{code:a.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if("length"===i.kind){let t=e.data.length>i.value,r=e.data.length<i.value;(t||r)&&(o=this._getOrReturnCtx(e,o),t?f(o,{code:a.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):r&&f(o,{code:a.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),s.dirty())}else if("email"===i.kind)R.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"email",code:a.invalid_string,message:i.message}),s.dirty());else if("emoji"===i.kind)n||(n=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),n.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"emoji",code:a.invalid_string,message:i.message}),s.dirty());else if("uuid"===i.kind)L.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"uuid",code:a.invalid_string,message:i.message}),s.dirty());else if("nanoid"===i.kind)T.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"nanoid",code:a.invalid_string,message:i.message}),s.dirty());else if("cuid"===i.kind)S.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"cuid",code:a.invalid_string,message:i.message}),s.dirty());else if("cuid2"===i.kind)N.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"cuid2",code:a.invalid_string,message:i.message}),s.dirty());else if("ulid"===i.kind)P.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"ulid",code:a.invalid_string,message:i.message}),s.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(t){f(o=this._getOrReturnCtx(e,o),{validation:"url",code:a.invalid_string,message:i.message}),s.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"regex",code:a.invalid_string,message:i.message}),s.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(f(o=this._getOrReturnCtx(e,o),{code:a.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),s.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(f(o=this._getOrReturnCtx(e,o),{code:a.invalid_string,validation:{startsWith:i.value},message:i.message}),s.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(f(o=this._getOrReturnCtx(e,o),{code:a.invalid_string,validation:{endsWith:i.value},message:i.message}),s.dirty()):"datetime"===i.kind?B(i).test(e.data)||(f(o=this._getOrReturnCtx(e,o),{code:a.invalid_string,validation:"datetime",message:i.message}),s.dirty()):"date"===i.kind?F.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{code:a.invalid_string,validation:"date",message:i.message}),s.dirty()):"time"===i.kind?RegExp(`^${z(i)}$`).test(e.data)||(f(o=this._getOrReturnCtx(e,o),{code:a.invalid_string,validation:"time",message:i.message}),s.dirty()):"duration"===i.kind?O.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"duration",code:a.invalid_string,message:i.message}),s.dirty()):"ip"===i.kind?(t=e.data,("v4"===(r=i.version)||!r)&&A.test(t)||("v6"===r||!r)&&I.test(t)||(f(o=this._getOrReturnCtx(e,o),{validation:"ip",code:a.invalid_string,message:i.message}),s.dirty())):"base64"===i.kind?M.test(e.data)||(f(o=this._getOrReturnCtx(e,o),{validation:"base64",code:a.invalid_string,message:i.message}),s.dirty()):tt.assertNever(i);return{status:s.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:a.invalid_string,...tn.errToObj(r)})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...tn.errToObj(e)})}url(e){return this._addCheck({kind:"url",...tn.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...tn.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...tn.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...tn.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...tn.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...tn.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...tn.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...tn.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...tn.errToObj(e)})}datetime(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&r,...tn.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...tn.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...tn.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...tn.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...tn.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...tn.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...tn.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...tn.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...tn.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...tn.errToObj(t)})}nonempty(e){return this.min(1,tn.errToObj(e))}trim(){return new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}U.create=e=>{var t;return new U({checks:[],typeName:ta.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...k(e)})};class V extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==i.number){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.number,received:t.parsedType}),h}let r=new p;for(let n of this._def.checks)"int"===n.kind?tt.isInteger(e.data)||(f(t=this._getOrReturnCtx(e,t),{code:a.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:a.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:a.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:a.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(f(t=this._getOrReturnCtx(e,t),{code:a.not_finite,message:n.message}),r.dirty()):tt.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,tn.toString(t))}gt(e,t){return this.setLimit("min",e,!1,tn.toString(t))}lte(e,t){return this.setLimit("max",e,!0,tn.toString(t))}lt(e,t){return this.setLimit("max",e,!1,tn.toString(t))}setLimit(e,t,r,n){return new V({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:tn.toString(n)}]})}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:tn.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:tn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:tn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:tn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:tn.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:tn.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:tn.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:tn.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:tn.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&tt.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}V.create=e=>new V({checks:[],typeName:ta.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...k(e)});class $ extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==i.bigint){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.bigint,received:t.parsedType}),h}let r=new p;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:a.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:a.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(f(t=this._getOrReturnCtx(e,t),{code:a.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):tt.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,tn.toString(t))}gt(e,t){return this.setLimit("min",e,!1,tn.toString(t))}lte(e,t){return this.setLimit("max",e,!0,tn.toString(t))}lt(e,t){return this.setLimit("max",e,!1,tn.toString(t))}setLimit(e,t,r,n){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:tn.toString(n)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:tn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:tn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:tn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:tn.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:tn.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}$.create=e=>{var t;return new $({checks:[],typeName:ta.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...k(e)})};class H extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==i.boolean){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.boolean,received:t.parsedType}),h}return g(e.data)}}H.create=e=>new H({typeName:ta.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...k(e)});class Z extends E{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==i.date){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.date,received:t.parsedType}),h}if(isNaN(e.data.getTime()))return f(this._getOrReturnCtx(e),{code:a.invalid_date}),h;let r=new p;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(f(t=this._getOrReturnCtx(e,t),{code:a.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(f(t=this._getOrReturnCtx(e,t),{code:a.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):tt.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:tn.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:tn.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Z.create=e=>new Z({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ta.ZodDate,...k(e)});class W extends E{_parse(e){if(this._getType(e)!==i.symbol){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.symbol,received:t.parsedType}),h}return g(e.data)}}W.create=e=>new W({typeName:ta.ZodSymbol,...k(e)});class q extends E{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.undefined,received:t.parsedType}),h}return g(e.data)}}q.create=e=>new q({typeName:ta.ZodUndefined,...k(e)});class G extends E{_parse(e){if(this._getType(e)!==i.null){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.null,received:t.parsedType}),h}return g(e.data)}}G.create=e=>new G({typeName:ta.ZodNull,...k(e)});class Y extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return g(e.data)}}Y.create=e=>new Y({typeName:ta.ZodAny,...k(e)});class K extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return g(e.data)}}K.create=e=>new K({typeName:ta.ZodUnknown,...k(e)});class X extends E{_parse(e){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.never,received:t.parsedType}),h}}X.create=e=>new X({typeName:ta.ZodNever,...k(e)});class J extends E{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.void,received:t.parsedType}),h}return g(e.data)}}J.create=e=>new J({typeName:ta.ZodVoid,...k(e)});class Q extends E{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==i.array)return f(t,{code:a.invalid_type,expected:i.array,received:t.parsedType}),h;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(f(t,{code:e?a.too_big:a.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(f(t,{code:a.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(f(t,{code:a.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new j(t,e,t.path,r)))).then(e=>p.mergeArray(r,e));let o=[...t.data].map((e,r)=>n.type._parseSync(new j(t,e,t.path,r)));return p.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new Q({...this._def,minLength:{value:e,message:tn.toString(t)}})}max(e,t){return new Q({...this._def,maxLength:{value:e,message:tn.toString(t)}})}length(e,t){return new Q({...this._def,exactLength:{value:e,message:tn.toString(t)}})}nonempty(e){return this.min(1,e)}}Q.create=(e,t)=>new Q({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ta.ZodArray,...k(t)});class ee extends E{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=tt.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==i.object){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.object,received:t.parsedType}),h}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof X&&"strip"===this._def.unknownKeys))for(let e in r.data)o.includes(e)||s.push(e);let l=[];for(let e of o){let t=n[e],i=r.data[e];l.push({key:{status:"valid",value:e},value:t._parse(new j(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof X){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of s)l.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)s.length>0&&(f(r,{code:a.unrecognized_keys,keys:s}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of s){let n=r.data[t];l.push({key:{status:"valid",value:t},value:e._parse(new j(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of l){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>p.mergeObjectSync(t,e)):p.mergeObjectSync(t,l)}get shape(){return this._def.shape()}strict(e){return tn.errToObj,new ee({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,i,o,a;let s=null!==(o=null===(i=(n=this._def).errorMap)||void 0===i?void 0:i.call(n,t,r).message)&&void 0!==o?o:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=tn.errToObj(e).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new ee({...this._def,unknownKeys:"strip"})}passthrough(){return new ee({...this._def,unknownKeys:"passthrough"})}extend(e){return new ee({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ee({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ta.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ee({...this._def,catchall:e})}pick(e){let t={};return tt.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new ee({...this._def,shape:()=>t})}omit(e){let t={};return tt.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new ee({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ee){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=ev.create(e(i))}return new ee({...t._def,shape:()=>r})}return t instanceof Q?new Q({...t._def,type:e(t.element)}):t instanceof ev?ev.create(e(t.unwrap())):t instanceof ey?ey.create(e(t.unwrap())):t instanceof eo?eo.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return tt.objectKeys(this.shape).forEach(r=>{let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}),new ee({...this._def,shape:()=>t})}required(e){let t={};return tt.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ev;)e=e._def.innerType;t[r]=e}}),new ee({...this._def,shape:()=>t})}keyof(){return ef(tt.objectKeys(this.shape))}}ee.create=(e,t)=>new ee({shape:()=>e,unknownKeys:"strip",catchall:X.create(),typeName:ta.ZodObject,...k(t)}),ee.strictCreate=(e,t)=>new ee({shape:()=>e,unknownKeys:"strict",catchall:X.create(),typeName:ta.ZodObject,...k(t)}),ee.lazycreate=(e,t)=>new ee({shape:e,unknownKeys:"strip",catchall:X.create(),typeName:ta.ZodObject,...k(t)});class et extends E{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new s(e.ctx.common.issues));return f(t,{code:a.invalid_union,unionErrors:r}),h});{let e;let n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new s(e));return f(t,{code:a.invalid_union,unionErrors:i}),h}}get options(){return this._def.options}}et.create=(e,t)=>new et({options:e,typeName:ta.ZodUnion,...k(t)});let er=e=>{if(e instanceof ec)return er(e.schema);if(e instanceof eg)return er(e.innerType());if(e instanceof ed)return[e.value];if(e instanceof ep)return e.options;if(e instanceof eh)return tt.objectValues(e.enum);if(e instanceof ex)return er(e._def.innerType);if(e instanceof q)return[void 0];else if(e instanceof G)return[null];else if(e instanceof ev)return[void 0,...er(e.unwrap())];else if(e instanceof ey)return[null,...er(e.unwrap())];else if(e instanceof ej)return er(e.unwrap());else if(e instanceof ek)return er(e.unwrap());else if(e instanceof eb)return er(e._def.innerType);else return[]};class en extends E{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.object)return f(t,{code:a.invalid_type,expected:i.object,received:t.parsedType}),h;let r=this.discriminator,n=t.data[r],o=this.optionsMap.get(n);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(f(t,{code:a.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),h)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=er(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new en({typeName:ta.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...k(r)})}}class ei extends E{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(v(e)||v(n))return h;let s=function e(t,r){let n=o(t),a=o(r);if(t===r)return{valid:!0,data:t};if(n===i.object&&a===i.object){let n=tt.objectKeys(r),i=tt.objectKeys(t).filter(e=>-1!==n.indexOf(e)),o={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};o[n]=i.data}return{valid:!0,data:o}}if(n===i.array&&a===i.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===i.date&&a===i.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}(e.value,n.value);return s.valid?((y(e)||y(n))&&t.dirty(),{status:t.value,value:s.data}):(f(r,{code:a.invalid_intersection_types}),h)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ei.create=(e,t,r)=>new ei({left:e,right:t,typeName:ta.ZodIntersection,...k(r)});class eo extends E{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.array)return f(r,{code:a.invalid_type,expected:i.array,received:r.parsedType}),h;if(r.data.length<this._def.items.length)return f(r,{code:a.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),h;!this._def.rest&&r.data.length>this._def.items.length&&(f(r,{code:a.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new j(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>p.mergeArray(t,e)):p.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new eo({...this._def,rest:e})}}eo.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eo({items:e,typeName:ta.ZodTuple,rest:null,...k(t)})};class ea extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.object)return f(r,{code:a.invalid_type,expected:i.object,received:r.parsedType}),h;let n=[],o=this._def.keyType,s=this._def.valueType;for(let e in r.data)n.push({key:o._parse(new j(r,e,r.path,e)),value:s._parse(new j(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?p.mergeObjectAsync(t,n):p.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new ea(t instanceof E?{keyType:e,valueType:t,typeName:ta.ZodRecord,...k(r)}:{keyType:U.create(),valueType:e,typeName:ta.ZodRecord,...k(t)})}}class es extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.map)return f(r,{code:a.invalid_type,expected:i.map,received:r.parsedType}),h;let n=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([e,t],i)=>({key:n._parse(new j(r,e,r.path,[i,"key"])),value:o._parse(new j(r,t,r.path,[i,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of s){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return h;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of s){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return h;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}es.create=(e,t,r)=>new es({valueType:t,keyType:e,typeName:ta.ZodMap,...k(r)});class el extends E{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.set)return f(r,{code:a.invalid_type,expected:i.set,received:r.parsedType}),h;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(f(r,{code:a.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(f(r,{code:a.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let o=this._def.valueType;function s(e){let r=new Set;for(let n of e){if("aborted"===n.status)return h;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let l=[...r.data.values()].map((e,t)=>o._parse(new j(r,e,r.path,t)));return r.common.async?Promise.all(l).then(e=>s(e)):s(l)}min(e,t){return new el({...this._def,minSize:{value:e,message:tn.toString(t)}})}max(e,t){return new el({...this._def,maxSize:{value:e,message:tn.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}el.create=(e,t)=>new el({valueType:e,minSize:null,maxSize:null,typeName:ta.ZodSet,...k(t)});class eu extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.function)return f(t,{code:a.invalid_type,expected:i.function,received:t.parsedType}),h;function r(e,r){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,c(),l].filter(e=>!!e),issueData:{code:a.invalid_arguments,argumentsError:r}})}function n(e,r){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,c(),l].filter(e=>!!e),issueData:{code:a.invalid_return_type,returnTypeError:r}})}let o={errorMap:t.common.contextualErrorMap},u=t.data;if(this._def.returns instanceof em){let e=this;return g(async function(...t){let i=new s([]),a=await e._def.args.parseAsync(t,o).catch(e=>{throw i.addIssue(r(t,e)),i}),l=await Reflect.apply(u,this,a);return await e._def.returns._def.type.parseAsync(l,o).catch(e=>{throw i.addIssue(n(l,e)),i})})}{let e=this;return g(function(...t){let i=e._def.args.safeParse(t,o);if(!i.success)throw new s([r(t,i.error)]);let a=Reflect.apply(u,this,i.data),l=e._def.returns.safeParse(a,o);if(!l.success)throw new s([n(a,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eu({...this._def,args:eo.create(e).rest(K.create())})}returns(e){return new eu({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eu({args:e||eo.create([]).rest(K.create()),returns:t||K.create(),typeName:ta.ZodFunction,...k(r)})}}class ec extends E{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ec.create=(e,t)=>new ec({getter:e,typeName:ta.ZodLazy,...k(t)});class ed extends E{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return f(t,{received:t.data,code:a.invalid_literal,expected:this._def.value}),h}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ef(e,t){return new ep({values:e,typeName:ta.ZodEnum,...k(t)})}ed.create=(e,t)=>new ed({value:e,typeName:ta.ZodLiteral,...k(t)});class ep extends E{constructor(){super(...arguments),ti.set(this,void 0)}_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return f(t,{expected:tt.joinValues(r),received:t.parsedType,code:a.invalid_type}),h}if(w(this,ti,"f")||_(this,ti,new Set(this._def.values),"f"),!w(this,ti,"f").has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return f(t,{received:t.data,code:a.invalid_enum_value,options:r}),h}return g(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ep.create(e,{...this._def,...t})}exclude(e,t=this._def){return ep.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ti=new WeakMap,ep.create=ef;class eh extends E{constructor(){super(...arguments),to.set(this,void 0)}_parse(e){let t=tt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==i.string&&r.parsedType!==i.number){let e=tt.objectValues(t);return f(r,{expected:tt.joinValues(e),received:r.parsedType,code:a.invalid_type}),h}if(w(this,to,"f")||_(this,to,new Set(tt.getValidEnumValues(this._def.values)),"f"),!w(this,to,"f").has(e.data)){let e=tt.objectValues(t);return f(r,{received:r.data,code:a.invalid_enum_value,options:e}),h}return g(e.data)}get enum(){return this._def.values}}to=new WeakMap,eh.create=(e,t)=>new eh({values:e,typeName:ta.ZodNativeEnum,...k(t)});class em extends E{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==i.promise&&!1===t.common.async?(f(t,{code:a.invalid_type,expected:i.promise,received:t.parsedType}),h):g((t.parsedType===i.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}em.create=(e,t)=>new em({type:e,typeName:ta.ZodPromise,...k(t)});class eg extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ta.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{f(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return h;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?h:"dirty"===n.status||"dirty"===t.value?m(n.value):n});{if("aborted"===t.value)return h;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?h:"dirty"===n.status||"dirty"===t.value?m(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?h:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?h:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type){if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>x(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!x(e))return e;let o=n.transform(e.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}}tt.assertNever(n)}}eg.create=(e,t,r)=>new eg({schema:e,typeName:ta.ZodEffects,effect:t,...k(r)}),eg.createWithPreprocess=(e,t,r)=>new eg({schema:t,effect:{type:"preprocess",transform:e},typeName:ta.ZodEffects,...k(r)});class ev extends E{_parse(e){return this._getType(e)===i.undefined?g(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:ta.ZodOptional,...k(t)});class ey extends E{_parse(e){return this._getType(e)===i.null?g(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ey.create=(e,t)=>new ey({innerType:e,typeName:ta.ZodNullable,...k(t)});class ex extends E{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===i.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ex.create=(e,t)=>new ex({innerType:e,typeName:ta.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...k(t)});class eb extends E{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return b(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new s(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new s(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eb.create=(e,t)=>new eb({innerType:e,typeName:ta.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...k(t)});class ew extends E{_parse(e){if(this._getType(e)!==i.nan){let t=this._getOrReturnCtx(e);return f(t,{code:a.invalid_type,expected:i.nan,received:t.parsedType}),h}return{status:"valid",value:e.data}}}ew.create=e=>new ew({typeName:ta.ZodNaN,...k(e)});let e_=Symbol("zod_brand");class ej extends E{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eC extends E{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),m(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eC({in:e,out:t,typeName:ta.ZodPipeline})}}class ek extends E{_parse(e){let t=this._def.innerType._parse(e),r=e=>(x(e)&&(e.value=Object.freeze(e.value)),e);return b(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function eE(e,t={},r){return e?Y.create().superRefine((n,i)=>{var o,a;if(!e(n)){let e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,s=null===(a=null!==(o=e.fatal)&&void 0!==o?o:r)||void 0===a||a;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:s})}}):Y.create()}ek.create=(e,t)=>new ek({innerType:e,typeName:ta.ZodReadonly,...k(t)});let eS={object:ee.lazycreate};(te=ta||(ta={})).ZodString="ZodString",te.ZodNumber="ZodNumber",te.ZodNaN="ZodNaN",te.ZodBigInt="ZodBigInt",te.ZodBoolean="ZodBoolean",te.ZodDate="ZodDate",te.ZodSymbol="ZodSymbol",te.ZodUndefined="ZodUndefined",te.ZodNull="ZodNull",te.ZodAny="ZodAny",te.ZodUnknown="ZodUnknown",te.ZodNever="ZodNever",te.ZodVoid="ZodVoid",te.ZodArray="ZodArray",te.ZodObject="ZodObject",te.ZodUnion="ZodUnion",te.ZodDiscriminatedUnion="ZodDiscriminatedUnion",te.ZodIntersection="ZodIntersection",te.ZodTuple="ZodTuple",te.ZodRecord="ZodRecord",te.ZodMap="ZodMap",te.ZodSet="ZodSet",te.ZodFunction="ZodFunction",te.ZodLazy="ZodLazy",te.ZodLiteral="ZodLiteral",te.ZodEnum="ZodEnum",te.ZodEffects="ZodEffects",te.ZodNativeEnum="ZodNativeEnum",te.ZodOptional="ZodOptional",te.ZodNullable="ZodNullable",te.ZodDefault="ZodDefault",te.ZodCatch="ZodCatch",te.ZodPromise="ZodPromise",te.ZodBranded="ZodBranded",te.ZodPipeline="ZodPipeline",te.ZodReadonly="ZodReadonly";let eN=U.create,eP=V.create,eL=ew.create,eT=$.create,eO=H.create,eR=Z.create,eA=W.create,eI=q.create,eM=G.create,eD=Y.create,eF=K.create,ez=X.create,eB=J.create,eU=Q.create,eV=ee.create,e$=ee.strictCreate,eH=et.create,eZ=en.create,eW=ei.create,eq=eo.create,eG=ea.create,eY=es.create,eK=el.create,eX=eu.create,eJ=ec.create,eQ=ed.create,e0=ep.create,e1=eh.create,e2=em.create,e5=eg.create,e4=ev.create,e3=ey.create,e6=eg.createWithPreprocess,e8=eC.create;var e7,e9,te,tt,tr,tn,ti,to,ta,ts=Object.freeze({__proto__:null,defaultErrorMap:l,setErrorMap:function(e){u=e},getErrorMap:c,makeIssue:d,EMPTY_PATH:[],addIssueToContext:f,ParseStatus:p,INVALID:h,DIRTY:m,OK:g,isAborted:v,isDirty:y,isValid:x,isAsync:b,get util(){return tt},get objectUtil(){return tr},ZodParsedType:i,getParsedType:o,ZodType:E,datetimeRegex:B,ZodString:U,ZodNumber:V,ZodBigInt:$,ZodBoolean:H,ZodDate:Z,ZodSymbol:W,ZodUndefined:q,ZodNull:G,ZodAny:Y,ZodUnknown:K,ZodNever:X,ZodVoid:J,ZodArray:Q,ZodObject:ee,ZodUnion:et,ZodDiscriminatedUnion:en,ZodIntersection:ei,ZodTuple:eo,ZodRecord:ea,ZodMap:es,ZodSet:el,ZodFunction:eu,ZodLazy:ec,ZodLiteral:ed,ZodEnum:ep,ZodNativeEnum:eh,ZodPromise:em,ZodEffects:eg,ZodTransformer:eg,ZodOptional:ev,ZodNullable:ey,ZodDefault:ex,ZodCatch:eb,ZodNaN:ew,BRAND:e_,ZodBranded:ej,ZodPipeline:eC,ZodReadonly:ek,custom:eE,Schema:E,ZodSchema:E,late:eS,get ZodFirstPartyTypeKind(){return ta},coerce:{string:e=>U.create({...e,coerce:!0}),number:e=>V.create({...e,coerce:!0}),boolean:e=>H.create({...e,coerce:!0}),bigint:e=>$.create({...e,coerce:!0}),date:e=>Z.create({...e,coerce:!0})},any:eD,array:eU,bigint:eT,boolean:eO,date:eR,discriminatedUnion:eZ,effect:e5,enum:e0,function:eX,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>eE(t=>t instanceof e,t),intersection:eW,lazy:eJ,literal:eQ,map:eY,nan:eL,nativeEnum:e1,never:ez,null:eM,nullable:e3,number:eP,object:eV,oboolean:()=>eO().optional(),onumber:()=>eP().optional(),optional:e4,ostring:()=>eN().optional(),pipeline:e8,preprocess:e6,promise:e2,record:eG,set:eK,strictObject:e$,string:eN,symbol:eA,transformer:e5,tuple:eq,undefined:eI,union:eH,unknown:eF,void:eB,NEVER:h,ZodIssueCode:a,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:s})},64529:function(e,t,r){"use strict";r.d(t,{Ue:function(){return l}});let n=e=>{let t;let r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,o={setState:n,getState:i,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,i,o),o},i=e=>e?n(e):n;var o=r(67294);let{useSyncExternalStoreWithSelector:a}=r(28258),s=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?i(e):e,r=(e,r)=>(function(e,t=e.getState,r){let n=a(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return(0,o.useDebugValue)(n),n})(t,e,r);return Object.assign(r,t),r},l=e=>e?s(e):s},782:function(e,t,r){"use strict";r.d(t,{tJ:function(){return a}});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},i=(e,t)=>(r,i,o)=>{let a,s,l={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,d=new Set;try{a=l.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},i,o);let f=n(l.serialize),p=()=>{let e;let t=f({state:l.partialize({...i()}),version:l.version}).then(e=>a.setItem(l.name,e)).catch(t=>{e=t});if(e)throw e;return t},h=o.setState;o.setState=(e,t)=>{h(e,t),p()};let m=e((...e)=>{r(...e),p()},i,o),g=()=>{var e;if(!a)return;u=!1,c.forEach(e=>e(i()));let t=(null==(e=l.onRehydrateStorage)?void 0:e.call(l,i()))||void 0;return n(a.getItem.bind(a))(l.name).then(e=>{if(e)return l.deserialize(e)}).then(e=>{if(e){if("number"!=typeof e.version||e.version===l.version)return e.state;if(l.migrate)return l.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(s=l.merge(e,null!=(t=i())?t:m),!0),p()}).then(()=>{null==t||t(s,void 0),u=!0,d.forEach(e=>e(s))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{l={...l,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>g(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},g(),s||m},o=(e,t)=>(r,i,o)=>{let a,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e),i=null!=(r=t.getItem(e))?r:null;return i instanceof Promise?i.then(n):n(i)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r)),removeItem:e=>t.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set,d=s.storage;if(!d)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},i,o);let f=()=>{let e=s.partialize({...i()});return d.setItem(s.name,{state:e,version:s.version})},p=o.setState;o.setState=(e,t)=>{p(e,t),f()};let h=e((...e)=>{r(...e),f()},i,o),m=()=>{var e;if(!d)return;l=!1,u.forEach(e=>e(i()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,i()))||void 0;return n(d.getItem.bind(d))(s.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===s.version)return e.state;if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(a=s.merge(e,null!=(t=i())?t:h),!0),f()}).then(()=>{null==t||t(a,void 0),l=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.storage&&(d=e.storage)},clearStorage:()=>{null==d||d.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h},a=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),i(e,t)):o(e,t)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(6840),t(26036)}),_N_E=e.O()}]);