PageSourceSearch

https://lp.topview.ai/_next/static/chunks/2870-aac648baf0bc4925.js

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

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2870],{17029:(t,e,a)=>{a.d(e,{Lh:()=>d,Nh:()=>m,YJ:()=>u,ls:()=>c});var r=a(88531),i=a(92341),o=a(31409),n=a(2617);function s(t){return"number"==typeof t&&Number.isFinite(t)&&t>0?t:void 0}function l(t){return"number"==typeof t&&Number.isFinite(t)&&t>0?t:void 0}function u(t){var e,a,r,o,u,c;let{prompt:m,agentModelId:d,agentModelName:h,modelId:f,modelName:g,uploadedAssets:p,aspectRatio:v,duration:w,templateId:y,source:b,creationMode:P="agent",autoSubmit:F,agentDefaultUseVideoMode:S}=t,D=(d||f||"").trim(),E=(h||g||"").trim(),R=(0,n.xY)(m.trim()),I=function(t){let e=[],a=[],r=[];for(let o of t){if(o.uploadStatus!==i.A8.SUCCESS||!o.filePath)continue;let t=o.label.replace(/\s+/g,""),n=o.label.trim()||void 0,u=s(o.width),c=s(o.height),m="string"==typeof o.format&&o.format.trim()?o.format.trim():void 0;switch(o.type){case i.zu.IMAGE:e.push({name:t,s3Path:o.filePath,...void 0!==u?{width:u}:{},...void 0!==c?{height:c}:{},...m?{format:m}:{},...n?{label:n}:{}});break;case i.zu.VIDEO:{let e=l(o.originalDuration);a.push({name:t,s3Path:o.filePath,...void 0!==e?{duration:e}:{},...void 0!==u?{width:u}:{},...void 0!==c?{height:c}:{},...m?{format:m}:{},...n?{label:n}:{}});break}case i.zu.AUDIO:{let e=l(o.originalDuration);r.push({name:t,s3Path:o.filePath,...void 0!==e?{duration:e}:{},...n?{label:n}:{}})}}}return{...e.length>0?{images:e}:{},...a.length>0?{videos:a}:{},...r.length>0?{audios:r}:{}}}(p),C=(null!=(o=null==(e=I.images)?void 0:e.length)?o:0)>0||(null!=(u=null==(a=I.videos)?void 0:a.length)?u:0)>0||(null!=(c=null==(r=I.audios)?void 0:r.length)?c:0)>0,A=function(t){if(null!=t&&Number.isFinite(t)&&!(t<=0))return Math.round(t)}(w),T="string"==typeof v&&v.trim()?v.trim():void 0,U={type:"submitAgent",prompt:R,creationMode:P,...D?{agentModelId:D}:{},...E?{agentModelName:E}:{},...T?{videoRatio:T}:{},...void 0!==A?{durationSeconds:A}:{},...y?{templateId:y}:{},...void 0!==F?{autoSubmit:F}:{}},N={source:null!=b?b:"official-website",...(null==S?void 0:S.trim())?{agentDefaultUseVideoMode:S.trim()}:{}};return{tempData:{canvasParameters:{...C?{resources:I}:{},actions:[U],settings:N},resources:[]}}}function c(t){return{tempData:{canvasParameters:function(t){var e;let a=t.prompt.trim(),r=t.modelId.trim(),o="string"==typeof t.aspectRatio?t.aspectRatio.trim():"",n="string"==typeof t.resolution?t.resolution.trim():"",l=[];for(let e of t.images){if(e.uploadStatus!==i.A8.SUCCESS||!e.filePath)continue;let t=s(e.width),a=s(e.height),r="string"==typeof e.format&&e.format.trim()?e.format.trim():void 0;l.push({name:"Image".concat(l.length+1),s3Path:e.filePath,...void 0!==t?{width:t}:{},...void 0!==a?{height:a}:{},...r?{format:r}:{}})}let u=l.map(t=>t.name);return{...l.length>0?{resources:{images:l}}:{},actions:[{type:"openFeature",featureType:"image",prompt:a,...r?{modelId:r}:{},...o?{aspectRatio:o}:{},...n?{resolution:n}:{},...u.length>0?{resourceNames:u}:{}}],settings:{source:null!=(e=t.source)?e:"official-website"}}}(t),resources:[]}}}function m(t){return{tempData:{canvasParameters:function(t){var e,a,r;let l=(0,n.xY)(t.prompt.trim()),u="string"==typeof t.model?t.model.trim():"",c="string"==typeof t.aspectRatio?t.aspectRatio.trim():"",m=function(t){if("number"==typeof t&&Number.isFinite(t)&&t>0)return"".concat(Math.round(t),"p");if("string"==typeof t&&t.trim()){let e=t.trim();return/^\d+$/.test(e)?"".concat(e,"p"):e}}(t.resolution),d="number"==typeof t.duration&&Number.isFinite(t.duration)&&t.duration>0?t.duration:void 0,h=[],f=[],g=[],p="video-edit",v=!1;if(t.toolType===o.pv.ImageToVideo)p="image-to-video",(null==(e=t.firstFrame)?void 0:e.filePath)&&h.push({name:"firstFrame",s3Path:t.firstFrame.filePath,...s(t.firstFrame.width)?{width:t.firstFrame.width}:{},...s(t.firstFrame.height)?{height:t.firstFrame.height}:{},...t.firstFrame.format?{format:t.firstFrame.format}:{}}),(null==(a=t.lastFrame)?void 0:a.filePath)&&h.push({name:"lastFrame",s3Path:t.lastFrame.filePath,...s(t.lastFrame.width)?{width:t.lastFrame.width}:{},...s(t.lastFrame.height)?{height:t.lastFrame.height}:{},...t.lastFrame.format?{format:t.lastFrame.format}:{}});
1else if(t.toolType===o.pv.TextToVideo)p="text-to-video",v=!0;else for(let e of(p="video-edit",t.uploadedAssets))e.uploadStatus===i.A8.SUCCESS&&e.filePath&&(e.type===i.zu.IMAGE?h.push({name:"Image".concat(h.length+1),s3Path:e.filePath,...s(e.width)?{width:e.width}:{},...s(e.height)?{height:e.height}:{},...e.format?{format:e.format}:{}}):e.type===i.zu.VIDEO?f.push({name:"Video".concat(f.length+1),s3Path:e.filePath,...s(e.width)?{width:e.width}:{},...s(e.height)?{height:e.height}:{},..."number"==typeof e.originalDuration&&e.originalDuration>0?{duration:e.originalDuration}:{},...e.format?{format:e.format}:{}}):e.type===i.zu.AUDIO&&g.push({name:"Audio".concat(g.length+1),s3Path:e.filePath,..."number"==typeof e.originalDuration&&e.originalDuration>0?{duration:e.originalDuration}:{}}));let w=[...h.map(t=>t.name),...f.map(t=>t.name),...g.map(t=>t.name)];return{...h.length>0||f.length>0||g.length>0?{resources:{...h.length>0?{images:h}:{},...f.length>0?{videos:f}:{},...g.length>0?{audios:g}:{}}}:{},actions:[{type:"openFeature",featureType:"video",videoToolTab:p,...v?{preserveTextToVideoTab:!0}:{},prompt:l,...u?{modelId:u}:{},...c?{aspectRatio:c}:{},...m?{resolution:m}:{},...void 0!==d?{durationSeconds:d}:{},...w.length>0?{resourceNames:w}:{}}],settings:{source:null!=(r=t.source)?r:"official-website"}}}(t),resources:[]}}}function d(t,e){let a=new URLSearchParams({sid:t});if(e)for(let[t,r]of Object.entries(e))r&&a.set(t,r);return(0,r.n)("/canvas?".concat(a.toString()))}},92870:(t,e,a)=>{a.d(e,{m:()=>s});var r=a(78013),i=a(33566),o=a(44542),n=a(17029);function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,o.Ak)(i._.agent.temp.addTempData.useMutation()),a=(0,r.useRef)(e);a.current=e;let[s,l]=(0,r.useState)(!1),[u,c]=(0,r.useState)(!1),[m,d]=(0,r.useState)(null),h=(0,r.useRef)(m);h.current=m;let f=i._.useUtils(),g=(0,r.useRef)(f);async function p(t){var e;let{presetParameters:r}=t,i={presetParameters:r,chatInfo:{text:r.positivePrompt,videoRatio:null!=(e=r.aspectRatio)?e:""},resources:[]},o=await a.current.mutateAsync({tempData:i});if(!o)throw Error("Failed to save preset data");return o}function v(t,e,a,r){let i=new URLSearchParams;i.set("tool-type",e),i.set("sid",a),Object.entries(null!=r?r:{}).forEach(t=>{let[e,a]=t;"tool-type"!==e&&"sid"!==e&&a&&i.set(e,a)}),window.location.href="/board/".concat(t,"?").concat(i.toString())}async function w(e){let{toolType:a,presetParameters:r}=e;l(!0);try{var i,o;let n=await g.current.board.management.getSystemDefault.fetch(),s=function(t){if(t&&"object"==typeof t&&"success"===t.status&&t.data)return t.data}(n),u=await p(e),c=null!=(o=await (null==(i=t.resolveBoardRedirectParams)?void 0:i.call(t,u,{presetParameters:r,toolType:a})))?o:{};return(null==s?void 0:s.hasCustomBoard)===!1&&(null==s?void 0:s.boardId)?v(s.boardId,a,u,c):(d({sid:u,toolType:a,redirectParams:c}),l(!1)),null}catch(t){return l(!1),console.error("Failed to submit to board:",t),t instanceof Error?t.message:"Failed to submit, please try again."}}async function y(t,e){l(!0);try{let a=await p(t),r=new URLSearchParams;return r.set("sid",a),null!=e&&r.set("inputVersion",e),window.location.href="/agent?".concat(r.toString()),null}catch(t){return l(!1),console.error("Failed to submit to storyline:",t),t instanceof Error?t.message:"Failed to submit, please try again."}finally{l(!1)}}return g.current=f,{submitToBoard:w,submitToStoryline:y,submitToCanvas:(0,r.useCallback)(async e=>{l(!0);try{var r;let i=await a.current.mutateAsync(e);if("string"!=typeof i||!i.trim())throw Error("Failed to save preset data");if(!/^[\w.:@-]+$/.test(i))throw Error("Invalid canvas sid");let o=new URL((0,n.Lh)(i),window.location.origin),s=await (null==(r=t.resolve
1CanvasRedirectParams)?void 0:r.call(t,i,e));return Object.entries(null!=s?s:{}).forEach(t=>{let[e,a]=t;o.searchParams.set(e,a)}),window.location.assign(o.origin===window.location.origin?"".concat(o.pathname).concat(o.search):o.toString()),null}catch(t){return l(!1),console.error("Failed to submit to canvas:",t),t instanceof Error?t.message:"Failed to submit, please try again."}},[t.resolveCanvasRedirectParams]),submitToDramaStudio:(0,r.useCallback)(async t=>{l(!0);try{var e,r;let i={presetParameters:t.presetParameters,chatInfo:{text:t.prompt,videoRatio:""},resources:[]},o=await a.current.mutateAsync({tempData:i});if(!o)throw Error("Failed to save preset data");let n=new URLSearchParams({sid:o});return Object.entries(null!=(r=t.redirectParams)?r:{}).forEach(t=>{let[e,a]=t;"sid"!==e&&a&&n.set(e,a)}),null==(e=t.onBeforeNavigate)||e.call(t,o),window.location.href="/drama-studio?".concat(n.toString()),null}catch(t){return l(!1),console.error("Failed to submit to drama studio:",t),t instanceof Error?t.message:"Failed to submit, please try again."}},[]),isSubmitting:s,isNavigating:u,boardDialogCtx:m,handleBoardSelect:function(t){let e=h.current;if(!e)return;let{sid:a,toolType:r,redirectParams:i}=e;c(!0),v(t,r,a,i)},handleBoardDialogClose:function(){d(null)}}}}}]);

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.