PageSourceSearch

https://www.affiliate.id/_next/static/chunks/pages/app/product/[pr…/edit/event-product-523a54941f0ff56f.js

js affiliate.id collected 2026-10-10 02:27:02 UTC 3,889 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="50445687-9178-491b-a72f-e9bc09debb04",e._sentryDebugIdIdentifier="sentry-dbid-50445687-9178-491b-a72f-e9bc09debb04")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5842],{91357:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/product/[productId]/edit/event-product",function(){return a(49447)}])},49447:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return p}});var d=a(85893),s=a(67294),n=a(11163),o=a(80207),i=a(61089);a(7548);var l=a(97511),r=a(93817);a(53639),a(462),a(3476);var c=a(80916),u=a(94596);function p(){let{query:e,push:t}=(0,n.useRouter)(),[a,p]=(0,s.useState)(),[f,m]=(0,s.useState)(!1),[g,y]=(0,s.useState)({image:[],addVideo:!1,title:"",description:"",platform:"",price:0,salePrice:"",currency:"IDR",unlimited:!0,quantity:1,buttonText:"Buy Now",productType:"event-product"});console.log(g,"--> form");let h=async()=>{try{var t,d;m(!0);let s=(null==g?void 0:g.contents)||[];(null==g?void 0:null===(t=g.contents)||void 0===t?void 0:t.length)>0&&(s=await Promise.all(g.contents.map(async t=>{if(t.docId)return console.log("Skipping content with existing docId:",t.docId),t;let a=await o.Z.post("/api/v1/data/add",{...t,fileId:e.productId,workspaceId:"product",externalId:t.order,externalType:"order",data:t});return a?(console.log("New content added with docId:",a.data.data.docId),{...t,docId:a.data.data.docId}):t})));let n={...g,contents:s},i={id:e.productId,title:n.title,description:n.description,data:n,isPublic:null!==(d=null==n?void 0:n.isPublic)&&void 0!==d&&d,outputUrl:null==n?void 0:n.image,type:null==n?void 0:n.productType,tags:Array.from(new Set([...(null==a?void 0:a.tags)||[],n.title].filter(Boolean)))};console.log("Final update data:",i);let l=await o.Z.post("/api/v1/file/set",i);y(n),console.log("Save successful:",l)}catch(e){console.log("Error in handleSave:",e.message)}finally{m(!1)}},x=async()=>{try{let t=await o.Z.post("/api/v1/file/get",{ids:[e.productId]});console.log(t.data.data.hits[0],"ini dia aa nya.."),y({...g,...t.data.data.hits[0].data}),p(t.data.data.hits[0])}catch(e){console.log(e.message)}};return(0,s.useEffect)(()=>{x()},[e.productId]),(0,d.jsxs)("div",{className:"mx-auto p-6",children:[(0,d.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,d.jsx)(u.Z,{headline:"Add Digital Product"}),(0,d.jsx)("button",{className:"px-4 py-2 rounded border",children:"Options"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,d.jsx)("div",{className:"space-y-6",children:(0,d.jsx)(i.Z,{formData:g,setFormData:y})}),(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsx)(l.Z,{formData:g,setFormData:y}),(0,d.jsx)(r.Z,{formData:g,setFormData:y}),(0,d.jsx)(c.Z,{formData:g,setFormData:y})]})]}),(0,d.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,d.jsx)("button",{className:"px-6 py-2 rounded border",children:"Cancel"}),(0,d.jsx)("button",{className:"px-6 py-2 rounded bg-emerald-500 text-white flex items-center space-x-2",onClick:h,disabled:f,children:f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("svg",{className:"animate-spin h-5 w-5 mr-2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,d.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,d.jsx)("span",{children:"Saving..."})]}):"Save"})]})]})}}},function(e){e.O(0,[7757,9414,7756,9653,1089,1954,2888,9774,179],function(){return e(e.s=91357)}),_N_E=e.O()}]);

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.