PageSourceSearch

https://createya.ai/assets/PipelineTemplateViewPage-v3rJj0gN.js

js createya.ai collected 2026-10-05 14:37:47 UTC 2,042 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-query-Dj-bQaZ5.js";import{k as x,f,r as o}from"./vendor-react-BN5YuFNa.js";import{u as h}from"./usePipelineShareCodes-_Gt35lAt.js";import{aw as g,r as m,bM as w}from"./index-BJeol-EK.js";import{L as u}from"./layout-template-PiyNUIqF.js";import"./vendor-i18n-CT1zfRuR.js";import"./vendor-ui-C2uCisza.js";import"./vendor-supabase-SRSXtynz.js";import"./vendor-motion-C8cqyV5O.js";function j(r){const s=r.replace(/[^A-Za-z0-9]/g,"").toUpperCase().slice(0,8);return s.length===8?s:null}function P(){const{code:r}=x(),s=f(),{activeWorkspaceId:a}=g(),{importFromCode:i}=h(),n=o.useRef(!1),[l,d]=o.useState(null),t=o.useMemo(()=>r?j(r):null,[r]),p=o.useMemo(()=>t?`${t.slice(0,4)}-${t.slice(4)}`:r||"",[t,r]);return o.useEffect(()=>{!t||n.current||(n.current=!0,(async()=>{const c=await i(t,a,{previewMode:!0,silent:!0});if(!c){d("Не удалось открыть шаблон");return}s(`/pipeline?id=${c.pipelineId}&preview=1`,{replace:!0})})())},[t,a,i,s]),t?l?e.jsxs("div",{className:"flex-1 min-h-0 overflow-auto bg-background flex flex-col items-center justify-center gap-3",children:[e.jsx(u,{className:"w-12 h-12 text-muted-foreground/30"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:l}),e.jsxs("p",{className:"text-muted-foreground/60 text-xs",children:["Код ",p]}),e.jsxs("button",{onClick:()=>s("/pipeline"),className:"mt-3 flex items-center gap-2 text-sm text-white/60 hover:text-white",children:[e.jsx(m,{className:"w-4 h-4"}),"Назад к галерее"]})]}):e.jsx(w,{}):e.jsxs("div",{className:"flex-1 min-h-0 overflow-auto bg-background flex flex-col items-center justify-center gap-4",children:[e.jsx(u,{className:"w-12 h-12 text-muted-foreground/30"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Неверный код шаблона"}),e.jsxs("button",{onClick:()=>s("/pipeline"),className:"flex items-center gap-2 text-sm text-white/60 hover:text-white",children:[e.jsx(m,{className:"w-4 h-4"}),"Назад к галерее"]})]})}export{P as default};

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.