PageSourceSearch

https://lp.topview.ai/_next/static/chunks/140-5fe90c7d40f0bcba.js

js topview.ai collected 2026-10-01 12:26:02 UTC 11,657 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[140],{7113:(e,t,r)=>{r.d(t,{L:()=>c,X:()=>o});var n=r(78013),a=r(7597),i=r(64533),s=r(31409),o=function(e){return e.CREDIT="credit",e.UNLIMITED="unlimited",e}({});let l=new Set([...s.vq,...s.oK,...s.mX]),d=new Set([s.RJ.PRO_ANNUAL,s.RJ.BUSINESS_ANNUAL,s.RJ.BUSINESS_MONTH]);function c(){let e=(0,a.vc)(i.ec),t=(0,a.vc)(i.up),r=(0,n.useMemo)(()=>!!e.subsType&&l.has(e.subsType),[e.subsType]),s=(0,n.useMemo)(()=>!!r&&d.has(e.subsType),[r,e.subsType]),[o,c]=(0,n.useState)("credit"),u=(0,n.useCallback)(e=>{("unlimited"!==e||s)&&c(e)},[s]),p=t.remainCredit;return{hasUnlimited:s,generationMode:o,setGenerationMode:u,isLowCredits:p>0&&p<100,isPaidUser:r,remainCredits:p}}},27690:(e,t,r)=>{r.d(t,{U:()=>b});var n=r(91081),a=r(14122),i=r(62145),s=r(87085),o=r(78013),l=r(84890),d=r(46788),c=r(38219),u=r(54047),p=r(36446),x=r(7113);let f="generation_mode_promo_dismissed";function h(e){let{credits:t,disabled:r=!1,className:a}=e,{hasUnlimited:i,generationMode:h,setGenerationMode:b,isLowCredits:m}=(0,x.L)(),[g,w]=(0,o.useState)(!1),v=(0,o.useRef)(null),[N,y]=(0,o.useState)(!1);(0,o.useEffect)(()=>{localStorage.getItem(f)||y(!0)},[]),(0,o.useEffect)(()=>{if(!g)return;let e=e=>{v.current&&!v.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]),(0,o.useEffect)(()=>{if(!g)return;let e=e=>{"Escape"===e.key&&w(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[g]);let j=(0,o.useCallback)(()=>{r||w(e=>!e)},[r]),k=(0,o.useCallback)(()=>{r||(w(!0),y(!1),localStorage.setItem(f,"1"))},[r]),U=(0,o.useCallback)(e=>{(i||e!==x.X.UNLIMITED)&&(b(e),w(!1))},[i,b]),C=(0,o.useCallback)(()=>{window.open("/pricing","_blank"),w(!1)},[]),S=h===x.X.UNLIMITED;return(0,n.jsxs)("div",{className:(0,s.cn)("relative inline-flex items-center gap-1.5 shrink-0",a),ref:v,children:[(0,n.jsx)("button",{type:"button",className:(0,s.cn)("inline-flex items-center gap-1 text-xs font-medium font-mono whitespace-nowrap cursor-pointer py-0.5 px-1.5 rounded-sm transition-all duration-150 relative","text-white/35 hover:bg-white/[0.06] hover:text-white/50",g&&"bg-white/[0.06] text-white/50",r&&"cursor-default opacity-60 hover:bg-transparent hover:text-white/35",S&&"text-green-400 hover:text-green-300 hover:bg-green-400/[0.08]",S&&g&&"text-green-300 bg-green-400/[0.08]"),onClick:j,"aria-label":S?"Unlimited mode - Free":"Credits: ".concat(t),children:S?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"text-base font-bold leading-none tracking-tight",children:"∞"}),(0,n.jsx)("span",{children:"Free"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"inline-flex items-center shrink-0",children:(0,n.jsx)(l.A,{size:14})}),(0,n.jsx)("span",{children:t})]})}),N&&!g&&(0,n.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 py-[3px] px-2.5 rounded-full text-[11px] font-medium whitespace-nowrap cursor-pointer text-green-300 bg-green-400/[0.06] border border-green-400/[0.18] absolute bottom-[calc(100%+6px)] left-1/2 -translate-x-1/2 overflow-hidden transition-all duration-500 z-10 animate-in fade-in slide-in-from-bottom-1 hover:bg-green-400/[0.12] hover:border-green-400/[0.35] hover:text-green-200 max-[480px]:static max-[480px]:translate-x-0",onClick:k,children:[(0,n.jsx)("span",{className:"inline-flex items-center text-base font-bold leading-none",children:"∞"}),(0,n.jsx)("span",{children:"Try Unlimited"}),(0,n.jsx)(d.A,{size:11,className:"opacity-60"})]}),!N&&m&&!i&&!g&&!S&&(0,n.jsx)("span",{className:"inline-flex items-center gap-[3px] absolute bottom-[calc(100%+6px)] left-1/2 -translate-x-1/2 text-[10px] text-green-400/70 cursor-pointer whitespace-nowrap z-10 hover:text-green-400",onClick:j,children:"or try Unlimited"}),g&&(0,n.jsxs)("div",{className:"absolute bottom-[calc(100%+10px)] right-0 w-[260px] p-0 bg-[#1a1a1a] border border-white/[0.08] rounded-[14px] shadow-[0_8px_32px_rgba(0,0,0,0.55),0_0_0_1px_rgba(255,255,255,0.03)] z-[200] overflow-hidden animate-in fade-in slide-in-from-bottom-1.5 duration-200",children:[(0,n.jsxs)("div",{className:"p-3.5 flex flex-col gap-2",children:[(0,n.jsxs)("button",{type:"button",className:(0,s.cn)("flex items-center gap-2.5 py-2.5 px-3 rounded-[10px] border border-white/[0.06] bg-white/[0.02] cursor-pointer transition-all duration-150 w-full text-left hover:bg-white/[0.05] hover:border-white/10",!S&&"border-white/[0.22] bg-white/[0.05] hover:bg-white/[0.05]"),onClick:()=>U(x.X.CREDIT),children:[(0,n.jsx)("div",{className:"flex items-center justify-center w-[34px] h-[34px] rounded-[9px] bg-white/[0.05] shrink-0 text-white/70",children:(0,n.jsx)(c.A,{size:16})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("div",{className:"text-[13px] font-medium text-white/90 leading-[1.2]",children:"Credit Mode"}),(0,n.jsxs)("div",{className:"text-[11px] text-white/35 leading-[1.3] mt-px",children:["Pri
1ority speed \xb7 ",t," credits"]})]}),(0,n.jsx)("div",{className:(0,s.cn)("w-4 h-4 rounded-full border-[1.5px] border-white/15 shrink-0 relative transition-colors duration-150",!S&&"border-white/70 after:content-[''] after:absolute after:top-1/2 after:left-1/2 after:-translate-x-1/2 after:-translate-y-1/2 after:w-[7px] after:h-[7px] after:rounded-full after:bg-white")})]}),(0,n.jsxs)("button",{type:"button",className:(0,s.cn)("flex items-center gap-2.5 py-2.5 px-3 rounded-[10px] border border-white/[0.06] bg-white/[0.02] cursor-pointer transition-all duration-150 w-full text-left hover:bg-white/[0.05] hover:border-white/10",S&&"border-white/[0.22] bg-white/[0.05] hover:bg-white/[0.05]",!i&&"cursor-default opacity-45 hover:bg-white/[0.02] hover:border-white/[0.06]"),onClick:()=>i&&U(x.X.UNLIMITED),children:[(0,n.jsx)("div",{className:"flex items-center justify-center w-[34px] h-[34px] rounded-[9px] bg-green-400/[0.08] shrink-0 text-green-400",children:(0,n.jsx)("span",{className:"text-lg font-bold leading-none",children:"∞"})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("div",{className:"text-[13px] font-medium text-white/90 leading-[1.2]",children:"Unlimited Mode"}),(0,n.jsx)("div",{className:"text-[11px] text-white/35 leading-[1.3] mt-px",children:"Free \xb7 Standard queue speed"})]}),i?(0,n.jsx)("div",{className:(0,s.cn)("w-4 h-4 rounded-full border-[1.5px] border-white/15 shrink-0 relative transition-colors duration-150",S&&"border-white/70 after:content-[''] after:absolute after:top-1/2 after:left-1/2 after:-translate-x-1/2 after:-translate-y-1/2 after:w-[7px] after:h-[7px] after:rounded-full after:bg-white")}):(0,n.jsx)("span",{className:"flex items-center text-white/30 shrink-0",children:(0,n.jsx)(u.A,{size:14})})]})]}),!i&&(0,n.jsx)("div",{className:"p-3.5 flex flex-col gap-2.5 bg-gradient-to-b from-green-400/[0.04] to-green-400/10 border-t border-green-400/10",children:(0,n.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-1.5 h-[34px] px-4 rounded-[9px] bg-green-400 border-none text-[#0a1a0f] text-xs font-semibold cursor-pointer transition-all duration-150 hover:bg-teal-300 active:scale-[0.98]",onClick:C,children:["Upgrade to Unlimited",(0,n.jsx)(p.A,{size:13})]})})]})]})}function b(e){let{charCount:t,maxCharCount:r,creditsDisplay:o,credits:l,canSubmit:d,isLoading:c=!1,onSubmit:u,submitTooltip:p}=e,x=!d||c,f=(0,n.jsx)("button",{type:"button",className:(0,s.cn)("w-8 h-8 flex items-center justify-center rounded-lg bg-white/[0.08] text-white/25 cursor-not-allowed transition-all duration-200 p-0 border-none shrink-0",!x&&"bg-white text-black cursor-pointer shadow-[0_2px_8px_rgba(255,255,255,0.1)] hover:bg-[#f0f0f0] hover:scale-105 hover:-translate-y-px hover:shadow-[0_4px_16px_rgba(255,255,255,0.15)] active:scale-95"),onClick:u,disabled:x,"aria-label":"Generate",children:c?(0,n.jsx)(a.A,{size:16,className:"animate-spin"}):(0,n.jsx)(i.A,{size:16})}),b=null!=l?l:o?Number(o):void 0;return(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[r<Number.MAX_SAFE_INTEGER&&t>Math.floor(.8*r)&&(0,n.jsxs)("span",{className:(0,s.cn)("text-[11px] font-medium text-white/35 tabular-nums whitespace-nowrap transition-colors duration-150",t>r&&"text-red-500",t>Math.floor(.9*r)&&t<=r&&"text-amber-500"),children:[t,"/",r]}),void 0!==o&&void 0!==b&&!isNaN(b)&&(0,n.jsx)(h,{credits:b,disabled:c}),void 0!==p?(0,n.jsx)("div",{className:"ncs-submit-tooltip relative inline-flex","data-tooltip":p,children:f}):f]})}},57015:(e,t,r)=>{r.d(t,{A:()=>c,W:()=>s});var n=r(78013),a=r(33566),i=r(44542);let s="agent/public/upload";function o(e){return!!e&&"object"==typeof e&&"string"==typeof e.url&&!!e.fields&&"object"==typeof e.fields}async function l(e,t,r){let n;try{return await Promise.race([e,new Promise((e,a)=>{n=setTimeout(()=>a(Error(r)),t)})])}finally{n&&clearTimeout(n)}}function d(e,t){t&&(e.upload.onprogress=e=>{e.lengthComputable&&t({loaded:e.loaded,total:e.total})})}function c(){let e=(0,i.Ak)(a._.common.aws.addNewS3AgentPublicUploadURL.useMutation()),t=(0,n.useRef)(e);t.current=e;let r=(0,n.useCallback)(async(e,r,n)=>{var a=await l(t.current.mutateAsync({s3Path:e,mimeType:r,fileSize:n}),15e3,"Get S3 pre-signed URL timed out");if("string"==typeof a||o(a))return a;
1if(a&&"object"==typeof a){let e=a.data;if("string"==typeof e||o(e))return e}throw Error("Failed to get S3 pre-signed URL")},[]);return{uploadPublicFileByPreUrl:(0,n.useCallback)(async e=>{let{s3Path:t,file:n,mimeType:a,handleUploadProgress:i}=e,s=2;for(;s>0;)try{let e="string"==typeof n?await (await fetch(n)).blob():n,s=await r(t,a,e.size);return await function(e){let{target:t,body:r,mimeType:n,handleUploadProgress:a}=e;return"string"==typeof t?function(e){let{uploadUrl:t,body:r,mimeType:n,handleUploadProgress:a}=e;return new Promise((e,i)=>{let s=new XMLHttpRequest;s.open("PUT",t,!0),s.setRequestHeader("Content-Type",n),d(s,a),s.onload=()=>{if(s.status>=200&&s.status<300)return void e();i(Error("Upload failed with status: ".concat(s.status)))},s.onerror=()=>i(Error("Network error during upload")),s.onabort=()=>i(Error("Upload aborted")),s.send(r)})}({uploadUrl:t,body:r,mimeType:n,handleUploadProgress:a}):function(e){let{uploadUrl:t,fields:r,body:n,handleUploadProgress:a}=e;return new Promise((e,i)=>{let s=new FormData;Object.entries(r).forEach(e=>{let[t,r]=e;s.append(t,r)}),s.append("file",n);let o=new XMLHttpRequest;o.open("POST",t,!0),d(o,a),o.onload=()=>{if(o.status>=200&&o.status<300)return void e();i(Error("Upload failed with status: ".concat(o.status)))},o.onerror=()=>i(Error("Network error during upload")),o.onabort=()=>i(Error("Upload aborted")),o.send(s)})}({uploadUrl:t.url,fields:t.fields,body:r,handleUploadProgress:a})}({target:s,body:e,mimeType:a,handleUploadProgress:i}),{status:"success"}}catch(e){if(console.warn("[useBackendS3Upload] Upload attempt failed, retries left: ".concat(s-1),e),0==--s)return{status:"fail",errorMsg:e instanceof Error?e.message:"Upload failed"}}return{status:"fail",errorMsg:"Unexpected error"}},[r]),AGENT_PUBLIC_UPLOAD_PATH:s}}},64533:(e,t,r)=>{r.d(t,{ec:()=>l,f6:()=>i,uM:()=>o,up:()=>d,y:()=>s});var n=r(7597),a=r(92341);let i=(0,n.eU)({key:"NCS_AdVideoTemplateCommandState",default:null}),s=(0,n.eU)({key:"NCS_HomeActiveTabState",default:a.XB.STORYLINE}),o=(0,n.eU)({key:"NCS_VideoAgentVersionState",default:a.n0.CANVAS}),l=(0,n.eU)({key:"NCS_teamBenefitState",default:{packageNumber:0,subscriptionId:"",payPrice:0,subsType:"",subscriptionStatus:"",latestInvoiceId:"",subtotal:0,paidMethod:""}}),d=(0,n.eU)({key:"NCS_teamCreditState",default:{allPaidCredit:0,remainCredit:0}})}}]);

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.