1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,175696,e=>{"use strict";var t=e.i(861745),n=e.i(843476);e.s(["default",0,function({locale:e,...r}){if(!e)throw Error(void 0);return(0,n.jsx)(t.IntlProvider,{locale:e,...r})}])},924893,e=>{"use strict";var t=e.i(843476);e.s(["ThemeProvider",0,function({children:e}){return(0,t.jsx)(t.Fragment,{children:e})}])},5829,e=>{"use strict";var t=e.i(271645);e.s(["TimeZoneCookie",0,function(){return(0,t.useEffect)(()=>{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(document.cookie=`time-zone=${encodeURIComponent(e)}; path=/; max-age=31536000; samesite=lax`)},[]),null}])},819432,e=>{"use strict";var t=e.i(843476),n=e.i(861509),r=e.i(271645);function a(){let{data:e,isPending:t}=(0,n.useSession)(),a=async()=>{await (0,n.oneTap)()};return(0,r.useEffect)(()=>{!t&&(e||a())},[e,t]),null}var s=e.i(653498),i=e.i(713354),l=e.i(915379),o=e.i(209165),c=e.i(959141),u=e.i(572098),d=e.i(865161),m=e.i(621427),f=e.i(253207);e.s(["CheckSession",0,function(){let{data:e,isPending:t}
1=(0,n.useSession)(),a=(0,m.useUserStore)(e=>e.token),s=(0,m.useUserStore)(e=>e.setUserData),f=(0,r.useRef)(!1),p=(0,r.useRef)(null),x=e?.session?.id||e?.user?.id||null,g=(0,r.useCallback)(async()=>{if(!f.current&&e?.user)try{f.current=!0;let t=e.user;if(!t)return;let r=null;try{r=(await (0,n.getGoogleAccessToken)(e.session?.userId)).data??null}catch(e){}let a=(0,u.getInvitationCodeFromCookie)(),m=(0,u.getInviteCodeFromCookie)(),p={accessToken:r?.accessToken??"",displayName:t.name??"",email:t.email??"",id:t.providerUserId||t.id||"",idToken:r?.idToken??"",...m?{inviteCode:m}:{},...a?{invitationCode:a}:{},photoUrl:t.image??""},x=(0,o.createApi)(),g=await x.post(l.Urls.USER.loginByGoogle,p),h=g.data;if(!g.success||!h)throw Error(g.message||"Network error, try again later.");s({...h,isLogin:!0}),(0,c.logEvent)("login_success_google"),i.customToast.success("Login successful"),(0,d.maybeOpenRedInviteDialogAfterLogin)()}catch(e){i.customToast.error("Login failed",e instanceof Error?e.message:"Please try again")}finally{f.current=!1}},[e,s]);return(0,r.useEffect)(()=>{if(!t){if(!e?.user){p.current=null;return}if(a){p.current=x;return}x&&p.current!==x&&(p.current=x,g())}},[t,g,e,x,a]),null},"GoogleOneTap",0,function(){return(0,t.jsx)(a,{})},"default",0,function(){let{data:e,isPending:a}=(0,n.useSession)(),[l,o]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(a)return},[e,a]);let u=[{provider:"google",label:"Continue with Google",icon:f.default}],d=async(e,t)=>{if(!a&&!l)try{var r;"google"===e&&(0,c.logEvent)("click_login_google"),o(e);let t=(r=await (0,n.signIn)(e),r?.error?"string"==typeof r.error?r.error:r.error.message||r.message||null:null);if(t)throw Error(t)}catch(e){i.customToast.error(`${t} login failed`,e instanceof Error?e.message:"Please try again")}finally{o(null)}};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("section",{className:"flex w-full flex-col gap-3 items-center",children:u.map(({provider:e,label:n,icon:r})=>(0,t.jsx)(s.default,{buttonType:"white",size:"large",onClick:()=>d(e,n),disabled:a||!!l,"aria-busy":l===e,loading:l===e,label:n,icon:r},e))})})}],819432)},916464,e=>{"use strict";var t,n,r,a,s=e.i(843476),i=e.i(776639),l=e.i(975157),o=e.i(271645);function c(){return(c=Object.assign.bind()).apply(null,arguments)}let u=function(e){return o.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18"},e),t||(t=o.createElement("path",{fill:"currentColor",d:"M15.875 3H2.125c-.365 0-.714.14-.972.39s-.403.59-.403.943v9.334c0 .353.145.692.403.942s.607.391.972.391h13.75c.365 0 .714-.14.972-.39s.403-.59.403-.943V4.333c0-.353-.145-.692-.403-.942A1.4 1.4 0 0 0 15.875 3m-9.297 7.43-2.666 1.724a.705.705 0 0 1-.948-.19.65.65 0 0 1 .185-.92L5.815 9.32a.705.705 0 0 1 .947.19.65.65 0 0 1-.184.92M3.182 6.04a.68.68 0 0 1-.3-.42.65.65 0 0 1 .096-.503.7.7 0 0 1 .433-.29.7.7 0 0 1 .517.092l5.1 3.2 5.099-3.2a.7.7 0 0 1 .95.198.653.653 0 0 1-.204.922L9.028 9.708zm11.915 5.929a.68.68 0 0 1-.437.284.7.7 0 0 1-.517-.1l-2.666-1.723a.65.65 0 0 1-.19-.924.705.705 0 0 1 .953-.185l2.666 1.723a.68.68 0 0 1 .293.424.65.65 0 0 1-.102.5"})))};var d=e.i(735898),m=e.i(653498),f=e.i(170247),p=e.i(99832),x=e.i(108800);function g(){return(g=Object.assign.bind()).apply(null,arguments)}let h=function(e){return o.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=o.createElement("path",{fill:"currentColor",d:"M12 4.5c3.667 0 6.938 2.314 9.807 6.835a1.24 1.24 0 0 1 0 1.33C18.938 17.187 15.667 19.5 12 19.5s-6.938-2.314-9.806-6.834a1.24 1.24 0 0 1 0-1.332C5.062 6.815 8.334 4.5 12 4.5m0 3a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9m0 7.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6"})))};function v(){return(v=Object.assign.bind()).apply(null,arguments)}let b=function(e){return o.createElement("svg",v({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),r||(r=o.createElement("path",{fill:"currentColor",d:"M12 4.5c3.667 0 6.938 2.314 9.807 6.835a1.24 1.24 0 0 1 0 1.33C18.938 17.187 15.667 19.5 12 19.5s-6.938-2.314-9.806-6.834a1.24 1.24 0 0 1 0-1.332C5.062 6.815 8.334 4.5 12 4.5m0 3a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9m0 7.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6"})),a||(a=o.createElement("path",{stroke:"currentColor",strokeWidth:1.5,d:"m2.445 4.396 19 14"})))};var w=e.i(88653),y=e.i(846932),j=Object.defineProperty,S=Object.defineProperties,C=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,P=(e,t,n)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T=o.createContext({}),D=o.forwardRef((e,t)=>
vendor: 6,036 bytes, line 1
1{let n;var r,a,s,i,l,{value:c,onChange:u,maxLength:d,textAlign:m="left",pattern:f,placeholder:p,inputMode:x="numeric",onComplete:g,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:v,containerClassName:b,noScriptCSSFallback:w=R,render:y,children:j}=e,D=((e,t)=>{var n={};for(var r in e)N.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&E)for(var r of E(e))0>t.indexOf(r)&&k.call(e,r)&&(n[r]=e[r]);return n})(e,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[_,M]=o.useState("string"==typeof D.defaultValue?D.defaultValue:""),U=null!=c?c:_,A=(n=o.useRef(),o.useEffect(()=>{n.current=U}),n.current),F=o.useCallback(e=>{null==u||u(e),M(e)},[u]),O=o.useMemo(()=>f?"string"==typeof f?new RegExp(f):f:null,[f]),L=o.useRef(null),B=o.useRef(null),z=o.useRef({value:U,onChange:F,isIOS:"u">typeof window&&(null==(a=null==(r=null==window?void 0:window.CSS)?void 0:r.supports)?void 0:a.call(r,"-webkit-touch-callout","none"))}),W=o.useRef({prev:[null==(s=L.current)?void 0:s.selectionStart,null==(i=L.current)?void 0:i.selectionEnd,null==(l=L.current)?void 0:l.selectionDirection]});o.useImperativeHandle(t,()=>L.current,[]),o.useEffect(()=>{let e=L.current,t=B.current;if(!e||!t)return;function n(){if(document.activeElement!==e){K(null),Z(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,a=e.maxLength,s=e.value,i=W.current.prev,l=-1,o=-1,c;if(0!==s.length&&null!==t&&null!==n){let e=t===n,r=t===s.length&&s.length<a;if(e&&!r){if(0===t)l=0,o=1,c="forward";else if(t===a)l=t-1,o=t,c="backward";else if(a>1&&s.length>1){let e=0;if(null!==i[0]&&null!==i[1]){c=t<i[1]?"backward":"forward";let n=i[0]===i[1]&&i[0]<a;"backward"!==c||n||(e=-1)}l=e+t,o=e+t+1}}-1!==l&&-1!==o&&l!==o&&L.current.setSelectionRange(l,o,c)}let u=-1!==l?l:t,d=-1!==o?o:n,m=null!=c?c:r;K(u),Z(d),W.current.prev=[u,d,m]}if(z.current.value!==e.value&&z.current.onChange(e.value),W.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",n,{capture:!0}),n(),document.activeElement===e&&G(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";I(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),I(e.sheet,`[data-input-otp]:autofill { ${t} }`),I(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),I(e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),I(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let r=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};r();let a=new ResizeObserver(r);return a.observe(e),()=>{document.removeEventListener("selectionchange",n,{capture:!0}),a.disconnect()}},[]);let[$,H]=o.useState(!1),[V,G]=o.useState(!1),[q,K]=o.useState(null),[Q,Z]=o.useState(null);o.useEffect(()=>{var e;setTimeout(e=()=>{var e,t,n,r;null==(e=L.current)||e.dispatchEvent(new Event("input"));let a=null==(t=L.current)?void 0:t.selectionStart,s=null==(n=L.current)?void 0:n.selectionEnd,i=null==(r=L.current)?void 0:r.selectionDirection;null!==a&&null!==s&&(K(a),Z(s),W.current.prev=[a,s,i])},0),setTimeout(e,10),setTimeout(e,50)},[U,V]),o.useEffect(()=>{void 0!==A&&U!==A&&A.length<d&&U.length===d&&(null==g||g(U))},[d,g,A,U]);let Y=function({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[a,s]=o.useState(!1),[i,l]=o.useState(!1),[c,u]=o.useState(!1),d=o.useMemo(()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&a&&i,[a,i,n]),m=o.useCallback(()=>{let r=e.current,a=t.current;if(!r||!a||c||"none"===n)return;let i=r.getBoundingClientRect().left+r.offsetWidth,l=r.getBoundingClientRect().top+r.offsetHeight/2;0===document.querySelectorAll('[data-lastpass-icon-root],com-1password-button,[data-dashlanecreated],[style$="2147483647 !important;"]').length&&document.elementFromPoint(i-18,l)===r||(s(!0),u(!0))},[e,t,c,n]);return o.useEffect(()=>{let t=e.current;if(!t||"none"===n)return;function r(){l(window.innerWidth-t.getBoundingClientRect().right>=40)}r();let a=setInterval(r,1e3);return()=>{clearInterval(a)}},[e,n]),o.useEffect(()=>{let e=r||document.activeElement===t.current;if("none"===n||!e)return;let a=setTimeout(m,0),s=setTimeout(m,2e3),i=setTimeout(m,5e3),l=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(a),clearTimeout(s),clearTimeout(i),clearTimeout(l)}},[t,r,n,m]),{hasPWMBadge:a,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:B,inputRef:L,pushPasswordManagerStrategy:h,isFocused:V}),J=o.useCallback(e=>{let t=e.currentTarget.value.slice(0,d);t.length>0&&O&&!O.test(t)?e.preventDefault():("string"==typeof A&&t.length<A.length&&document.dispatchEvent(new Event("selectionchange")),F(t))},[d,F,A,O]),X=o.useCallback(()=>{var e;if(L.current){let t=Math.min(L.current.value.length,d-1),n=L.current.value.length;null==(e=L.current)||e.setSelectionRange(t,n),K(t),Z(n)}G(!0)},[d]),ee=o.useCallback(e=>{var t,n;let r=L.current;if(!v&&(!z.current.isIOS||!e.clipboardData||!r))return;let a=e.clipboardData.getData("text/plain"),s=v?v(a):a;e.preventDefault();let i=null==(t=L.current)?void 0:t.selectionStart,l=null==(n=L.current)?void 0:n.selectionEnd,o=(i!==l?U.slice(0,i)+s+U.slice(l):U.slice(0,i)+s+U.slice(i)).slice(0,d);if(o.length>0&&O&&!O.test(o))return;r.value=o,F(o);let c=Math.min(o.length,d-1),u=o.length;r.setSelectionRange(c,u),K(c),Z(u)},[d,F,O,U]),et=o.useMemo(()=>
1({position:"relative",cursor:D.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[D.disabled]),en=o.useMemo(()=>({position:"absolute",inset:0,width:Y.willPushPWMBadge?`calc(100% + ${Y.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Y.willPushPWMBadge?`inset(0 ${Y.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:m,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Y.PWM_BADGE_SPACE_WIDTH,Y.willPushPWMBadge,m]),er=o.useMemo(()=>o.createElement("input",S(((e,t)=>{for(var n in t||(t={}))N.call(t,n)&&P(e,n,t[n]);if(E)for(var n of E(t))k.call(t,n)&&P(e,n,t[n]);return e})({autoComplete:D.autoComplete||"one-time-code"},D),C({"data-input-otp":!0,"data-input-otp-placeholder-shown":0===U.length||void 0,"data-input-otp-mss":q,"data-input-otp-mse":Q,inputMode:x,pattern:null==O?void 0:O.source,"aria-placeholder":p,style:en,maxLength:d,value:U,ref:L,onPaste:e=>{var t;ee(e),null==(t=D.onPaste)||t.call(D,e)},onChange:J,onMouseOver:e=>{var t;H(!0),null==(t=D.onMouseOver)||t.call(D,e)},onMouseLeave:e=>{var t;H(!1),null==(t=D.onMouseLeave)||t.call(D,e)},onFocus:e=>{var t;X(),null==(t=D.onFocus)||t.call(D,e)},onBlur:e=>{var t;G(!1),null==(t=D.onBlur)||t.call(D,e)}}))),[J,X,ee,x,en,d,Q,q,D,null==O?void 0:O.source,U]),ea=o.useMemo(()=>({slots:Array.from({length:d}).map((e,t)=>{var n;let r=V&&null!==q&&null!==Q&&(q===Q&&t===q||t>=q&&t<Q),a=void 0!==U[t]?U[t]:null;return{char:a,placeholderChar:void 0!==U[0]?null:null!=(n=null==p?void 0:p[t])?n:null,isActive:r,hasFakeCaret:r&&null===a}}),isFocused:V,isHovering:!D.disabled&&$}),[V,$,d,Q,q,D.disabled,U]),es=o.useMemo(()=>y?y(ea):o.createElement(T.Provider,{value:ea},j),[j,ea,y]);return o.createElement(o.Fragment,null,null!==w&&o.createElement("noscript",null,o.createElement("style",null,w)),o.createElement("div",{ref:B,"data-input-otp-container":!0,style:et,className:b},es,o.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},er)))});function I(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}D.displayName="Input";var R=` 2[data-input-otp] { 3 --nojs-bg: white !important; 4 --nojs-fg: black !important; 5 6 background-color: var(--nojs-bg) !important; 7 color: var(--nojs-fg) !important; 8 caret-color: var(--nojs-fg) !important; 9 letter-spacing: .25em !important; 10 text-align: center !important; 11 border: 1px solid var(--nojs-fg) !important; 12 border-radius: 4px !important; 13 width: 100% !important; 14} 15@media (prefers-color-scheme: dark) { 16 [data-input-otp] { 17 --nojs-bg: black !important; 18 --nojs-fg: white !important; 19 } 20}`;function _({className:e,containerClassName:t,...n}){return(0,s.jsx)(D,{"data-slot":"input-otp",containerClassName:(0,l.cn)("cn-input-otp flex items-center has-disabled:opacity-50 w-full",t),spellCheck:!1,className:(0,l.cn)("disabled:cursor-not-allowed",e),...n})}function M({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"input-otp-group",className:(0,l.cn)("flex items-center rounded-(--ins-radius-md) w-full","sm:h-16 h-13",e),...t})}function U({index:e,className:t,...n}){let r=o.useContext(T),{char:a,hasFakeCaret:i,isActive:c}=r?.slots[e]??{};return(0,s.jsxs)("div",{"data-slot":"input-otp-slot","data-active":c,className:(0,l.cn)("relative flex size-full items-center justify-center","transition-all outline-none","border border-transparent","bg-card-secondary rounded-(--ins-radius-md)","data-[active=true]:z-10","data-[active=true]:border-accent3","ins-text-body-3 text-text-icon-primary",t),...n,children:[a,i&&(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,s.jsx)("div",{className:"duration-1000"})})]})}function A({...e}){return(0,s.jsx)("div",{"data-slot":"input-otp-separator",className:"flex items-center shrink-0 w-(--ins-spacing-xxxs) [&_svg:not([class*='size-'])]:size-4",role:"separator",...e})}function F({autoFocus:e=!0,value:t,setValue:n,onComplete:r,isError:a=!1}){let i=(0,l.cn)(a&&"border-red-500 data-[active=true]:border-red-500 data-[active=true]:ring-2 data-[active=true]:ring-accent3");return(0,s.jsxs)(_,{name:"otp",autoFocus:e,maxLength:6,value:t,onChange:n,onComplete:r,children:[(0,s.jsx)(M,{children:(0,s.jsx)(U,{index:0,className:i})}),(0,s.jsx)(A,{}),(0,s.jsx)(M,{children:(0,s.jsx)(U,{index:1,className:i})}),(0,s.jsx)(A,{}),(0,s.jsx)(M,{children:(0,s.jsx)(U,{index:2,className:i})}),(0,s.jsx)(A,{}),(0,s.jsx)(M,{children:(0,s.jsx)(U,{index:3,className:i})}),(0,s.jsx)(A,{}),(0,s.jsx)(M,{children:(0,s.jsx)(U,{index:4,className:i})}),(0,s.jsx)(A,{}),(0,s.jsx)(M,{children:(0,s.jsx)(U,{index:5,className:i})})]})}var O=e.i(819432),L=e.i(209165),B=e.i(635021),z=e.i(915379),W=e.i(716647),$=e.i(713354),H=e.i(621427),V=e.i(572098),G=e.i(865161),q=e.i(959141),K=e.i(744705),Q=e.i(618566);let Z={social:0,email:1,password:2,verify:3},Y={enter:e=>({opacity:0,x:e>0?16:-16}),center:{opacity:1,x:0},exit:e=>({opacity:0,x:e>0?-16:16})},J={duration:.18,ease:"easeOut"},X={duration:.32,ease:"easeInOut"},ee=new Set(K.routing.locales),et=new Set(function e(t){return[...t.href?[t.href]:[],...t.children?.flatMap(e)??[]]}(W.sideNavList.find(e=>"more-tools"===e.id)??{id:"more-tools",label:"More tools",children:[]}));function en(e,t){return e===t||e.startsWith(`${t}/`)}function er(e){return e.trim()}function ea(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}e.s(["default",0,function(){let e='<p>By continuing, you agree to our <a href="/user-agreement" target="_blank" rel="noopener noreferrer">Terms of Service</a> & <a href="/privacy-policy" target="_blank" rel="noopener noreferrer">Privacy Policy</a></p>',t=(0,Q.usePathname)(),{loginOpen:n,setLoginOpen:r}=(0,B.useDialogStore)(),a=(0,H.useUserStore)(e=>e.setUserData),[c,g]=(0,o.useState)(""),[v,j]=(0,o.useState)(""),[S,C]=(0,o.useState)(!1),[E,N]=(0,o.useState)(""),[k,P]=(0,o.useState)(!1),[T,D]=(0,o.useState)(0),[I,R]=(0,o.useState)(!1),[_,M]=(0,o.useState)(!1),[U,A]=(0,o.useState)(!1),[W,K]=(0,o.useState)(0),[es,ei]=(0,o.useState)(""),[el,eo]=(0,o.useState)("email"),[ec,eu]=(0,o.useState)("social"),[ed,em]=(0,o.useState)(1),ef=(0,o.useRef)(null),ep=(0,o.useRef)(n),ex=()=>{ef.current&&(clearInterval(ef.current),ef.current=null)},eg=e=>{em(Z[e]>
20=Z[ec]?1:-1),eu(e)},eh=e=>{r(e),e||(eu("social"),em(1),g(""),j(""),C(!1),N(""),P(!1),D(0),R(!1),M(!1),A(!1),K(0),ei(""),eo("email"),ex())},ev=()=>{eh(!1)};(0,o.useEffect)(()=>ex,[]),(0,o.useEffect)(()=>{n&&!ep.current&&(0,q.logEvent)("view_login_create",{source:function(e){let t=function(e){let t=e.split("/").filter(Boolean);if(t.length>0&&ee.has(t[0])){let e=`/${t.slice(1).join("/")}`;return"/"===e?"/":e}return e||"/"}(e);if(en(t,"/app"))return"create";for(let e of et)if(en(t,e))return"tools";return"/"===t?"home":en(t,"/blog")?"blog":"other"}(t)}),ep.current=n},[n,t]);let eb=()=>{P(!0),D(e=>e+1)},ew=e=>{a({...e,isLogin:!0}),(0,q.logEvent)("login_success_email"),$.customToast.success("Login successful"),ev(),(0,G.maybeOpenRedInviteDialogAfterLogin)()},ey=async({requestedEmail:e=c,returnStep:t="email"}={})=>{if(I)return!1;let n=er(e);if(!ea(n))return $.customToast.error("Invalid email","Please enter a valid email address."),!1;if(W>0&&n===es)return eo(t),C(!1),eg("verify"),!0;if(W>0)return $.customToast.warning("Please wait",`You can resend a code in ${W}s.`),!1;try{R(!0);let e=(0,L.createApi)(),r=await e.post(z.Urls.USER.sendEmailCode,{email:n});if(!r.success||!r.data)throw Error(r.message||"Failed to send verification code.");return g(n),ei(n),eo(t),N(""),P(!1),D(0),C(!1),eg("verify"),ex(),K(60),ef.current=setInterval(()=>{K(e=>e<=1?(ex(),0):e-1)},1e3),$.customToast.success("Code sent","Please check your inbox."),!0}catch(e){return $.customToast.error("Failed to send code",e instanceof Error?e.message:"Please try again"),!1}finally{R(!1)}},ej=async()=>{if(_||I)return;let e=er(c);if(!ea(e))return void $.customToast.error("Invalid email","Please enter a valid email address.");try{M(!0);let t=(0,L.createApi)(),n=await t.get(z.Urls.USER.extendInfo,{query:{email:e},noCache:!0});if(!n.success||"boolean"!=typeof n.data?.canUsePassword)throw Error(n.message||"Failed to check login method.");if(g(e),j(""),C(!1),n.data.canUsePassword)return void eg("password");await ey({requestedEmail:e,returnStep:"email"})}catch(e){$.customToast.error("Unable to continue",e instanceof Error?e.message:"Please try again")}finally{M(!1)}},eS=async()=>{if(U)return;let e=er(c);if(v.length<8||v.length>12)return void $.customToast.error("Login failed","Password must be 8-12 characters.");try{A(!0);let t=(0,L.createApi)(),n=(0,V.getInvitationCodeFromCookie)(),r=(0,V.getInviteCodeFromCookie)(),a=await t.post(z.Urls.USER.loginByPassword,{email:e,...r?{inviteCode:r}:{},password:v,...n?{invitationCode:n}:{}});if(!a.success||!a.data)throw Error(a.message||"Incorrect Password");ew(a.data)}catch(e){$.customToast.error("Login failed",e instanceof Error?e.message:"Incorrect Password")}finally{A(!1)}},eC=async()=>{let e=er(c),t=E.trim();if(!ea(e)){$.customToast.error("Invalid email","Please enter a valid email address."),eg("email");return}if(6!==t.length){eb(),$.customToast.error("Invalid code","Please enter the 6-digit verification code.");return}try{A(!0);let n=(0,L.createApi)(),r=(0,V.getInvitationCodeFromCookie)(),a=(0,V.getInviteCodeFromCookie)(),s=await n.post(z.Urls.USER.loginByEmail,{code:t,email:e,...a?{inviteCode:a}:{},...r?{invitationCode:r}:{}}),i=s.data;if(!s.success||!i)throw Error(s.message||"Email login failed.");ew(i)}catch(e){eb(),$.customToast.error("Login failed",e instanceof Error?e.message:"Please try again")}finally{A(!1)}};return(0,s.jsxs)(i.Dialog,{open:n,onOpenChange:eh,children:[(0,s.jsx)(i.DialogTrigger,{hidden:!0}),(0,s.jsxs)(i.DialogContent,{showCloseButton:!1,className:(0,l.cn)("bg-card-w-20 rounded-(--ins-radius-3xl) overflow-hidden","sm:max-w-95 backdrop-blur-[10px]"),hasOverlayBg:!0,overlayClassName:"bg-global",onPointerDownOutside:e=>e.preventDefault(),children:[(0,s.jsxs)(i.DialogHeader,{hidden:!0,children:[(0,s.jsx)(i.DialogTitle,{children:"Welcome"}),(0,s.jsx)(i.DialogDescription,{children:"Sign in to access your music creation workspace"})]}),(0,s.jsx)("section",{className:(0,l.cn)("flex w-full flex-col","p-(--ins-spacing-xl) gap-(--ins-spacing-md)"),children:(0,s.jsx)(w.AnimatePresence,{initial:!1,mode:"wait",custom:ed,children:(0,s.jsx)(y.motion.section,{custom:ed,variants:Y,initial:"enter",animate:"center",exit:"exit",transition:J,className:"flex w-full flex-col gap-(--ins-spacing-md)",children:"verify"===ec?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"w-full flex gap-(--ins-spacing-xxs)",children:[(0,s.jsxs)("section",{className:"flex-1 min-w-0 flex flex-col gap-(--ins-spacing-xxxs)",children:[(0,s.jsxs)("button",{className:"flex items-center gap-(--ins-spacing-xxxs)",onClick:()=>eg(el),children:[(0,s.jsx)("div",{className:"size-6 text-text-icon-primary",children:(0,s.jsx)(x.default,{})}),(0,s.jsx)("span",{className:"ins-text-body-3 text-text-icon-primary",children:"Back"})]}),(0,s.jsx)("p",{className:"ins-text-title-5 text-text-icon-primary",children:"Check your inbox"}),(0,s.jsxs)("section",{className:"w-full flex flex-col ins-text-body-4 text-text-icon-secondary",children:[(0,s.jsx)("p",{children:"We sent a verification code"}),(0,s.jsxs)("p",{className:"flex gap-0.5",children:[(0,s.jsx)("span",{children:"to"}),(0,s.jsx)("span",{className:"text-accent2",children:es||c})]})]})]}),(0,s.jsx)("button",{className:"size-6 text-text-icon-tertiray shrink-0",onClick:ev,children:(0,s.jsx)(d.default,{})})]}),(0,s.jsx)("section",{className:"flex w-full flex-col",children:(0,s.jsx)(y.motion.div,{animate:k?{x:[0,-6,6,-4,4,0]}:{x:0},transition:X,children:(0,s.jsx)(F,{isError:k,onComplete:eC,value:E,setValue:e=>{N(e),k&&P(!1)}})},T)}),(0,s.jsx)("section",{className:"flex items-center justify-center w-full",children:(0,s.jsx)(m.default,{onClick:eC,label:"Verify Code",buttonType:"white",size:"large",loading:U,disabled:U||6!==E.trim().length})}),(0,s.jsxs)("section",{className:"flex gap-0.5 w-full items-center justify-center ins-text-body-5 text-text-icon-secondary",children:[(0,s.jsx)("span",{children:"Didn't receive code?"}),(0,s.jsx)("button",{className:"text-accent1",onClick:()=>void ey({requestedEmail:es||c,returnStep:el}),disabled:I||W>0,children:W>0?`Resend ${W}s`:"Resend"})]})]}):"password"===ec?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"w-full flex gap-(--ins-spacing-xxs)",children:[(0,s.jsxs)("section",{className:"flex-1 min-w-0 flex flex-col gap-(--ins-spacing-xxxs)",children:[(0,s.jsxs)("button",{className:"flex w-fit items-center gap-(--ins-spacing-xxxs)",onClick:()=>{j(""),C(!1),eg("email")},children:[(0,s.jsx)("div",{className:"size-6 text-text-icon-primary",children:(0,s.jsx)(x.default,{})}),(0,s.jsx)("span",{className:"ins-text-body-3 text-text-icon-primary",children:"Back"})]}),(0,s.jsx)("p",{className:"truncate ins-text-body-5 text-text-icon-secondary",children:c})]}),(0,s.jsx)("button",{className:"size-6 text-text-icon-tertiray shrink-0",onClick:ev,"aria-label":"Close login dialog",children:(0,s.jsx)(d.default,{})})]}),(0,s.jsxs)("form",{className:"w-full flex flex-col gap-(--ins-spacing-md)",onSubmit:e=>{e.preventDefault(),eS()},children:[(0,s.jsxs)("section",{className:"flex flex-col gap-(--ins-spacing-xxxs) w-full",children:[(0,s.jsx)("p",{className:"ins-text-title-6 text-text-icon-primary",children:"Password"}),(0,s.jsx)(p.default,{text:v,setText:j,name:"password",type:S?"text":"password",maxLength:12,autoComplete:"current-password",placeholder:"Enter your password",trailingElement:(0,s.jsx)("button",{type:"button",className:"size-6 text-text-icon-primary",onClick:()=>C(e=>!e),"aria-label":S?"Hide password":"Show password",children:S?(0,s.jsx)(h,{}):(0,s.jsx)(b,{})})})]}),(0,s.jsx)(m.default,{label:"Sign in",buttonType:"white",size:"large",type:"submit",loading:U,disabled:U||v.length<8||v.length>12})]}),(0,s.jsxs)("section",{className:"flex items-center justify-center gap-0.5 ins-text-body-5 text-text-icon-secondary",children:[(0,s.jsx)("span",{children:"Forget Password?"}),(0,s.jsx)("button",{type:"button",className:"text-accent1",onClick:()=>void ey({requestedEmail:c,returnStep:"password"}),disabled:I,children:I?"Sending...":"Send code"})]}),(0,s.jsx)("section",{className:"flex w-full flex-col gap-2 ins-text-body-5 text-center text-text-icon-tertiray **:[a]:text-accent1",children:(0,s.jsx)(f.default,{html:e})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"flex items-start w-full gap-(--ins-spacing-xxs)",children:[(0,s.jsxs)("section",{className:"flex flex-1 min-w-0 flex-col gap-(--ins-spacing-xxxs)",children:[(0,s.jsx)("p",{className:"ins-text-title-3 text-text-icon-primary",children:"Welcome"}),(0,s.jsx)("p",{className:"ins-text-body-4 text-text-icon-secondary",children:"Sign in to access your music creation workspace"})]}),(0,s.jsx)("button",{className:"size-6 shrink-0 text-text-icon-tertiray",onClick:ev,children:(0,s.jsx)(d.default,{})})]}),"email"===ec?(0,s.jsxs)("form",{className:"w-full flex flex-col gap-(--ins-spacing-md)",onSubmit:e=>{e.preventDefault(),ej()},children:[(0,s.jsxs)("section",{className:"flex flex-col gap-(--ins-spacing-xxxs) w-full",children:[(0,s.jsx)("p",{className:"ins-text-title-6 text-text-icon-primary",children:"Email"}),(0,s.jsx)(p.default,{text:c,setText:e=>{g(e),j(""),C(!1)},name:"email",type:"email",autoComplete:"email",placeholder:"[email protected]"})]}),(0,s.jsx)("section",{className:"flex items-center justify-center",children:(0,s.jsx)(m.default,{label:"Sign in",buttonType:"white",size:"large",type:"submit",loading:_||I,disabled:_||I})})]}):(0,s.jsxs)("section",{className:"flex w-full flex-col gap-(--ins-spacing-md)",children:[(0,s.jsx)(O.default,{}),(0,s.jsxs)("section",{className:"flex items-center justify-center w-full gap-(--ins-spacing-xxs)",children:[(0,s.jsx)("div",{className:"flex flex-1 min-w-0 h-[0.5] bg-card-w-20"}),(0,s.jsx)("div",{className:"ins-text-body-5 text-text-icon-tertiray",children:"or"}),(0,s.jsx)("div",{className:"flex flex-1 min-w-0 h-[0.5] bg-card-w-20"})]}),(0,s.jsx)("section",{className:"flex items-center justify-center w-full",children:(0,s.jsx)(m.default,{buttonType:"line",icon:u,label:"Continue with Email",size:"large",onClick:()=>{(0,q.logEvent)("click_login_email"),eg("email")}})})]}),(0,s.jsx)("section",{className:"flex w-full flex-col gap-2 ins-text-body-5 text-center text-text-icon-tertiray **:[a]:text-accent1",children:(0,s.jsx)(f.default,{html:e})})]})}
20,ec)})})]})]})}],916464)},372381,e=>{"use strict";var t=e.i(271645),n=e.i(520133),r=e.i(931124),a=e.i(621427);e.s(["default",0,function(){let e=(0,n.usePathname)(),s=(0,a.useUserStore)(e=>e.token),i=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{!s||i.current||(async()=>{try{i.current=!0,await (0,r.refreshCurrentUser)({silent:!0})}finally{i.current=!1}})()},[e,s]),null}])},417359,e=>{"use strict";var t=e.i(271645),n=e.i(713354),r=e.i(635021),a=e.i(621427),s=e.i(207020);function i(e){r.useDialogStore.getState().openUpgradeDialog(e?{billingTab:e}:void 0)}function l(e){return e?.trim()||"Insufficient credits."}var o=e.i(959141),c=e.i(716647),u=e.i(744705),d=e.i(797103),m=e.i(618566);let f=new Set(u.routing.locales),p=new Set(function e(t){return[...t.href?[t.href]:[],...t.children?.flatMap(e)??[]]}(c.sideNavList.find(e=>"more-tools"===e.id)??{id:"more-tools",label:"More tools",children:[]}));e.s(["default",0,function(){let e=(0,m.usePathname)(),r=(0,a.useUserStore)(e=>!!e.isVip);return(0,t.useEffect)(()=>{let t=t=>{var c;let u,m;if(!(t instanceof CustomEvent))return;let x=(u=(c=t.detail).code,m=!!a.useUserStore.getState().isVip,u===s.INSUFFICIENT_CREDITS_CODE?(n.customToast.error(l(c.message)),i("lifetime"),!0):u===s.UPGRADE_REQUIRED_CODE&&(m&&n.customToast.error(l(c.message)),i(),!0)),g=function(e){let t=function(e){let t=e.split("/").filter(Boolean);if(t.length>0&&f.has(t[0])){let e=`/${t.slice(1).join("/")}`;return"/"===e?"/":e}return e||"/"}(e);for(let e of p)if(t===e||t.startsWith(`${e}/`))return t.replace(/^\/+/,"").replaceAll(/[/-]/g,"_");return null}(e),h=function({code:e,isVip:t}){return e===s.INSUFFICIENT_CREDITS_CODE?!t:e===s.UPGRADE_REQUIRED_CODE}({code:t.detail.code,isVip:r});x&&h&&(0,d.setPurchaseSuccessSourceContext)((0,d.getPurchaseSuccessSourceForPathname)(e)),x&&g&&h&&(0,o.logEvent)("view_purchase_popup_tools",{source:g})};return window.addEventListener(s.INSUFFICIENT_CREDITS_EVENT,t),()=>{window.removeEventListener(s.INSUFFICIENT_CREDITS_EVENT,t)}},[r,e]),null}],417359)},689630,e=>{"use strict";var t=e.i(271645),n=e.i(934399),r=e.i(931124),a=e.i(959141),s=e.i(797103),i=e.i(621427);e.s(["default",0,function(){let e=(0,n.useUserStoreHydrated)(),l=(0,i.useUserStore)(e=>e.token),o=(0,t.useRef)(!1),c=(0,t.useRef)(0),u=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let t=!1;async function n(){if(t||!e||!l||o.current||"hidden"===document.visibilityState)return;let d=(0,s.getPendingPurchaseCheckout)();if(!d){c.current=0;return}try{if(o.current=!0,!await (0,r.refreshCurrentUser)({silent:!0,errorLogMessage:"æ¯ä»æååç¹å·æ°ç¨æ·ä¿¡æ¯å¤±è´¥ï¼"})||t)return;let e=(0,s.getPurchaseUserSnapshot)(i.useUserStore.getState());if(!(0,s.hasPurchaseSucceeded)({after:e,before:d.before})){c.current<5&&!u.current&&(c.current+=1,u.current=window.setTimeout(()=>{u.current=null,n()},3e3));return}(0,s.markPurchaseSuccessReported)({after:e,checkout:d})&&(0,a.logEvent)("purchase_success",{source:d.source}),(0,s.emitPurchaseSucceeded)({after:e,checkout:d}),(0,s.clearPendingPurchaseCheckout)(),c.current=0}finally{o.current=!1}}n();let d=()=>{n()};return window.addEventListener("focus",d),document.addEventListener("visibilitychange",d),()=>{t=!0,window.removeEventListener("focus",d),document.removeEventListener("visibilitychange",d),u.current&&(window.clearTimeout(u.current),u.current=null)}},[e,l]),null}])},953001,e=>{"use strict";var t=e.i(271645),n=e.i(618566),r=e.i(125609);e.s(["default",0,function(){let e=(0,n.usePathname)(),a=(0,n.useSearchParams)(),s=(0,t.useRef)(null),i=a.toString();return(0,t.useEffect)(()=>()=>{(0,r.stopAudioPreviewPlayback)()},[]),(0,t.useEffect)(()=>{let t=i?`${e}?${i}`:e;if(null===s.current){s.current=t;return}s.current!==t&&(s.current=t,(0,r.stopAudioPreviewPlayback)())},[e,i]),null}])},336373,e=>{"use strict";var t=e.i(271645),n=e.i(618566),r=e.i(572098);e.s(["default",0,function(){let e=(0,n.useSearchParams)().get("invitationCode");return(0,t.useEffect)(()=>{e&&(0,r.setInvitationCodeCookie)(e)},[e]),null}])},752164,e=>{"use strict";var t=e.i(271645);e.s(["default",0,function(){return(0,t.useEffect)(()=>{e.A(918122).then(({resumeVoiceCloningTasks:e})=>{e()})},[]),null}])},84295,e=>{"use strict";var t=e.i(271645);e.s(["default",0,function(){return(0,t.useEffect)(()=>{e.A(520265).then(({resumeSongCoverTask:e})=>{e()})},[]),null}])},708972,e=>{"use strict";var t=e.i(618566),n=e.i(271645),r=e.i(959141);e.s(["default",0,function(){let e=(0,t.usePathname)(),a=(0,t.useSearchParams)(),s=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=`${e}${a.toString()?`?${a.toString()}`:""}`,n="(direct)";null===s.current?document.referrer&&!document.referrer.startsWith(window.location.origin)&&(n=document.referrer):n=s.current,s.current!==t&&(0,r.logEvent)("page_view",{page_title:document.title,page_path:t,page_location:window.location.href,page_referrer:n}),s.current=t},[e,a]),null}])},924715,e=>{"use strict";var t=e.i(843476),n=e.i(776639),r=e.i(975157),a=e.i(99832),s=e.i(735898),i=e.i(271645),l=e.i(635021),o=e.i(653498),c=e.i(865161),u=e.i(713354);e.s(["default",0,function(){let{invitationOpen:e,setInvitationOpen:d}=(0,l.useDialogStore)(),[m,f]=(0,i.useState)(""),[p,x]=(0,i.useState)(!1),[g,h]=(0,i.useState)(!1),v=e=>{d(e),e||(f(""),x(!1),h(!1))},b=()=>
20{v(!1)},w=async()=>{let e=m.trim();if(e&&!p)try{x(!0),h(!1),await (0,c.bindRedInviteCode)(e),u.customToast.success("Congratulations! 10 credits awarded."),b()}catch(e){h(!0)}finally{x(!1)}};return(0,t.jsxs)(n.Dialog,{open:e,onOpenChange:v,children:[(0,t.jsx)(n.DialogTrigger,{hidden:!0}),(0,t.jsxs)(n.DialogContent,{showCloseButton:!1,className:(0,r.cn)("bg-card-w-20 rounded-(--ins-radius-3xl) overflow-hidden","sm:max-w-95 backdrop-blur-[10px]"),hasOverlayBg:!0,overlayClassName:"bg-global",onPointerDownOutside:e=>e.preventDefault(),children:[(0,t.jsxs)(n.DialogHeader,{hidden:!0,children:[(0,t.jsx)(n.DialogTitle,{children:"Invitation Code"}),(0,t.jsx)(n.DialogDescription,{children:"If you learn about Insmelo through a influencer, enter their invite code to instantly get free credits."})]}),(0,t.jsxs)("section",{className:(0,r.cn)("flex w-full flex-col","p-(--ins-spacing-xl) gap-(--ins-spacing-lg)"),children:[(0,t.jsxs)("section",{className:"flex items-start w-full gap-(--ins-spacing-xxs)",children:[(0,t.jsxs)("section",{className:"flex flex-1 min-w-0 flex-col gap-(--ins-spacing-xxxs)",children:[(0,t.jsx)("p",{className:"ins-text-title-5 text-text-icon-primary",children:"Invitation Code"}),(0,t.jsx)("p",{className:"ins-text-body-4 text-text-icon-secondary",children:"If you learn about Insmelo through a influencer, enter the
20ir invite code to instantly get free credits."})]}),(0,t.jsx)("button",{className:"size-6 shrink-0 text-text-icon-tertiray",onClick:b,type:"button",disabled:p,children:(0,t.jsx)(s.default,{})})]}),(0,t.jsxs)("section",{className:"w-full flex flex-col gap-(--ins-spacing-xxs)",children:[(0,t.jsx)(a.default,{text:m,setText:e=>{f(e),g&&h(!1)},name:"invitation-code",placeholder:"Please enter code",maxLength:50,hasMaxLength:!1,className:"rounded-(--ins-radius-sm)",disabled:p}),g?(0,t.jsx)("p",{className:"ins-text-body-5 text-functional-error",children:"Invalid invite code."}):null]}),(0,t.jsxs)("section",{className:"flex w-full flex-col gap-(--ins-spacing-xs)",children:[(0,t.jsx)(o.default,{label:"Confirm",size:"large",buttonType:"white",loading:p,disabled:""===m.trim()||p,onClick:w,className:"lg:h-12 h-11 rounded-lg"}),(0,t.jsx)(o.default,{label:"Skip",size:"large",buttonType:"line",disabled:p,onClick:b,className:"lg:h-12 h-11 rounded-lg"})]})]})]})]})}])},785808,e=>{"use strict";var t=e.i(843476),n=e.i(776639),r=e.i(975157),a=e.i(759684),s=e.i(635021),i=e.i(735898),l=e.i(655887);let o=[{key:"free",name:"Free",className:"text-text-icon-secondary"},{key:"pro",name:"Pro",className:"bg-pro text-transparent bg-clip-text"},{key:"ultra",name:"Ultra",className:"bg-ultra text-transparent bg-clip-text"}],c=[{title:"01 High-quality music generation for all scenarios",features:[{name:"Turn lyrics or ideas into Songs",plans:{free:!1,pro:!0,ultra:!0}},{name:"Turn images into songs",plans:{free:!1,pro:!0,ultra:!0}},{name:"Turn humming into songs",plans:{free:!1,pro:!0,ultra:!0}},{name:"Turn melodies into songs",plans:{free:!1,pro:!0,ultra:!0}},{name:"Add vocals to instruments",plans:{free:!1,pro:!0,ultra:!0}}
20,{name:"Access to newest models",plans:{free:!1,pro:!0,ultra:!0}}]},{title:"02 Commercial Use License",features:[{name:"MP3 download",plans:{free:!0,pro:!0,ultra:!0}},{name:"WAV download",plans:{free:!1,pro:!0,ultra:!0}},{name:"MIDI export",plans:{free:!1,pro:!1,ultra:!0}}]},{title:"03 Full Access to Advanced Remix",features:[{name:"Vocal isolation",plans:{free:!1,pro:!1,ultra:!0}},{name:"Stem separation",plans:{free:!1,pro:!1,ultra:!0}},{name:"Arrangement/Cover",plans:{free:!1,pro:!1,ultra:!0}},{name:"Music extension",plans:{free:!1,pro:!1,ultra:!0}},{name:"Replace segments",plans:{free:!1,pro:!1,ultra:!0}},{name:"Save timbre",plans:{free:!1,pro:!1,ultra:!0}},{name:"Extract & Sample ",plans:{free:!1,pro:!1,ultra:!0}}]},{title:"04 Advanced AI Tools",features:[{name:"Create Music Video",plans:{free:!1,pro:!0,ultra:!0}},{name:"Voice cloning",plans:{free:!1,pro:!1,ultra:!0}},{name:"Al Song Cover",plans:{free:!1,pro:!1,ultra:!0}},{name:"Sound effect generation",plans:{free:!0,pro:!0,ultra:!0}},{name:"Lyrics generation",plans:{free:!0,pro:!0,ultra:!0}}]}];var u=e.i(555521);let d="w-[52px] md:w-[200px]",m="border-b border-r border-card-w-05 last:border-r-0";function f(){return(0,t.jsxs)("section",{className:"w-full flex flex-col gap-(--ins-spacing-md)",children:[(0,t.jsx)("h2",{className:"ins-text-title-5 text-text-icon-primary",children:"Compare all benefits"}),(0,t.jsx)("section",{className:(0,r.cn)("w-full overflow-hidden","rounded-(--ins-radius-xl) border border-card-w-20"),children:(0,t.jsxs)("table",{className:"w-full table-fixed border-collapse bg-card-primary",children:[(0,t.jsxs)("colgroup",{children:[(0,t.jsx)("col",{className:"w-auto"}),o.map(e=>(0,t.jsx)("col",{className:d},e.key))]}),(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:(0,r.cn)(m,"border-b-0")}),o.map(e=>(0,t.jsx)("th",{className:(0,r.cn)(d,m,"border-b-0","py-(--ins-spacing-xs)","ins-text-body-4 font-bold md:ins-text-title-6"),children:(0,t.jsx)("span",{className:(0,r.cn)(e?.className),children:e.name})},e.key))]})}),(0,t.jsx)("tbody",{children:c.map(e=>(0,t.jsx)(p,{group:e},e.title))})]})})]})}function p({group:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:o.length+1,className:(0,r.cn)("bg-card-tertiary","py-(--ins-spacing-xs) px-(--ins-spacing-md)","ins-text-body-4 font-bold text-text-icon-primary"),children:e.title})}),e.features.map((n,a)=>{let s=a===e.features.length-1;return(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:(0,r.cn)(m,s&&"border-b-0","py-(--ins-spacing-xs) px-(--ins-spacing-md)","ins-text-body-4 text-text-icon-secondary"),children:n.name}),o.map(e=>{let a=n.plans[e.key];return(0,t.jsx)("td",{className:(0,r.cn)(m,s&&"border-b-0","py-(--ins-spacing-xs) px-(--ins-spacing-md)","text-center ins-text-body-4",a?"text-text-icon-primary":"text-text-icon-secondary"),children:a?(0,t.jsx)(u.default,{className:"size-5 mx-auto"}):"-"},e.key)})]},n.name)})]})}function x({children:e,className:n,as:a="main"}){return(0,t.jsx)(a,{className:(0,r.cn)("ins-main-container",n),children:e})}e.s(["default",0,function(){let{upgradeOpen:e,setUpgradeOpen:o,closeUpgradeDialog:c,pricingBillingTab:u}=(0,s.useDialogStore)();return(0,t.jsxs)(n.Dialog,{open:e,onOpenChange:e=>{e?o(!0):c()},children:[(0,t.jsx)(n.DialogTrigger,{hidden:!0}),(0,t.jsxs)(n.DialogContent,{showCloseButton:!1,className:(0,r.cn)("bg-card-primary rounded-none overflow-hidden","w-full max-w-dvw max-h-dvh h-full"),onPointerDownOutside:e=>e.preventDefault(),children:[(0,t.jsxs)(n.DialogHeader,{hidden:!0,children:[(0,t.jsx)(n.DialogTitle,{children:"Subscribe InsMelo, Unlock More"}),(0,t.jsx)(n.DialogDescription,{})]}),(0,t.jsxs)("section",{className:(0,r.cn)("flex flex-1 min-w-0 relative","max-h-dvh h-full"),children:[(0,t.jsx)("button",{className:(0,r.cn)("absolute top-(--ins-spacing-sm) right-(--ins-spacing-sm)","size-6 text-text-icon-primary z-1"),onClick:c,children:(0,t.jsx)(i.default,{})}),(0,t.jsx)(a.ScrollArea,{showScrollbars:!0,className:(0,r.cn)("min-h-0 flex-1","[&_[data-slot=scroll-area-scrollbar][data-orientation=vertical]]:right-2!","[&_[data-slot=scroll-area-scrollbar][data-orientation=vertical]]:w-2.5","[&_[data-slot=scroll-area-scrollbar][data-orientation=vertical]]:py-2","**:data-[slot=scroll-area-thumb]:bg-card-w-20"),viewportClassName:"scroll-smooth",children:(0,t.jsxs)("section",{className:"flex flex-col gap-(--ins-spacing-page-height) min-w-0
20w-full overflow-hidden",children:[(0,t.jsx)(l.default,{defaultBillingTab:u}),(0,t.jsx)(x,{as:"section",children:(0,t.jsx)(f,{})})]})})]})]})]})}],785808)}]);
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.