PageSourceSearch

https://bikayichatbotbuilder.web.app/static/js/8943.b165f8fe.chunk.js

js bikayichatbotbuilder.web.app collected 2026-10-03 12:18:39 UTC 10,511 bytes, 39 lines download raw bytes

1"use strict";
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bba49679-4e22-5cfe-acb6-5b38f1037c49")}catch(e){}}();
3(self.webpackChunkchatbot_builder=self.webpackChunkchatbot_builder||[]).push([[8943],{88943:(e,o,n)=>{n.r(o),n.d(o,{default:()=>R});var t=n(24137),i=n(48839),l=n(50329),d=n(33263),a=n(62071),r=n(55737),s=n(52154),c=n(72791);let p=function(e){return e.CHECKOUT_RECOVERY_VOICE_AGENT="CHECKOUT_RECOVERY_VOICE_AGENT",e}({});const u=[{label:"General",options:[{label:"Abandoned Cart",value:p.CHECKOUT_RECOVERY_VOICE_AGENT,description:"Agent calls customers to recover abandoned checkouts",selected:!1}]}];let x=function(e){return e.PREPAID_ONLY="prepaid_only",e.PREPAID_AND_COD="prepaid_and_cod",e}({}),v=function(e){return e.COD_ORDER_PLACED="cod",e.PAYMENT_LINK_REQUESTED="prepaid",e.CALL_NOT_ATTEMPTED="callNotAttempted",e.NO_ANSWER="noAnswer",e.NO_ORDER="answeredNoOrder",e.COD_ADDR_UNCONFIRMED="codAddrUnconfirmed",e.PREPAID_ADDR_UNCONFIRMED="prepaidAddrUnconfirmed",e.ADDR_INCOMPLETE="addressIncomplete",e}({});const E=[{id:v.COD_ORDER_PLACED,label:"COD order placed"},{id:v.PAYMENT_LINK_REQUESTED,label:"Payment link requested"},{id:v.CALL_NOT_ATTEMPTED,label:"Call not attempted"},{id:v.NO_ANSWER,label:"No answer"},{id:v.NO_ORDER,label:"No order"},{id:v.COD_ADDR_UNCONFIRMED,label:"COD addr unconfirmed"},{id:v.PREPAID_ADDR_UNCONFIRMED,label:"Prepaid addr unconfirmed"},{id:v.ADDR_INCOMPLETE,label:"Addr. incomplete"}];let D=function(e){return e.FIXED_AMOUNT="fixed",e.PERCENTAGE="%tage",e}({});var g=n(61990),y=n(63532),_=n(15727),f=n(95048),A=n(74249),C=n(20221),h=n(53488),m=n(75903),I=n(59198),O=n(90082);O.ZP.div`
4  display: flex;
5  align-items: center;
6  gap: 12px;
7  padding: 12px;
8  border: 1px solid ${d.DM.stroke.primary};
9  border-radius: 8px;
10  background-color: ${d.DM.surface.standard};
11  cursor: pointer;
12  
13  &:hover {
14    background-color: ${d.DM.surface.hovered};
15  }
16`,O.ZP.div`
17  color: ${d.DM.content.primary};
18  flex: 1;
19  word-break: break-word;
20  white-space: normal;
21  line-height: 1.5;
22`;const T=O.ZP.div`
23  border: 1px solid #E0E0E0;
24  border-radius: 8px;
25  padding: 16px;
26  margin-bottom: 8px;
27  background: ${d.DM.surface.standard};
28`,b=O.ZP.span`
29  position: absolute;
30  ${e=>"left"===e.position?"left: 16px;":"right: 16px;"}
31  top: 40px;
32  color: #1a1a1a;
33  font-size: 16px;
34  font-weight: 400;
35  z-index: 1;
36  pointer-events: none;
37`;var N=n(80184);const R=e=>{const{saveTo:o,setSaveTo:n,nodeData:O,config:R}=e,P=(0,g.C)((e=>e.homeState)),[j,M]=(0,c.useState)(!1),[S,U]=(0,c.useState)(),[V,k]=(0,c.useState)(),[L,F]=(0,c.useState)(),[w,G]=(0,c.useState)(x.PREPAID_AND_COD),[X,H]=(0,c.useState)(p.CHECKOUT_RECOVERY_VOICE_AGENT),[$,Y]=(0,c.useState)({code:"",description:"",value:0,codeType:D.FIXED_AMOUNT}),[K,J]=(0,c.useState)(!1),[W,Z]=(0,c.useState)(!1),z=(0,f.I0)(),B=new h.OL((()=>{}),(()=>{}));(0,c.useEffect)((()=>{if(!P.storeId||!X)return;(async()=>{M(!0);try{const d=await B.getVoiceAgentConfig(P.storeId,X);if(null!==d&&void 0!==d&&d.variantConfigs){var e,o,n,t,i,l;const a=(null===(e=d.variantConfigs.discountRules)||void 0===e?void 0:e.canOffer)||!1;J(a);const r=null!=(null===(o=d.variant)||void 0===o||null===(n=o.config)||void 0===n||null===(t=n.abandoned_cart)||void 0===t||null===(i=t.paymentPlan)||void 0===i||null===(l=i.additionalFee)||void 0===l?void 0:l.cod);Z(r)}}catch(d){console.error("Error fetching voice agent config:",d)}finally{M(!1)}})()}),[P.storeId,X]),(0,c.useEffect)((()=>{var e,o,n,t,i,l,d,a,r;P.storeId&&(U({bodyText:null!==O&&void 0!==O&&null!==(e=O.conf)&&void 0!==e&&e.custom_prompt?`<p>${null===O||void 0===O||null===(o=O.conf)||void 0===o?void 0:o.custom_prompt}</p>`:""}),F({bodyText:null!==(n=null===O||void 0===O||null===(t=O.conf)||void 0===t?void 0:t.custom_prompt)&&void 0!==n?n:""}),G(W?x.PREPAID_AND_COD:x.PREPAID_ONLY),H(null!==(i=null===O||void 0===O||null===(l=O.conf)||void 0===l?void 0:l.agent_type)&&void 0!==i?i:p.CHECKOUT_RECOVERY_VOICE_AGENT),Y(null!==(d=null===O||void 0===O||null===(a=O.conf)||void 0===a||null===(r=a.extraParams)||void 0===r?void 0:r.discountConfig)&&void 0!==d?d:{code:"",description:"",value:0,codeType:D.FIXED_AMOUNT}))}),[P.storeId,W]);return(0,c.useEffect)((()=>{if(o===A.X.AI_VOICE_AGENT){const e=(()=>{var e,o,n,t;const i=null!==(e=null===O||void 0===O||null===(o=O.conf)||void 0===o||null===(n=o.conditions)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.operator_values)&&void 0!==e?e:{},l={},d=w===x.PREPAID_AND_COD,a=new Set([v.COD_ORDER_PLACED,v.COD_ADDR_UNCONFIRMED]);return E.forEach((e=>{var o,n;a.has(e.id)&&!d||(l[e.id]={key:e.label,value:null!==(o=null===(n=i[e.id])||void 0===n?void 0:n.value)&&void 0!==o?o:""})})),l})(),o={draftOrder:{id:"string",name:"string",total:"number",subTotal:"number",shippingCharge:"number",totalTax:"number",discount:"number",currency:"string",status:"string",paymentStatus:"string",invoiceUrl:"string",createdAt:"string",expiresAt:"string",taxIncluded:"boolean",notes:"string",tags:"string",customerId:"string",phoneNumber:"string",email:"string",items:[{id:"string",title:"string",quantity:"number",price:"number",variantId:"string",productId:"string"}],address:"object",billingAddress:"object",deliveryInfo:"object"},paymentMode:"string",whatsappReason:"string"},t={type:C.J.AI_VOICE_AGENT,sub_type:O.subtype,node_index:R.nodeIndex,agent_type:X,payment_mode:w,extraParams:{discountConfig:$},conditions:[{operator:"goto",operator_values:e}]},i={type:C.J.AI_VOICE_AGENT,subType:O.subtype,isMicroFlow:!1,description:"AI Voice Agent",childNodes:e};(()=>{var e,o,n,t;if(w===x.PREPAID_AND_COD)return;const i=null!==(e=null===O||void 0===O||null===(o=O.conf)||void 0===o||null===(n=o.conditions)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.operator_values)&&void 0!==e?e:{},l=[v.COD_ORDER_PLACED,v.COD_ADDR_UNCONFIRMED].filter((e=>{var o;return null===i||void 0===i||null===(o=i[e])||void 0===o?void 0:o.value})).map((e=>({source:O.nodeId,sourceHandle:e,target:i[e].value})));l.length>0&&z(m.W.updateState({type:"edge",action:"deleteMultiple",edgeData:l,nodeId:""}))})(),z(y._.setEditNode({nodeId:O.nodeId,nodeType:i.type,nodeSubType:i.subType,data:i})),z(_.I.updateInsertNode({flow:{},nodeId:O.nodeId,data:t})),z(I.V.setAiVariablesList({aiVariablesList:{[O.nodeId]:{name:`AI VOICE AGENT #${R.nodeIndex}`,value:`aiVoiceAgent${R.nodeIndex}.response`,type:"object",payload:o}}})),n("close")}}),[o,w,L,X,$]),j?(0,N.jsx)(t.K,{boxes:[{width:"100%",height:"400px"}]}):(0,N.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[(0,N.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[(0,N.jsxs)("div",{children:[(0,N.jsx)(i.Tk,{children:"Setup your Voice AI agent"}),(0,N.jsx)(i.HO,{children:"Define the behavior of your Voice AI agent"})]}),(0,N.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},onClick:e=>e.stopPropagation(),children:[(0,N.jsx)(i.HO,{children:"Type of agent"}),(0,N.jsx)(l.L,{options:u.map((e=>({...e,options:e.options.map((e=>({...e,selected:e.value===X})))}))),isMultiSelect:!1,onSelect:e=>{const o=Array.isArray(e)?e[0]:e;o&&o.value&&H(o.value)},placeHolder:"Select agent type"})]}),(0,N.jsxs)(i.J2,{style:{marginTop:"16px"},children:["To learn more about AI Voice Agents,"," ",(0,N.jsx)("span",{style:{color:d.DM.content.brand,cursor:"pointer"},onClick:()=>window.open("mailto:[email protected]","_blank"),children:"contact support."})]})]}),(0,N.jsxs)(T,{onClick:e=>e.stopPropagation(),children:[(0,N.jsx)(i.Xp,{style:{marginBottom:4},children:"Share payment link"}),(0,N.jsx)(i.HO,{style:{marginBottom:16},children:"Choose a payment mode to share the payment link"}),(0,N.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[W&&(0,N.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,N.jsx)(a.J,{isChecked:!0,onValueChange:()=>{},isDisabled:!0}),(0,N.jsx)(i.HO,{style:{color:d.DM.content.primary},children:"COD"})]}),(0,N.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,N.jsx)(a.J,{isChecked:!0,onValueChange:()=>{},isDisabled:!0}),(0,N.jsx)(i.HO,{style:{color:d.DM.content.primary},children:"Prepaid / Online"})]})]})]}),K&&(0,N.jsxs)(T,{children:[(0,N.jsx)(i.Xp,{children:"Configure discount"}),(0,N.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:16,marginTop:4},children:(0,N.jsx)(i.J2,{style:{color:d.DM.content.secondary},children:"Add a discount to drive more purchases"})}),(0,N.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[(0,N.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,N.jsx)(r.I,{labelText:"Discount code",value:$.code,maxCharLimit:60,onChangeText:e=>{Y({...$,code:e})},placeholder:"eg: FLAT50"}),(0,N.jsx)(i.J2,{style:{color:d.DM.content.secondary}
37,children:"Code created on Shopify"})]}),(0,N.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:(0,N.jsx)(r.I,{labelText:"Coupon description",value:$.description,maxCharLimit:60,onChangeText:e=>{Y({...$,description:e})},placeholder:"eg: Flat \u20b950 off"})}),(0,N.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,N.jsx)(i.Xp,{children:"Discount type"}),(0,N.jsx)(s.m,{tabsInfo:[{id:1,text:"\u20b9  Fixed amount",action:()=>Y({...$,codeType:D.FIXED_AMOUNT,value:0})},{id:2,text:"%  Percentage",action:()=>Y({...$,codeType:D.PERCENTAGE,value:0})}],tabStyleInfo:{type:"SQUARE",size:"REGULAR"},selectedTabId:$.codeType===D.FIXED_AMOUNT?1:2})]}),(0,N.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:(0,N.jsxs)("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[$.codeType===D.FIXED_AMOUNT&&(0,N.jsx)(b,{position:"left",children:"\u20b9"}),$.codeType===D.PERCENTAGE&&(0,N.jsx)(b,{position:"right",children:"%"}),(0,N.jsx)("div",{style:{width:"100%"},children:(0,N.jsx)(r.I,{labelText:$.codeType===D.FIXED_AMOUNT?"Discount amount":"Discount percentage",value:$.value.toString(),onChangeText:e=>{/^\d*$/.test(e)&&Y({...$,value:""===e?0:parseInt(e,10)})},placeholder:($.codeType,D.FIXED_AMOUNT,"50"),inputWrapperStyles:{paddingLeft:$.codeType===D.FIXED_AMOUNT?"40px":"16px",paddingRight:$.codeType===D.PERCENTAGE?"40px":"16px"}})})]})})]})]})]})}}}]);
38//# sourceMappingURL=8943.b165f8fe.chunk.js.map
39//# debugId=bba49679-4e22-5cfe-acb6-5b38f1037c49

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.