PageSourceSearch

https://openart.ai/suite/_next/static/chunks/e1b722c53bef2e41.js

js openart.ai collected 2026-09-24 08:31:05 UTC 38,970 bytes, 9 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,821048,e=>{"use strict";var t=e.i(743265),r=e.i(281664),n=e.i(478790),s=e.i(647163);function a({avatar:e,displayName:a,name:i,size:o,className:l}){let u=!!(a||i),c=a||i||"User",d=a?.slice(0,2).toUpperCase()||i?.slice(0,2).toUpperCase()||"U",p=Math.round(.4*o),[f,m]=(0,n.useState)(null),h=!!e&&f!==e;return(0,t.jsx)("span",{className:(0,s.cn)("inline-flex items-center justify-center shrink-0","rounded-full overflow-hidden bg-background-brand-solid",l),style:{width:o,height:o},children:h&&e?(0,t.jsx)(r.default,{src:e,"data-notranslate":u?"":void 0,alt:c,width:o,height:o,className:"w-full h-full object-cover",onError:()=>m(e),unoptimized:!0}):(0,t.jsx)("span",{"data-notranslate":u?"":void 0,className:"font-semibold text-text-icon-neutral-primary text-center",style:{fontSize:p},children:d})})}e.s(["UserAvatar",()=>a])},936447,e=>{"use strict";var t=e.i(743265),r=e.i(842118),n=e.i(317884),s=e.i(478790),a=e.i(561154);let i=(0,s.forwardRef)(function({href:e,onClick:i,onNavigate:o,transition:l=s.startTransition,...u},c){let d=(0,n.useRouter)(),[p,f]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{f(!0)},[]),(0,t.jsx)(r.default,{ref:c,href:p?(0,a.withProjectParams)(e):e,onClick:t=>{i?.(t),t.defaultPrevented||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||0!==t.button||"_blank"===u.target||(t.preventDefault(),l(()=>{o?.(),d.push((0,a.withProjectParams)(e))}))},...u})});e.s(["ProjectLink",0,i])},827913,e=>{"use strict";var t=e.i(743265),r=e.i(647163);let n={sm:"size-4",md:"size-5",lg:"size-6",xl:"size-8"},s={brand:"border-border-neutral-outline border-t-text-icon-brand-default",neutral:"border-[rgba(176,180,186,0.2)] border-t-text-icon-neutral-secondary"};function a({size:e="md",tone:a="brand",className:i}){return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.cn)("animate-spin rounded-full border-2",n[e],s[a],i)})}e.s(["DirectorSpinner",()=>a])},290378,e=>{"use strict";var t,r,n=e.i(427244),s=e.i(642558),a=((t={}).CreationPanel="creation_panel",t.AllToolsHover="side_nav_all_tools",t.AllToolsPanel="all_tools",t),i=((r={}).PinnedTools="side_navigation_bar",r.CreationPanelToolCards="creation_panel",r.ToolDrawer="tool_drawer",r.AllToolsHover="side_nav_all_tools",r.AllToolsPanelToolCards="all_tools",r.OpenartSuite="homepage",r);function o(e){let t=n.TOOL_RESOURCE_TYPE_MAPPING[e];if(t){if("3d_world"===t)return"world";if("image"===t||"video"===t||"audio"===t||"character"===t||"world"===t)return t}}e.s(["EnumPinSource",()=>a,"EnumUseToolSource",()=>i,"ToolActionAnalytics",0,{trackPinned(e,t){(0,s.event)("tool_engaged",{action:"pin",tool:e.replaceAll("-","_"),click_source:t,creation_mode:o(e)})},trackUnpinned(e,t){(0,s.event)("tool_engaged",{action:"unpin",tool:e.replaceAll("-","_"),click_source:t,creation_mode:o(e)})},trackUseTool(e,t){(0,s.event)("tool_engaged",{action:"use",tool:e.replaceAll("-","_"),click_source:t,creation_mode:o(e)})},trackCreationPanelNavClick(e){(0,s.event)("navigation_engaged",{navigation_name:e,click_source:"creation_panel"})}}])},410105,e=>{"use strict";e.i(362558);var t=e.i(743265),r=e.i(478790),n=e.i(222567),s=e.i(637075),a=e.i(160708),i=e.i(560387),o=e.i(250438),l=r,u=e.i(134941);function c(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class d extends l.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,o.isHTMLElement)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,r=(0,o.isHTMLElement)(e)&&e.offsetWidth||0,n=(0,o.isHTMLElement)(e)&&e.offsetHeight||0,s=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(s.height),a.width=parseFloat(s.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=r-a.width-a.left,a.bottom=n-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function p({children:e,isPresent:n,anchorX:s,anchorY:a,root:i,pop:o}){let p=(0,l.useId)(),f=(0,l.useRef)(null),m=(0,l.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=(0,l.useContext)(u.MotionConfigContext),g=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=c(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():c(e[t],null)}}}}(...e),e)}(f,e.props?.ref??e?.ref);return(0,l.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:l,right:u,bottom:c}=m.current;if(n||!1===o||!f.current||!e||!t)return;let d="left"===s?`left: ${l}`:`right: ${u}`,g="bottom"===a?`bottom: ${c}`:`top: ${r}`;f.current.dataset.motionPopId=p;let y=document.createElement("style");h&&(y.nonce=h);let C=i??document.head;return C.appendChild(y),y.sheet&&y.sheet.insertRule(`
2          [data-motion-pop-id="${p}"] {
3            position: absolute !important;
4            width: ${e}px !important;
5            height: ${t}px !important;
6            ${d}px !important;
7            ${g}px !important;
8          }
9        `),()=>{f.current?.removeAttribute("data-motion-pop-id"),C.contains(y)&&C.removeChild(y)}},[n]),(0,t.jsx)(d,{isPresent:n,childRef:f,sizeRef:m,pop:o,children:!1===o?e:l.cloneElement(e,{ref:g})})}let f=({children:e,initial:n,isPresent:a,onExitComplete:o,custom:l,presenceAffectsLayout:u,mode:c,anch
9orX:d,anchorY:f,root:h})=>{let g=(0,s.useConstant)(m),y=(0,r.useId)(),C=!0,x=(0,r.useMemo)(()=>(C=!1,{id:y,initial:n,isPresent:a,custom:l,onExitComplete:e=>{for(let t of(g.set(e,!0),g.values()))if(!t)return;o&&o()},register:e=>(g.set(e,!1),()=>g.delete(e))}),[a,g,o]);return u&&C&&(x={...x}),(0,r.useMemo)(()=>{g.forEach((e,t)=>g.set(t,!1))},[a]),r.useEffect(()=>{a||g.size||!o||o()},[a]),e=(0,t.jsx)(p,{pop:"popLayout"===c,isPresent:a,anchorX:d,anchorY:f,root:h,children:e}),(0,t.jsx)(i.PresenceContext.Provider,{value:x,children:e})};function m(){return new Map}var h=e.i(439973);let g=e=>e.key||"";function y(e){let t=[];return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&t.push(e)}),t}let C=({children:e,custom:i,initial:o=!0,onExitComplete:l,presenceAffectsLayout:u=!0,mode:c="sync",propagate:d=!1,anchorX:p="left",anchorY:m="top",root:C})=>{let[x,v]=(0,h.usePresence)(d),_=(0,r.useMemo)(()=>y(e),[e]),b=d&&!x?[]:_.map(g),k=(0,r.useRef)(!0),S=(0,r.useRef)(_),E=(0,s.useConstant)(()=>new Map),j=(0,r.useRef)(new Set),[w,P]=(0,r.useState)(_),[A,T]=(0,r.useState)(_);(0,a.useIsomorphicLayoutEffect)(()=>{k.current=!1,S.current=_;for(let e=0;e<A.length;e++){let t=g(A[e]);b.includes(t)?(E.delete(t),j.current.delete(t)):!0!==E.get(t)&&E.set(t,!1)}},[A,b.length,b.join("-")]);let I=[];if(_!==w){let e=[..._];for(let t=0;t<A.length;t++){let r=A[t],n=g(r);b.includes(n)||(e.splice(t,0,r),I.push(r))}return"wait"===c&&I.length&&(e=I),T(y(e)),P(_),null}let{forceRender:K}=(0,r.useContext)(n.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:A.map(e=>{let r=g(e),n=(!d||!!x)&&(_===A||b.includes(r));return(0,t.jsx)(f,{isPresent:n,initial:(!k.current||!!o)&&void 0,custom:i,presenceAffectsLayout:u,mode:c,root:C,onExitComplete:n?void 0:()=>{if(j.current.has(r)||!E.has(r))return;j.current.add(r),E.set(r,!0);let e=!0;E.forEach(t=>{t||(e=!1)}),e&&(K?.(),T(S.current),d&&v?.(),l&&l())},anchorX:p,anchorY:m,children:e},r)})})};e.s(["AnimatePresence",()=>C],410105)},369509,e=>{"use strict";var t=e.i(244547),r=e.i(281133);function n(){let{data:e}=(0,t.useCurrentWorkspace)(),n=e?.one_time_pack;return n&&(0,r.hasLiveOneTimePack)(e)?{expiresAtSeconds:n.expires_at,packCreditBalance:e?.one_time_pack_credit??0}:null}e.s(["useOneTimePack",()=>n])},462595,e=>{"use strict";var t=e.i(743265);function r({expiresAtSeconds:e}){let r=new Date(1e3*e).toLocaleString("en-US",{dateStyle:"long",timeStyle:"short"});return(0,t.jsxs)(t.Fragment,{children:["Your pack credits don't refill. Subscribe before the pack ends and any unused credits carry over to your subscription — otherwise they expire"," ",(0,t.jsx)("span",{"data-notranslate":!0,children:r}),"."]})}e.s(["OneTimePackCreditsNote",()=>r])},746393,929017,e=>{"use strict";function t(e,t){let r=e-t;if(!Number.isFinite(r)||r<0)return null;let n=Math.floor(r/60),s=Math.floor(n/60);return r>86400?{unit:"days",days:Math.ceil(r/86400)}:{unit:"hoursMinutes",hours:s,minutes:String(n%60).padStart(2,"0")}}e.s(["packTimeLeft",()=>t],746393);var r=e.i(743265);function n({value:e}){return"days"===e.unit?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:e.days})," days"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:e.hours}),"h : ",(0,r.jsx)("span",{children:e.minutes}),"m"]})}e.s(["PackTimeLeftText",()=>n],929017)},24278,e=>{"use strict";var t=e.i(743265),r=e.i(611049),n=e.i(790318),s=e.i(469035),a=e.i(209460),i=e.i(478790),o=e.i(647163),l=e.i(746393),u=e.i(929017),c=e.i(369509);function d(){let e=(0,c.useOneTimePack)(),r=(0,n.useOpenUpgradeDialog)(),[s,a]=(0,i.useState)(null),d=e?.expiresAtSeconds;return((0,i.useEffect)(()=>{if(void 0===d)return;let e=()=>a((0,l.packTimeLeft)(d,Math.floor(Date.now()/1e3)));e();let t=setInterval(e,6e4);return()=>clearInterval(t)},[d]),e&&null!==s)?(0,t.jsxs)("button",{type:"button",onClick:()=>r.open(),className:(0,o.cn)("flex min-w-0 cursor-pointer items-center","max-w-[112px] gap-1","md:max-w-none md:gap-1.5"),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,o.cn)("h-3 w-px shrink-0 bg-border-brand-secondary-outline","md:h-3.5")}),(0,t.jsxs)("span",{className:(0,o.cn)("truncate font-semibold tracking-tight text-text-icon-brand-secondary-default","text-[12px] leading-[16
9px]","md:text-[14px] md:leading-[20px]"),children:[(0,t.jsx)(u.PackTimeLeftText,{value:s})," left"]})]}):null}var p=e.i(450082),f=e.i(806934),m=e.i(839729),h=e.i(414507),g=e.i(41481),y=e.i(462595),C=e.i(853120),x=e.i(244547);e.i(563178);var v=e.i(474009),_=e.i(838332);let b=({href:e,children:r})=>(0,t.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-text-icon-info-default underline font-medium hover:text-text-icon-info-high-contrast",children:r}),k=({refillDate:e,billingInterval:r})=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{children:e?(0,t.jsxs)(t.Fragment,{children:["Your monthly credits will be refilled on"," ",(0,t.jsx)("span",{"data-notranslate":!0,children:e}),"month"===r?" after your subscription renews.":"."]}):"Your monthly credits refill at the end of each cycle."}),(0,t.jsx)("p",{children:(0,t.jsx)(b,{href:"/suite/help-center#credit-usage",children:"Read more"})})]}),S=({expiresAtSeconds:e})=>(0,t.jsx)("div",{className:"flex flex-col gap-1",children:(0,t.jsx)("p",{children:(0,t.jsx)(y.OneTimePackCreditsNote,{expiresAtSeconds:e})})}),E=()=>(0,t.jsx)("div",{className:"flex flex-col gap-1",children:(0,t.jsxs)("p",{children:["Trial credits allow you to use all the"," ",(0,t.jsx)(b,{href:"/pricing",children:"premium features"}),"."]})}),j=({subscriptionsPath:e})=>(0,t.jsx)("div",{className:"flex flex-col gap-1",children:(0,t.jsxs)("p",{children:["Your subscription is paused. Undo pause"," ",(0,t.jsx)(b,{href:e,children:"your subscription"})," now to unlock and use your remaining credits."]})}),w=({onClick:e})=>{let[r,n]=(0,i.useState)(!1),{data:s,isLoading:a}=(0,x.useCurrentWorkspace)(),{status:l,pausePhase:u}=(0,C.useUserCurrentPlan)(),d=(0,h.useSubscriptionsPath)(),p=(0,c.useOneTimePack)(),y=s?.subscription_active??!1,b=r&&!a&&s?(0,g.getCurrentAvailableCredits)(s)??0:0,w=(0,m.useAnimatedNumber)(b);(0,i.useEffect)(()=>{n(!0)},[]);let P="pausing"===l&&"active"===u?(0,t.jsx)(j,{subscriptionsPath:d}):p?(0,t.jsx)(S,{expiresAtSeconds:p.expiresAtSeconds}):y?(0,t.jsx)(k,{refillDate:(e=>{if(e)return new Date(1e3*e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})(s?.subscription_billing_interval==="year"?s?.yearly_subscription_next_refill_at??0:s?.subscription_end_at??0),billingInterval:s?.subscription_billing_interval??""}):(0,t.jsx)(E,{});return(0,t.jsxs)("button",{type:"button",onClick:e,className:(0,o.cn)("flex items-center",e&&"cursor-pointer","gap-1","md:gap-1.5"),children:[(0,t.jsx)(_.Token,{className:(0,o.cn)("text-text-icon-success-default","w-3.5 h-3.5","md:w-4 md:h-4")}),(0,t.jsx)("span",{className:(0,o.cn)("font-semibold text-text-icon-success-default tracking-tight tabular-nums","text-[12px] leading-[16px]","md:text-[14px] md:leading-[20px]"),children:!r||a?"0":new Intl.NumberFormat("en-US").format(w)}),r&&!a&&(0,t.jsx)("div",{className:(0,o.cn)("hidden","md:inline-flex"),children:(0,t.jsx)(f.Tooltip,{content:P,side:"bottom",align:"center",className:"text-text-icon-neutral-primary",children:(0,t.jsx)("span",{role:"img","aria-label":"Credit info",className:(0,o.cn)("inline-flex items-center justify-center","text-text-icon-success-default opacity-60 hover:opacity-100 transition-opacity"),children:(0,t.jsx)(v.IconQuestionMarkBold,{className:"w-3.5 h-3.5"})})})})]})};e.s(["CreditUpgradePill",0,({onUpgradeClick:e,onCreditClick:i,className:l,showUpgrade:u=!0})=>{let c=(0,r.useOpenCreditsDetailsDialog)(),f=(0,s.useTeamEntitlement)("spend_cap")?c.openFromNav:i;return u?(0,t.jsxs)("div",{className:(0,o.cn)("flex items-center rounded-full bg-background-brand-secondary-soft border border-border-brand-secondary-surface-secondary","gap-1 pl-1.5 pr-0.5 py-0.5","md:gap-1.5 md:pl-2",l),children:[(0,t.jsx)(w,{onClick:f}),(0,t.jsx)(d,{}),(0,t.jsx)(p.Button,{variant:"solid",color:"brand-secondary",size:"32",onClick:e,onMouseEnter:n.prefetchUpgradeDialog,onFocus:n.prefetchUpgradeDialog,onTouchStart:n.prefetchUpgradeDialog,className:(0,o.cn)("rounded-full","h-6 px-2 text-[11px]","md:h-8 md:px-2.5 md:text-xs"),children:"Upgrade"})]}):(0,t.jsx)(a.CreditsDetailsPillTrigger,{className:l,onOpen:c.openFromNav})}],24278)},615467,e=>{"use strict";function t(e){return e?{enabled:!0,level:"full",gate_policy:{soft:"auto_approve",credit:"auto_approve"}}:{enabled:!1,level:"full",gate_policy:{}}}function r(e){var t;let r=!(t=e?.auto_mode)||"object"!=typeof t||Array.isArray(t)?null:t;return r?.enabled===!0}e.s(["buildAgentAutoModeConfig",()=>t,"isAgentAutoModeEnabled",()=>r])},634242,e=>{"use strict";var t=e.i(93801),r=e.i(834486),n=e.i(78300),s=e.i(478790),a=e.i(143592),i=e.i(896753),o=e.i(290378),l=e.i(459110),u=e.i(368709);let c=(e,t)=>e.order<t.order?-1:+(e.order>t.order);e.s(["usePinnedItems",0,()=>{let{signin:e}=(0,i.useAuth)(),d=(0,r.useQueryClient)(),{data:p,isLoading:f,isLoggedIn:m}
9=(0,l.useUserSettings)(),h=p?.pinnedItems??a.DEFAULT_PINNED_ITEMS,g=(0,s.useCallback)(async e=>{await d.cancelQueries({queryKey:l.USER_SETTINGS_QUERY_KEY});let t=d.getQueryData(l.USER_SETTINGS_QUERY_KEY);return d.setQueryData(l.USER_SETTINGS_QUERY_KEY,t=>({...t,pinnedItems:e(t?.pinnedItems??a.DEFAULT_PINNED_ITEMS)})),t},[d]),y=(0,s.useCallback)(e=>{e&&d.setQueryData(l.USER_SETTINGS_QUERY_KEY,e)},[d]),C=(0,s.useCallback)(()=>d.invalidateQueries({queryKey:l.USER_SETTINGS_QUERY_KEY}),[d]),x=(0,t.useMutation)({mutationFn:e=>(0,u.post)("/api/user/settings",{action:"add",item:e.item,afterOrder:e.afterOrder,beforeOrder:e.beforeOrder}),onMutate:async e=>{let t=(0,n.generateJitteredKeyBetween)(e.afterOrder,e.beforeOrder);return{previous:await g(r=>[{...e.item,order:t},...r])}},onError:(e,t,r)=>y(r?.previous),onSettled:C}),v=(0,t.useMutation)({mutationFn:e=>(0,u.post)("/api/user/settings",{action:"remove",type:e.type,key:e.key}),onMutate:async e=>({previous:await g(t=>t.filter(t=>t.type!==e.type||t.key!==e.key))}),onError:(e,t,r)=>y(r?.previous),onSettled:C}),_=(0,t.useMutation)({mutationFn:e=>(0,u.post)("/api/user/settings",{action:"reorder",type:e.type,key:e.key,afterOrder:e.afterOrder,beforeOrder:e.beforeOrder}),onMutate:async e=>{let t=(0,n.generateJitteredKeyBetween)(e.afterOrder,e.beforeOrder);return{previous:await g(r=>r.map(r=>r.type===e.type&&r.key===e.key?{...r,order:t}:r).sort(c))}},onError:(e,t,r)=>y(r?.previous),onSettled:C}),b=(0,s.useCallback)((e,t)=>h.some(r=>r.type===e&&r.key===t),[h]),k=(0,s.useCallback)((t,r)=>{if(!m)return void e();if(h.some(e=>e.type===t.type&&e.key===t.key))v.mutate({type:t.type,key:t.key}),o.ToolActionAnalytics.trackUnpinned(t.key,r);else{let e=h.length>0?h[0].order:null;x.mutate({item:t,afterOrder:null,beforeOrder:e}),o.ToolActionAnalytics.trackPinned(t.key,r)}},[m,e,h,x,v]),S=(0,s.useCallback)((e,t,r,n)=>{_.mutate({type:e,key:t,afterOrder:r,beforeOrder:n})},[_]);return(0,s.useMemo)(()=>({pinnedItems:h,isLoading:f,isPinned:b,togglePin:k,reorderPinnedItem:S}),[h,f,b,k,S])}])},771999,e=>{"use strict";var t=e.i(743265),r=e.i(647163);e.i(814368);var n=e.i(612003);e.i(563178);var s=e.i(866837),a=e.i(330041);e.s(["TogglePinnedButton",0,({isPinned:e,onToggle:i,className:o,variant:l="ghost",color:u,tooltip:c})=>(0,t.jsx)(n.IconButton,{size:"32",onClick:e=>{e.stopPropagation(),i()},variant:l,color:u,highContrast:!0,className:(0,r.cn)("flex shrink-0 items-center justify-center rounded-[8px] p-[8px] cursor-pointer",o),icon:e?a.IconPinFill:s.IconPinBold,tooltip:c??(e?"Unpin from sidebar":"Pin to sidebar"),"aria-label":e?"Unpin from sidebar":"Pin to sidebar","aria-pressed":e})])},431509,e=>{"use strict";var t=e.i(716719),r=e.i(469035);let n=new Set(["workspace.invite_member","workspace.assign_project","workspace.archive_project","workspace.change_role"]),s=new Set(["workspace.create_project"]);function a(e){let{role:a,isEnterprise:i}=(0,t.useCurrentUserRole)(),{enabled:o,isResolving:l}=(0,r.useTeamEntitlementResolution)("rbac");return s.has(e)?!l&&(!o&&!i||"owner"===a||"admin"===a):!!a&&(!n.has(e)||"owner"===a||"admin"===a)}e.s(["useCan",()=>a])},617259,85696,e=>{"use strict";var t=e.i(93801),r=e.i(834486),n=e.i(317884),s=e.i(779342),a=e.i(920742),i=e.i(134310),o=e.i(272841),l=e.i(800084),u=e.i(642558),c=e.i(368709),d=e.i(549949);function p(){let e=(0,r.useQueryClient)(),p=(0,n.useRouter)(),f=(0,n.usePathname)(),m=(0,n.useSearchParams)();return(0,t.useMutation)({mutationFn:e=>(0,c.del)(`/api/projects/${e}`),onSuccess:(t,r)=>{if(m?.get("projectId")===r){let e=new URLSearchParams(m?.toString());e.delete("projectId"),e.delete("folderId");let t=e.toString();p.replace(t?`${f??""}?${t}`:f??"")}e.invalidateQueries({queryKey:d.projectKeys.all}),e.invalidateQueries({queryKey:o.resourcesKeys.all}),e.invalidateQueries({queryKey:i.historyKeys.all}),e.invalidateQueries({queryKey:l.uploadedAssetsKeys.all}),e.invalidateQueries({queryKey:a.albumCollectionKeys.lists()}),s.toast.success("Project deleted"),(0,u.event)("container_engaged",{container_action:"deleted",container_type:"project"})},onError:e=>{let t=e instanceof Error?e.message:"Failed to delete project";s.toast.error(t)}})}function f(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:e=>(0,c.patch)(`/api/projects/${e.projectId}`,{name:e.name}),onSuccess:(t,r)=>
9{e.invalidateQueries({queryKey:d.projectKeys.all}),s.toast.success("Project renamed"),(0,u.event)("container_engaged",{container_action:"renamed",container_type:"project"})},onError:e=>{let t=e instanceof Error?e.message:"Failed to rename project";s.toast.error(t)}})}e.s(["useDeleteProject",()=>p],617259),e.s(["useRenameProject",()=>f],85696)},609085,e=>{"use strict";var t=e.i(55769),r=e.i(497439),n=e.i(368709);let s=["useAllWorkspaces"];e.s(["QUERY_ALL_WORKSPACES",0,s,"useWorkspacesList",0,()=>{let{status:e}=(0,r.useSession)(),a=async()=>await (0,n.get)("/api/workspace/list")||[],{data:i=[],isFetching:o,...l}=(0,t.useQuery)({queryKey:[...s,e],queryFn:a,enabled:"authenticated"===e});return{data:i,isFetching:o,...l}}])},798353,524453,e=>{"use strict";var t=e.i(317884),r=e.i(478790),n=e.i(250193),s=e.i(368709),a=e.i(979450),i=e.i(613211),o=e.i(93801);e.i(643148);var l=e.i(358207),u=e.i(609085);function c(e){return""!==e&&e?e:"personal"}function d(e,t){return e?.find(e=>"personal"===t?""===e.team_id||!e.team_id:e.team_id===t)}function p(e){return(0,i.isSelfServePooledWorkspace)(e)&&!e.team_subscription_active||(0,i.isCancelledEnterpriseWorkspace)(e)||(0,i.isTrialExpiredEnterpriseWorkspace)(e)}function f(e,t){return!p(e)||!!t&&e.team_owner_user_id===t}e.s(["canAccessWorkspace",()=>f,"findWorkspace",()=>d,"isExpiredWorkspace",()=>p,"resolveWorkspaceKey",()=>c,"useWorkspaceSwitch",0,()=>{let{data:e}=(0,n.useMyProfile)(),{data:p=[],isFetching:m}=(0,u.useWorkspacesList)(),{mutate:h,isPending:g}=(0,o.useMutation)({mutationFn:async({workspace:e})=>{await (0,s.post)("/api/workspace/update",e)},onSuccess:(e,{workspace:t,redirectTo:r})=>{if((0,s.setWorkspaceContext)({teamId:t.workspace_team_id,userId:t.workspace_user_id}),r){window.location.href=!l.publicEnv.basePath||r.startsWith(l.publicEnv.basePath)||r.startsWith("http://")||r.startsWith("https://")?r:`${l.publicEnv.basePath}${r}`;return}let n=new URL(window.location.href);n.searchParams.delete("projectId"),n.searchParams.delete("folderId");let a=n.toString();a===window.location.href?window.location.reload():window.location.href=a}}),y=(0,t.usePathname)(),C=(0,s.getWorkspaceContext)()?.teamId??"",x=(0,r.useMemo)(()=>c(e?e.last_used_workspace?.workspace_team_id??"":C),[e,C]),v=p.length>1;return{myProfile:e,workspaces:p,isFetching:m,isSwitching:g,selectedWorkspaceId:x,hasMultipleWorkspaces:v,switchWorkspace:(t,r)=>{var n;if(t===x)return;let s=d(p,t),o=s?.virtual_user_profile_id;s&&o&&f(s,e?.id)&&h({workspace:{workspace_user_id:o,workspace_team_id:"personal"===t?"":t},redirectTo:function(e,t){if(!e)return null;let r="/admin"===e||e.startsWith("/admin/")||e.startsWith("/team/settings"),n=e.startsWith("/manage-workspace"),s=e.startsWith("/subscriptions");return r||n||s?"personal"===t?s||n?null:"/manage-workspace":"enterprise"===t?r?null:n?"/team/settings":"/home":"business"===t?r||s?null:"/team/settings":n||s?null:r?"/manage-workspace":null:null}(y,(n=e?.id)&&s.virtual_user_profile_id===n?"personal":(0,i.isEnterprise)(s)?"enterprise":(0,a.teamHasEntitlement)(s,"rbac")?"business":"team_plan")??void 0},{onSuccess:()=>r?.onSuccess?.(),onError:r?.onError})}}}],798353),e.i(20079);var m=e.i(119518),h=e.i(87319);function g(e){return(0,h.useStatsigGate)(m.STATSIG_FEATURE_GATES.adminConsoleRollout,!1,e)}e.s(["useAdminEnabled",()=>g],524453)},384634,981977,e=>{"use strict";var t=e.i(743265),r=e.i(647163);function n(){return(0,t.jsx)("div",{className:(0,r.cn)("flex items-center justify-center px-[5px] py-[2px] rounded-[5px] bg-[#376aff]"),children:(0,t.jsx)("p",{className:"text-[11px] font-semibold leading-4 text-white tracking-[0.1px]",children:"Enterprise"})})}e.s(["EnterpriseBadge",()=>n],981977),e.s(["SubscriptionBadge",0,({label:e,themeColorClass:s,textClass:a})=>"Enterprise"===e?(0,t.jsx)(n,{}):(0,t.jsx)("div",{className:(0,r.cn)("flex items-center justify-center px-[5px] py-[2px] rounded-[5px]",s),children:(0,t.jsx)("p",{className:(0,r.cn)("text-[11px] leading-[16px] font-semibold tracking-[0.1px] overflow-hidden text-ellipsis whitespace-nowrap",a),children:e})})],384634)},690538,e=>{"use strict";e.s(["CREATION_URL_PREFIX",0,"/suite","PREVIOUS_STORY_PATH",0,"/story","PREVIOUS_VERSION_PATH",0,"/legacy/home"])},580652,e=>{"use strict";let t="M22.3954 3.8838e-06C24.7301 0.00180874 26.9693 0.984863 28.6241 2.73453C30.279 4.48423 31.215 6.85846 31.2278 9.33878C31.2216 11.1585 30.7176 12.937 29.7773 14.458C28.837 15.9789 27.5008 17.1768 25.9314 17.9056C24.3619 18.6345 22.6268 18.8631 20.9373 18.5635C19.2479 18.2639 17.6767 17.449 16.4153 16.2181C14.8633 14.8422 13.3037 13.4859 11.7367 12.1489L13.9805 10.2469C16.1692 12.1112 18.0664 13.7588 18.8143 14.3986C19.8426 15.2154 21.092 15.6569 22.3759 15.6574C25.5844 15.6574 28.427 12.8128 28.372 9.33878C28.3611 8.16598 28.0455 7.01913 27.46 6.02487C26.8745 5.0306 26.0416 4.22742 25.0536 3.70405C24.0657 3.18071 22.9609 2.95756 21.8611 3.05899C20.7612 3.16042 19.7091 3.58257 18.8208 4.27896C14.0614 8.47538 9.15308 12.5342 4.30624 16.6068C2.34419 18.0756 0.0194258 16.6308 0.0194258 14.199C-0.00647521 10.9657 -0.00647529 7.73473 0.0194258 4.50605C0.0259012 2.06388 2.34747 0.601992 4.31274 2.06386L9.59987 6.61442L7.41434 8.49267L2.85897 4.67458C2.83523 7.78861 2.83523 10.8981 2.85897 14.003C7.4274 10.2193 11.9699 6.39085 16.4282 2.46964C18.0547 0.879501 20.185 -0.00213532 22.3954 3.8838e-06Z",r=[{d:"M54.3993 4.90452C55.3629 4.90452 56.2252 5.12668 56.9859 5.5
97112C57.7593 6.00287 58.368 6.61247 58.8117 7.39977C59.2682 8.18704 59.4964 9.11403 59.4964 10.1806C59.4964 11.26 59.2682 12.1935 58.8117 12.9808C58.368 13.7681 57.7593 14.3777 56.9859 14.8095C56.2252 15.2412 55.3629 15.457 54.3993 15.457C53.5371 15.457 52.7826 15.2666 52.136 14.8857C51.8327 14.707 51.5601 14.4848 51.3182 14.2195V19H48.3514V5.05699H51.185V6.24017C51.4409 5.93099 51.739 5.67631 52.079 5.47598C52.7256 5.09504 53.4991 4.90452 54.3993 4.90452ZM53.8857 7.34264C53.3913 7.34265 52.9476 7.45687 52.5546 7.6854C52.1615 7.91397 51.8507 8.23789 51.6225 8.65694C51.3943 9.07596 51.2802 9.58388 51.2802 10.1806C51.2802 10.7647 51.3943 11.2728 51.6225 11.7045C51.8507 12.1236 52.1615 12.4475 52.5546 12.6761C52.9476 12.9046 53.3913 13.0188 53.8857 13.0188C54.3802 13.0188 54.8177 12.9046 55.198 12.6761C55.5911 12.4475 55.9019 12.1236 56.1301 11.7045C56.371 11.2728 56.4912 10.7647 56.4912 10.1806C56.4912 9.58389 56.371 9.07596 56.1301 8.65694C55.9019 8.23789 55.5911 7.91397 55.198 7.6854C54.8177 7.45685 54.3802 7.34264 53.8857 7.34264Z",evenOdd:!0},{d:t},{d:"M40.4539 1.74246C41.5062 1.74246 42.4699 1.91394 43.3448 2.2568C44.2323 2.59966 44.9994 3.08226 45.646 3.70447C46.3053 4.32668 46.8189 5.0569 47.1866 5.89497C47.5543 6.72035 47.7381 7.63469 47.7381 8.63783C47.7381 9.6283 47.5543 10.549 47.1866 11.3998C46.8189 12.2379 46.3053 12.9681 45.646 13.5903C44.9994 14.1998 44.2323 14.676 43.3448 15.0189C42.4699 15.3617 41.5126 15.5332 40.4729 15.5332C39.4206 15.5332 38.4443 15.3617 37.5441 15.0189C36.6566 14.676 35.8831 14.1934 35.2238 13.5712C34.5771 12.949 34.0699 12.2188 33.7022 11.3807C33.3472 10.5426 33.1698 9.62829 33.1698 8.63783C33.1698 7.64739 33.3472 6.73305 33.7022 5.89497C34.0699 5.05689 34.5836 4.32668 35.2429 3.70447C35.9021 3.08227 36.6755 2.59966 37.563 2.2568C38.4505 1.91394 39.4142 1.74247 40.4539 1.74246ZM40.4539 4.37107C39.858 4.37108 39.3065 4.47266 38.7993 4.67581C38.3049 4.87898 37.8674 5.17108 37.487 5.55201C37.1067 5.93297 36.8087 6.3839 36.5931 6.90454C36.3903 7.42516 36.2888 8.00293 36.2888 8.63783C36.2888 9.26004 36.3903 9.83781 36.5931 10.3711C36.8086 10.8917 37.1003 11.3425 37.468 11.7235C37.8483 12.1044 38.2922 12.3967 38.7993 12.5999C39.3065 12.803 39.858 12.9046 40.4539 12.9046C41.0497 12.9046 41.595 12.803 42.0895 12.5999C42.5966 12.3967 43.0405 12.1044 43.4209 11.7235C43.8012 11.3425 44.0929 10.8917 44.2957 10.3711C44.5113 9.85051 44.6191 9.27273 44.6191 8.63783C44.6191 8.00294 44.5113 7.42516 44.2957 6.90454C44.0929 6.38389 43.8012 5.93297 43.4209 5.55201C43.0532 5.17107 42.6157 4.87899 42.1086 4.67581C41.6014 4.47264 41.0498 4.37107 40.4539 4.37107Z",evenOdd:!0},{d:"M65.5692 4.90452C66.5709 4.90452 67.4712 5.12027 68.2699 5.55201C69.0814 5.97106 69.7217 6.58067 70.1908 7.38066C70.6599 8.16795 70.8945 9.11411 70.8945 10.2189C70.8945 10.3331 70.8881 10.4664 70.8755 10.6187C70.8628 10.7584 70.8502 10.8919 70.8375 11.0188H63.0959C63.1556 11.2916 63.2509 11.5457 63.3821 11.7808C63.6357 12.1998 63.9843 12.5238 64.4281 12.7523C64.8845 12.9682 65.4172 13.076 66.0257 13.076C66.5709 13.076 67.0464 12.9936 67.4521 12.8286C67.8705 12.6635 68.251 12.4157 68.5933 12.0855L70.1719 13.7999C69.7028 14.3332 69.1131 14.7459 68.4031 15.038C67.6931 15.3173 66.8752 15.457 65.9496 15.457C64.7832 15.457 63.7561 15.2286 62.8685 14.7715C61.9937 14.3143 61.3154 13.6919 60.8336 12.9046C60.3518 12.1046 60.1108 11.1965 60.1108 10.1806C60.1108 9.1521 60.3454 8.24418 60.8145 7.45689C61.2964 6.65689 61.9494 6.03469 62.7735 5.59023C63.5977 5.1331 64.5296 4.90452 65.5692 4.90452ZM65.5883 7.15215C65.0812 7.15215 64.6311 7.26639 64.2381 7.49491C63.8577 7.71079 63.5595 8.02209 63.3439 8.42844C63.2049 8.6824 63.1111 8.96817 63.0618 9.28553H68.1001C68.0519 8.96273 67.9565 8.6706 67.8134 8.40933C67.5979 8.01569 67.2999 7.71078 66.9195 7.49491C66.5392 7.26638 66.0954 7.15216 65.5883 7.15215Z",evenOdd:!0},{d:"M110.342 5.28549H112.891V7.57114H110.342V11.7428C110.342 12.1745 110.457 12.5109 110.685 12.7521C110.913 12.9807 111.224 13.0951 111.617 13.0951C112.086 13.0951 112.485 12.9681 112.815 12.7141L113.614 14.8093C113.309 15.0251 112.941 15.1904 112.51 15.3047C112.092 15.4063 111.655 15.457 111.198 15.457C109.994 15.457 109.055 15.1523 108.383 14.5428C107.711 13.9205 107.375 12.9998 107.375 11.7808V7.57114H105.797V5.28549H107.375V2.79025L110.342 2.79025V5.28549Z"},{d:"M77.7316 4.90452C78.543 4.90452 79.2657 5.06959 79.8997 5.39975C80.5463 5.7172 81.0536 6.21244 81.4212 6.88543C81.7889 7.54573 81.9727 8.39659 81.9727 9.4378V15.3047H79.0059V9.89501C79.0059 9.06967 78.8221 8.46002 78.4544 8.06637C78.0994 7.67274 77.5921 7.47602 76.9329 7.476C76.4637 7.476 76.0389 7.57758 75.6585 7.78074C75.2909 7.97121 74.9992 8.26956 74.7837 8.67585C74.5808 9.08221 74.4794 9.60304 74.4794 10.238V15.3047L71.5124 15.3047V5.05699H74.3462V6.27412C74.6398 5.9465 74.9884 5.67407 75.3922 5.45687C76.0769 5.08861 76.8567 4.90452 77.7316 4.90452Z"}
9,{d:"M97.7122 15.3047H94.479L93.2973 12.4474H87.1259L85.9395 15.3047L82.7823 15.3047L88.7161 1.97117L91.7593 1.97117L97.7122 15.3047ZM88.0986 10.1044H92.3282L90.2176 5.00149L88.0986 10.1044Z",evenOdd:!0},{d:"M104.897 7.64738C104.77 7.63468 104.656 7.62827 104.555 7.62827C104.453 7.61558 104.345 7.60916 104.231 7.60916C103.42 7.60918 102.761 7.84436 102.253 8.31419C101.759 8.77134 101.512 9.48875 101.512 10.4665V15.3047H98.5447V5.05699H101.379V6.40281C101.658 6.02093 102.013 5.71192 102.444 5.47598C103.116 5.09505 103.933 4.90452 104.897 4.90452V7.64738Z"}];e.s(["LOGO_MARK_PATH",0,t,"LOGO_MARK_VIEWBOX_WIDTH",0,32,"LOGO_SVG_PATHS",0,r,"LOGO_VIEWBOX_HEIGHT",0,19])},221113,e=>{"use strict";var t=e.i(743265),r=e.i(478790),n=e.i(580652);let s=(0,r.forwardRef)(function({className:e,...r},s){return(0,t.jsxs)("svg",{ref:s,width:"114",height:"19",viewBox:"0 0 114 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...r,children:[(0,t.jsx)("title",{children:"Logo"}),n.LOGO_SVG_PATHS.map(e=>(0,t.jsx)("path",{d:e.d,fill:"#EBEBEB",fillRule:e.evenOdd?"evenodd":void 0,clipRule:e.evenOdd?"evenodd":void 0},e.d.slice(0,20)))]})});e.s(["Logo",0,s])},103489,475474,e=>{"use strict";var t=e.i(186801),r=e.i(55769),n=e.i(478790),s=e.i(904908),a=e.i(210044);let i="general-agent",o="X-PROJECT-ID";e.s(["GENERAL_AGENT_PROFILE_ID",0,i,"GENERAL_AGENT_PROJECT_HEADER",0,o],475474);var l=e.i(368709);let u={all:[i],sessionsRoot:[i,"sessions"],eventLog:(e,t)=>[...u.all,"event-log",e,t],session:(e,t)=>[...u.all,"session",e,t],sessions:(e,t)=>[...u.sessionsRoot,e,t]};function c(e){let t=(0,a.useRequiredProjectId)();return(0,r.useQuery)({queryKey:u.eventLog(t,e??""),queryFn:({signal:r})=>(0,l.get)(`/api/agent/sessions/${e}/event-log`,{signal:r,extraHeaders:{[o]:t}}),enabled:!!e&&!!t,retry:s.retryOnNon4xx})}function d(e=10){let r=(0,a.useRequiredProjectId)(),s=(0,t.useInfiniteQuery)({queryKey:u.sessions(r,e),initialPageParam:void 0,queryFn:({pageParam:t,signal:n})=>(0,l.get)(["/api/agent/sessions",{agent_id:i,project_id:r,limit:e,...t?{cursor:t}:{}}],{signal:n}),getNextPageParam:e=>e.data.next_cursor,enabled:!!r});return{sessions:(0,n.useMemo)(()=>s.data?.pages.flatMap(e=>e.data.sessions)??[],[s.data]),isLoading:s.isLoading,isFetchingNextPage:s.isFetchingNextPage,hasNextPage:!!s.hasNextPage,fetchNextPage:s.fetchNextPage}}function p(e,t){let n=(0,a.useRequiredProjectId)();return(0,r.useQuery)({queryKey:u.session(n,e??""),queryFn:({signal:t})=>(0,l.get)(`/api/agent/sessions/${e}`,{signal:t,extraHeaders:{[o]:n}}),enabled:(t?.enabled??!0)&&!!e&&!!n,refetchInterval:t?.refetchInterval??!1,retry:s.retryOnNon4xx})}e.s(["generalAgentKeys",0,u,"useGeneralAgentSession",()=>p,"useGeneralAgentSessions",()=>d,"useGeneralEventLog",()=>c],103489)},468097,e=>{"use strict";var t=e.i(93801),r=e.i(834486),n=e.i(779342),s=e.i(615467),a=e.i(538248),i=e.i(210044),o=e.i(475474),l=e.i(368709),u=e.i(103489);function c(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationKey:["general-agent","createSession"],mutationFn:({projectId:e,agentModel:t,autoModeEnabled:r,depthMetadata:n})=>(0,l.post)("/api/agent/sessions",{metadata:{agent_id:o.GENERAL_AGENT_PROFILE_ID,project_id:e,auto_mode:(0,s.buildAgentAutoModeConfig)(r),...t?{agent_model:t}:{},...n}}),onSuccess:(t,{projectId:r})=>{e.invalidateQueries({queryKey:[...u.generalAgentKeys.sessionsRoot,r]})},onError:e=>{a.useErrorHandlerStore.getState().handleError(e)}})}function d(){let e=(0,r.useQueryClient)(),n=(0,i.useRequiredProjectId)();return(0,t.useMutation)({mutationKey:["general-agent","updateSessionMetadata"],mutationFn:({sessionId:e,metadata:t})=>(0,l.patch)(`/api/agent/sessions/${e}`,{metadata:t}),onSuccess:(t,{sessionId:r})=>{e.invalidateQueries({queryKey:u.generalAgentKeys.session(n,r)})}})}function p(){let e=(0,r.useQueryClient)(),n=(0,i.useRequiredProjectId)();return(0,t.useMutation)({mutationKey:["general-agent","renameSession"],mutationFn:({sessionId:e,title:t})=>(0,l.patch)(`/api/agent/sessions/${e}`,{title:t}),onMutate:async({sessionId:t,title:r})=>{await Promise.all([e.cancelQueries({queryKey:u.generalAgentKeys.session(n,t)}),e.cancelQueries({queryKey:u.generalAgentKeys.sessionsRoot})]);let s=e.getQueryData(u.generalAgentKeys.session(n,t)),a=e.getQueriesData({queryKey:u.generalAgentKeys.sessionsRoot});return e.setQueryData(u.generalAgentKeys.session(n,t),e=>e?{...e,data:{...e.data,title:r}}:e),e.setQueriesData({queryKey:u.generalAgentKeys.sessionsRoot},e=>e?{...e,pages:e.pages.map(e=>({...e,data:{...e.data,sessions:e.data.sessions.map(e=>e.session_id===t?{...e,title:r}:e)}}))}:e),{previousSession:s,previousSessionLists:a}},onSuccess:(t,{sessionId:r})=>{e.setQueryData(u.generalAgentKeys.session(n,r),t)},onError:(t,{sessionId:r},s)=>{s?.previousSession&&e.setQueryData(u.generalAgentKeys.session(n,r),s.previousSession),s?.previousSessionLists.forEac
9h(([t,r])=>{e.setQueryData(t,r)}),a.useErrorHandlerStore.getState().handleError(t)},onSettled:(t,r,{sessionId:s})=>{e.invalidateQueries({queryKey:u.generalAgentKeys.session(n,s)}),e.invalidateQueries({queryKey:u.generalAgentKeys.sessionsRoot})}})}function f(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationKey:["general-agent","deleteSession"],mutationFn:({sessionId:e})=>(0,l.del)(`/api/agent/sessions/${e}`),onMutate:async({sessionId:t,projectId:r})=>{let s=[...u.generalAgentKeys.sessionsRoot,r];await e.cancelQueries({queryKey:s});let a=e.getQueriesData({queryKey:s});return e.setQueriesData({queryKey:s},e=>e?{...e,pages:e.pages.map(e=>({...e,data:{...e.data,sessions:e.data.sessions.filter(e=>e.session_id!==t),total:Math.max(0,e.data.total-1)}}))}:e),{previousSessionLists:a,toastId:n.toast.loading("Deleting chat…")}},onSuccess:(t,{sessionId:r,projectId:s},a)=>{e.removeQueries({queryKey:u.generalAgentKeys.session(s,r)}),e.removeQueries({queryKey:u.generalAgentKeys.eventLog(s,r)}),n.toast.success("Chat deleted",{id:a?.toastId})},onError:(t,r,s)=>{s?.previousSessionLists.forEach(([t,r])=>{e.setQueryData(t,r)}),n.toast.dismiss(s?.toastId),a.useErrorHandlerStore.getState().handleError(t)},onSettled:(t,r,{projectId:n})=>{e.invalidateQueries({queryKey:[...u.generalAgentKeys.sessionsRoot,n]})}})}e.s(["useCreateGeneralSession",()=>c,"useDeleteGeneralSession",()=>f,"useRenameGeneralSession",()=>p,"useUpdateGeneralSessionMetadata",()=>d])},790551,e=>{"use strict";function t(e){return`openart:agent:composer-draft:${e}`}function r({projectId:e,sessionId:t,handoffKey:r}){return t?`session:${t}`:r?`handoff:${r}`:e}function n(e){return e.startsWith("handoff:")?window.sessionStorage:window.localStorage}function s(e){if(!e)return null;try{let r=n(e).getItem(t(e));if(!r)return null;let s=JSON.parse(r);if(!s||"object"!=typeof s)return null;if("content"in s&&"picks"in s){if(!s.content||"object"!=typeof s.content)return null;return{content:s.content,picks:Array.isArray(s.picks)?s.picks:[]}}return{content:s,picks:[]}}catch{return null}}function a(e,r){if(e)try{n(e).setItem(t(e),JSON.stringify(r))}catch{}}function i(e){if(e)try{n(e).removeItem(t(e))}catch{}}e.s(["clearComposerDraft",()=>i,"generalComposerDraftScope",()=>r,"readComposerDraft",()=>s,"writeComposerDraft",()=>a])},449214,e=>{"use strict";let t=[],r=new Map,n=new Set;function s(e){r.delete(e)}function a(e){return n.has(e)}function i(e){t.push(e)}function o(e,n){let s=[];for(let a=t.length-1;a>=0;a--){let i=t[a];if(i){if(i.newChatTick!==n){t.splice(a,1),i.draft&&r.set(i.sessionId,{sessionId:i.sessionId,projectId:i.projectId});continue}e(i)&&(s.unshift(i),t.splice(a,1))}}return s}async function l(e,t){o(()=>!1,e.newChatTick),e.sessionId&&s(e.sessionId),await Promise.all(Array.from(r.values(),async e=>{if(r.delete(e.sessionId),!n.has(e.sessionId)){n.add(e.sessionId);try{await t(e)}catch{}finally{n.delete(e.sessionId)}}}))}e.s(["cleanUpAbandonedGeneralSessions",()=>l,"isGeneralSessionBeingDeleted",()=>a,"parkGeneralFrame",()=>i,"retainGeneralSession",()=>s,"takeParkedFrames",()=>o])},139402,942583,e=>{"use strict";var t=e.i(317884),r=e.i(478790),n=e.i(291900),s=e.i(490743),a=e.i(417798),i=e.i(725138),o=e.i(856609),l=e.i(561154);function u(){let e=(0,t.useRouter)(),{projectId:u}=(0,o.useProjectContext)(),c=(0,i.useCreationStore)(e=>e.characterAndWorlds.setIsWorldLibraryDialogOpen),d=(0,r.useCallback)(()=>{let e=new URLSearchParams(window.location.search).get("projectId")||u,t=a.useGeneralChatStore.getState();return t.projectId===e?t.sessionId:null},[u]);return{openChat:(0,r.useCallback)(()=>{c(!1);let e=window.location.pathname;e===`${n.BASE_PATH}/chat`||e.startsWith(`${n.BASE_PATH}/chat/`)||(0,s.replaceGeneralChatUrlShallow)(d())},[d,c]),onChatLinkClick:t=>{if(t.defaultPrevented||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||0!==t.button||"_blank"===t.currentTarget.target)return;t.preventDefault(),c(!1);let r=d(),n=r?`/chat/${r}`:"/chat";e.push((0,l.withProjectParams)(n))}}}e.s(["useChatNavigation",()=>u],139402);var c=e.i(143592);function d(e){return"image"===e||"video"===e||"audio"===e}function p(e,t){t.setLastTool(e,null),t.setTool(null),t.setModel(null),(0,c.replaceUrlShallow)({tab:e,clearSearch:!0})}e.s(["isToolGridTab",()=>d,"returnToToolGrid",()=>p],942583)},750030,e=>{e.v(t=>Promise.all(["static/chunks/bc408a474e4c87b0.js"].map(t=>e.l(t))).then(()=>t(725610)))},859821,e=>{e.v(t=>Promise.all(["static/chunks/3c34dc8d86c9e55e.js","static/chunks/5255fdb2b81be981.js","static/chunks/ba1f8d1e60246a4a.js"].map(t=>e.l(t))).then(()=>t(609750)))},769778,e=>{e.v(t=>Promise.all(["static/chunks/ba1f8d1e60246a4a.js","static/chunks/5255fdb2b81be981.js"].map(t=>e.l(t))).then(()=>t(183804)))},455648,e=>{e.v(t=>Promise.all(["static/chunks/c20dd8222ec610d9.js","static/chunks/dcd46da3d2ba99c0.js","static/chunks/ba1f8d1e60246a4a.js"].map(t=>e.l(t))).then(()=>t(398264)))},195785,e=>{e.v(t=>Promise.all(["static/chunks/3e051a26a4316aad.js"].map(t=>e.l(t))).then(()=>t(477749)))},927487,e=>{e.v(t=>Promise.all(["static/chunks/a3d335ecbecb880b.js"].map(t=>e.l(t))).then(()=>t(249223)))}]);

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