"use strict";(()=>{var e={};e.id=693,e.ids=[693],e.modules={20145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},56249:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,o){return o in t?t[o]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,o)):"function"==typeof t&&"default"===o?t:void 0}}})},52831:(e,t,o)=>{o.r(t),o.d(t,{config:()=>s,default:()=>u,routeModule:()=>p});var r={};o.r(r),o.d(r,{default:()=>d});var n=o(71802),i=o(47153),a=o(56249);async function d(e,t){if(!e.headers["x-echo-url"])return t.status(404).send("No URL provided");let o=await fetch(`${e.headers["x-echo-url"]}?action=preview&workflowId=${e.query.workflowId}&stepId=${e.query.stepId}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({inputs:e.body.inputs||{},data:e.body.payload||{}})}),r=await o.json();o.ok?t.json(r):t.status(400).json(r)}let u=(0,a.l)(r,"default"),s=(0,a.l)(r,"config"),p=new n.PagesAPIRouteModule({definition:{kind:i.x.PAGES_API,page:"/api/workflows/[workflowId]/preview/[stepId]",pathname:"/api/workflows/[workflowId]/preview/[stepId]",bundlePath:"",filename:""},userland:r})},47153:(e,t)=>{var o;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return o}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(o||(o={}))},71802:(e,t,o)=>{e.exports=o(20145)}};var t=require("../../../../../webpack-api-runtime.js");t.C(e);var o=t(t.s=52831);module.exports=o})();