1"use strict";(self.webpackChunkStammer_ai=self.webpackChunkStammer_ai||[]).push([[9998],{20556:function(e,n,i){var t=i(81056),r=i(78685);n.A=(0,t.A)((0,r.jsx)("path",{d:"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M6.24 5h11.52l.81.97H5.44zM5 19V8h14v11zm8.45-9h-2.9v3H8l4 4 4-4h-2.55z"}),"ArchiveOutlined")},65540:function(e,n,i){var t=i(81056),r=i(78685);n.A=(0,t.A)((0,r.jsx)("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm0 6-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25zm-7.5-5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zm-1.51 3.49L9 15.17l-.99-2.18L5.83 12l2.18-.99L9 8.83l.99 2.18 2.18.99z"}),"AutoAwesomeOutlined")},1912:function(e,n,i){var t=i(81056),r=i(78685);n.A=(0,t.A)((0,r.jsx)("path",{d:"M18 2H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H9V4h9zM3 15v-2h2v2zm0-5.5h2v2H3zM10 20h2v2h-2zm-7-1.5v-2h2v2zM5 22c-1.1 0-2-.9-2-2h2zm3.5 0h-2v-2h2zm5 0v-2h2c0 1.1-.9 2-2 2M5 6v2H3c0-1.1.9-2 2-2"}),"CopyAll")},52280:function(e,n,i){var t=i(81056),r=i(78685);n.A=(0,t.A)((0,r.jsx)("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined")},90855:function(e,n,i){var t=i(81056),r=i(78685);n.A=(0,t.A)((0,r.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},60427:function(e,n,i){var t=i(81056),r=i(78685);n.A=(0,t.A)((0,r.jsx)("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3m-2 10H6V7h12zm-9-6c-.83 0-1.5-.67-1.5-1.5S8.17 10 9 10s1.5.67 1.5 1.5S9.83 13 9 13m7.5-1.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5M8 15h8v2H8z"}),"SmartToyOutlined")},87722:function(e,n,i){var t=i(81056),r=i(78685);n.A=(0,t.A)((0,r.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"WarningOutlined")},42259:function(e,n,i){i.d(n,{l:function(){return d}});var t=i(78685),r=(i(2057),i(86591)),a=i(69179),s=i(16657),l=i(17e3),o=i(16003),c=i(64223);function d(){var e=(0,s.Bd)().t,n=(0,l.zy)(),i=(0,l.ok)()[0].get("tab")||"dashboard_settings",d=(0,r.I)({queryKey:["shell-layout-payload"],queryFn:c.V,staleTime:3e4}).data,S=n.pathname===o.b.AGENCY_PROFILE,A=n.pathname===o.b.AGENCY_SAAS_CONFIGURATOR||n.pathname===o.b.AGENCY_PACKAGE_CREATE||Boolean((0,l.B6)(o.b.AGENCY_PACKAGE_UPDATE,n.pathname)),u=null==d?void 0:d.links.whiteLabelDocs,_=[{key:"dashboard_settings",label:e("DISPLAY_LABELS.SHELL_DASHBOARD_SETTINGS"),to:"".concat(o.b.AGENCY_PROFILE,"?tab=dashboard_settings"),isActive:S&&"dashboard_settings"===i},{key:"custom_domain",label:e("DISPLAY_LABELS.SHELL_CUSTOM_DOMAIN"),to:"".concat(o.b.AGENCY_PROFILE,"?tab=custom_domain"),isActive:S&&"custom_domain"===i},{key:"custom_styling",label:e("DISPLAY_LABELS.SHELL_CUSTOM_STYLING"),to:"".concat(o.b.AGENCY_PROFILE,"?tab=custom_styling"),isActive:S&&"custom_styling"===i},{key:"stripe_integration",label:e("DISPLAY_LABELS.SHELL_STRIPE_INTEGRATION"),to:"".concat(o.b.AGENCY_PROFILE,"?tab=stripe_integration"),isActive:S&&"stripe_integration"===i},{key:"stripe_configuration",label:e("DISPLAY_LABELS.SHELL_SAAS_CONFIGURATOR"),to:o.b.AGENCY_SAAS_CONFIGURATOR,isActive:A}];return(0,t.jsx)(a.azJ,{sx:{display:"grid",gap:2},children:(0,t.jsxs)(a.azJ,{sx:{display:"flex",flexWrap:"wrap",gap:0,borderBottom:1,borderColor:"divider",overflowX:"auto"},children:[_.map((function(e){var n=e.isActive;return(0,t.jsx)(a.$nd,{component:l.N_,to:e.to,sx:{borderRadius:0,px:2,py:1.25,borderBottom:n?2:0,borderColor:n?"primary.main":"transparent",color:n?"primary.main":"text.secondary",fontWeight:n?600:500,whiteSpace:"nowrap",textDecoration:"none","&:hover":{textDecoration:"none"}},children:e.label},e.key)})),(0,t.jsx)(a.$nd,{component:"a",href:u,target:"_blank",rel:"noopener noreferrer",sx:{borderRadius:0,px:2,py:1.25,borderBottom:0,color:"text.secondary",fontWeight:500,whiteSpace:"nowrap",textDecoration:"none","&:hover":{textDecoration:"none"}},children:e("DISPLAY_LABELS.SHELL_WHITE_LABEL_DOCS")})]})})}},93059:function(e,n,i){i.r(n),i.d(n,{AgencyPackageEditorPage:function(){return Ce}});var t=i(78685),r=i(2057),a=i(17e3),s=i(16657),l=i(69179),o=i(81170),c=i(10698),d=i(19124),S=i(21762),A="general",u="ai-chat",_="ai-voice",h=0,I=1,m=2,p=3,x=0,g=1,E=2,P=0,L=1,T={name:"Basic",description:"",planKey:"basic",chatbots:0,characterCount:0,features:["Unlimited Website Embeddings","24/7 Customer Support","Custom Knowledge Base","Unlimited User Accounts"],freeTrialDays:0,includedMessages:0,messageMarkupPercentage:100,isComplimentaryCreditsRecurring:!1,isExternallyAvailable:!1,isOneTimePaymentEnabled:!1,oneTimePaymentAmount:0,oneTimePaymentDescription:"",bypassSubaccountBilling:!1,isVatEnabled:!1,vatPercentage:0,subscriptionPrices:[],isVoiceAgentsEnabled:!1,isChatAgentsEnabled:!0,voiceAgents:0,concurrentCallLimit:1,voiceKbLimit:0,freeVoiceMinutes:0,isVoiceMinutesRecurring:!1,phoneNumberMarkup:0,callMinutesMarkup:0,extraConcurrentCallsMarkup:0,includedAIAgents:[],subscriptionPackagePermissions:[],messageModels:[]},f=i(43219),v=i(39101),C=i(28481),j=i(78166),N=i(95336);var b=function(e){var n=e.plan,i=e.setFieldValue,r=e.isLoading,a=e.touched,o=e.errors,c=(0,s.Bd)().t;return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(l.fPr,{container:!0,spacing:1,children:[(0,t.jsx)(l.fPr,{size:8,children:(0,t.jsxs)(l.fPr,{container:!0,spacing:1,children:[(0,t.jsxs)(l.fPr,{size:6,children:[(0,t.jsx)(l.JU7,{name:c("DISPLAY_STRINGS.SAAS_PACKAGE_NAME"),helptext:c("DISPLAY_STRINGS.SAAS_PACKAGE_NAME_HELP"),required:!0}),(0,t.jsx)(C.D0,{as:l.A_L,name:"name",size:"small",placeholder:c("DISPLAY_STRINGS.SAAS_PACKAGE_NAME"),variant:"outlined",fullWidth:!0,disabled:r}),(0,N.P)(null==a?void 0:a.name,null==o?void 0:o.name),(0,t.jsx)(l.eKY,{children:c("DISPLAY_STRINGS.SAAS_PACKAGE_NAME_HELP")})]}),(0,t.jsxs)(l.fPr,{size:6,children:[(0,t.jsx)(l.JU7,{name:c("DISPLAY_STRINGS.SAAS_PACKAGE_TIER"),helptext:c("DISPLAY_STRINGS.SAAS_PACKAGE_TIER_HELP"),required:!0}),(0,t.jsxs)(C.D0,{as:l.l6P,name:"planKey",size:"small",placeholder:c("DISPLAY_STRINGS.SAAS_PACKAGE_TIER_PLACEHOLDER"),variant:"outlined",fullWidth:!0,disabled:r,children:[(0,t.jsx)(l.Drp,{value:"basic",children:c("DISPLAY_STRINGS.SAAS_TIER_BASIC")}),(0,t.jsx)(l.Drp,{value:"pro",children:c("DISPLAY_STRINGS.SAAS_TIER_PRO")}),(0,t.jsx)(l.Drp,{value:"premium",children:c("DISPLAY_STRINGS.SAAS_TIER_PREMIUM")}
1),(0,t.jsx)(l.Drp,{value:"enterprise",children:c("DISPLAY_STRINGS.SAAS_TIER_ENTERPRISE")})]}),(0,N.P)(null==a?void 0:a.planKey,null==o?void 0:o.planKey),(0,t.jsx)(l.eKY,{children:c("DISPLAY_STRINGS.SAAS_PACKAGE_TIER_SELECT_HELP")})]})]})}),(0,t.jsxs)(l.fPr,{size:4,sx:{display:"flex",flexDirection:"column",justifyContent:"center",gap:.5,pl:1},children:[(0,t.jsx)(l.ip9,{control:(0,t.jsx)(C.D0,{as:l.Sc0,type:"checkbox",name:"isExternallyAvailable",disabled:r}),label:(0,t.jsx)(l.$ZZ,{label:c("DISPLAY_STRINGS.SAAS_SHOW_PACKAGE_TO_SUBACCOUNTS"),fontSize:14,tooltipTitle:c("DISPLAY_STRINGS.SAAS_SHOW_PACKAGE_TO_SUBACCOUNTS_TOOLTIP"),bold:!0})}),(0,t.jsx)(l.ip9,{control:(0,t.jsx)(C.D0,{as:l.Sc0,type:"checkbox",name:"isMostPopular",disabled:r,checked:n.isMostPopular||!1,onChange:function(e){i("isMostPopular",e.target.checked)}}),label:(0,t.jsx)(l.$ZZ,{label:c("DISPLAY_STRINGS.SAAS_MARK_AS_MOST_POPULAR"),fontSize:14,tooltipTitle:c("DISPLAY_STRINGS.SAAS_MARK_AS_MOST_POPULAR_TOOLTIP"),bold:!0})})]}),(0,t.jsxs)(l.fPr,{size:12,children:[(0,t.jsx)(l.JU7,{name:c("DISPLAY_STRINGS.SAAS_PACKAGE_DESCRIPTION"),helptext:c("DISPLAY_STRINGS.SAAS_PACKAGE_DESCRIPTION_HELP")}),(0,t.jsx)(C.D0,{as:l.A_L,name:"description",placeholder:c("DISPLAY_STRINGS.SAAS_ENTER_DESCRIPTION_PLACEHOLDER"),size:"small",variant:"outlined",multiline:!0,rows:5,fullWidth:!0,disabled:r}),(0,t.jsx)(l.eKY,{children:c("DISPLAY_STRINGS.SAAS_PACKAGE_DESCRIPTION_HELP")})]}),(0,t.jsx)(l.fPr,{size:12,children:(0,t.jsx)(l.cGx,{sx:{my:1}})}),(0,t.jsxs)(l.fPr,{size:12,children:[(0,t.jsx)(l.JU7,{name:c("DISPLAY_STRINGS.SAAS_PACKAGE_FEATURES"),helptext:c("DISPLAY_STRINGS.SAAS_PACKAGE_FEATURES_HELP")}),(0,t.jsx)(C.D0,{as:l.A_L,name:"features",value:n.features.join("\n"),onChange:function(e){var n=e.target.value.split("\n");i("features",n.map((function(e){return e.trim()})))},placeholder:c("DISPLAY_STRINGS.SAAS_ENTER_ONE_FEATURE_PER_LINE"),size:"small",variant:"outlined",multiline:!0,rows:5,fullWidth:!0,disabled:r}),(0,N.P)(null==a?void 0:a.features,null==o?void 0:o.features),(0,t.jsx)(l.eKY,{children:c("DISPLAY_STRINGS.SAAS_PACKAGE_FEATURES_LIST_HELP")})]})]})})},R=i(81056),D=(0,R.A)((0,t.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),y=(0,R.A)((0,t.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),G=i(1912),O=i(57559),Y=i(50143),M=function(){return M=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},M.apply(this,arguments)},z=function(e,n,i){if(i||2===arguments.length)for(var t,r=0,a=n.length;r<a;r++)!t&&r in n||(t||(t=Array.prototype.slice.call(n,0,r)),t[r]=n[r]);return e.concat(t||Array.prototype.slice.call(n))};var U=function(e){var n,i,a,o,c=e.plan,S=e.setFieldValue,A=e.isLoading,u=e.currencyUnit,_=e.touched,h=e.errors,I=(0,s.Bd)().t,m="recurring_payments",p="one_time_payment",x="vat",g=(0,r.useState)(m),E=g[0],P=g[1],L=(0,r.useState)(!1),T=L[0],f=L[1],v=(0,r.useState)(null),j=v[0],b=v[1],R=(0,Y.f)().themeMode,U={month:I("DISPLAY_STRINGS.SAAS_BILLING_MONTHLY"),year:I("DISPLAY_STRINGS.SAAS_BILLING_YEARLY"),quarter:I("DISPLAY_STRINGS.SAAS_BILLING_QUARTERLY")},k=(null===(n=c.subscriptionPrices)||void 0===n?void 0:n.filter((function(e){return e.isActive})))||[],V=["month","year","quarter"],B=function(){var e=k.filter((function(e){return e.isActive})).map((function(e){return e.billingPeriod}));return V.filter((function(n){return e.includes(n)}))}(),H=V.filter((function(e){return!B.includes(e)}));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.o5u,{color:"primary.main",variant:"h6",fontSize:16,fontWeight:600,children:I("DISPLAY_STRINGS.SAAS_PRICING_CONFIGURATION")}),(0,t.jsx)(l.o5u,{variant:"body1",color:"text.secondary",fontSize:14,children:I("DISPLAY_STRINGS.SAAS_PRICING_CONFIGURATION_DESC")}),(0,t.jsx)(l.fPr,{size:12,mt:2,children:(0,t.jsx)(l.qIE,{tabs:[{id:m,label:I("DISPLAY_STRINGS.SAAS_RECURRING_PAYMENTS"),isActive:E===m},{id:p,label:I("DISPLAY_STRINGS.SAAS_ONE_TIME_PAYMENT"),isActive:E===p},{id:x,label:I("DISPLAY_STRINGS.SAAS_VAT_CONFIG"),isActive:E===x}],disabled:A,selectedTab:E,onTabChange:function(e){return P(e)}})}),E===m&&(0,t.jsxs)(l.azJ,{mt:1,children:[(0,t.jsx)(l.azJ,{display:"flex",justifyContent:"flex-end",children:(0,t.jsx)(l.$nd,{variant:"outlined",color:"primary",disabled:0===H.length||A,startIcon:(0,t.jsx)(D,{}),onClick:function(){S("subscriptionPrices",z(z([],c.subscriptionPrices,!0),[{isPublic:!0,isActive:!0,price:10,billingPeriod:H[0]}],!1))},children:I("DISPLAY_STRINGS.SAAS_ADD_OPTION")})}),0===k.length&&!A&&(0,t.jsx)(l.o5u,{variant:"body1",color:"text.secondary",fontSize:14,children:I("DISPLAY_STRINGS.SAAS_NO_PAYMENT_PLANS")}),k.length>0&&!A&&(0,t.jsx)(l.azJ,{children:k.map((function(e,n){var i,r;return(0,t.jsxs)(l.ZpM,{variant:"outlined",sx:{p:2,mt:2,backgroundColor:e.isPublic?"background.paper":"light"===R?"#dde0e438":"#1a202c"},children:[(0,t.jsxs)(l.azJ,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,t.jsxs)(l.azJ,{display:"flex",alignItems:"center",children:[(0,t.jsx)(l.vu3,{label:U[e.billingPeriod],size:"small",variant:"outlined",color:"primary"}),(0,t.jsx)(l.K0,{size:"small",onClick:function(e){b(e.currentTarget),f(!0)},children:(0,t.jsx)(y,{})}),j&&(0,t.jsxs)(l.W1t,{open:T,anchorEl:j,onClose:function(){f(!1),b(null)},children:[V.map((function(e){return(0,t.jsx)(l.Drp,{onClick:function(){var i=M(M({},k[n]),{billingPeriod:e});S("subscriptionPrices",k.map((function(e,t){return t===n?i:e}))),f(!1),b(null)},disabled:A||B.includes(e),value:e,children:U[e]})})),0===V.length&&(0,t.jsx)(l.Drp,{disabled:A,children:I("DISPLAY_STRINGS.SAAS_NO_BILLING_PERIODS")})]})]}),(0,t.jsxs)(l.azJ,{children:[(0,t.jsx)(l.dOG,{checked:null!==(i=e.isPublic)&&void 0!==i&&i,disabled:A,onChange:function(e){
1S("subscriptionPrices",k.map((function(i,t){return t===n?M(M({},i),{isPublic:e.target.checked}):i})))}}),c.id?(0,t.jsx)(l.K0,{onClick:function(){S("subscriptionPrices",k.map((function(n){return n.id===e.id?M(M({},n),{isActive:!1}):n})))},color:"error",children:(0,t.jsx)(O.A,{})}):(0,t.jsx)(l.K0,{onClick:function(){S("subscriptionPrices",k.filter((function(e,i){return i!==n})))},color:"error",children:(0,t.jsx)(O.A,{})})]})]}),(0,t.jsxs)(l.azJ,{children:[(0,t.jsx)(l.JU7,{name:I("DISPLAY_STRINGS.SAAS_PRICE"),required:!0,ignoreSpace:!0}),(0,t.jsx)(C.D0,{as:l.A_L,size:"small",name:"price",type:"number",fullWidth:!0,disabled:A||!e.isPublic,placeholder:I("DISPLAY_STRINGS.SAAS_PRICE_PLACEHOLDER"),variant:"outlined",value:e.price,onChange:function(i){var t=M(M({},e),{price:i.target.value});S("subscriptionPrices",k.map((function(e,i){return i===n?t:e})))},InputProps:{startAdornment:(0,t.jsx)(l.jC1,{position:"start",children:u||"$"}),min:0,step:.01,max:1e6}}),(0,t.jsx)("div",{style:{fontSize:11,color:"red",marginTop:"2px"},children:(null===(r=null==h?void 0:h.subscriptionPrices)||void 0===r?void 0:r[n])&&"object"==typeof h.subscriptionPrices[n]&&"price"in h.subscriptionPrices[n]?h.subscriptionPrices[n].price:""}),e.packageLink&&(0,t.jsxs)(l.azJ,{mt:1,children:[(0,t.jsx)(l.JU7,{name:I("DISPLAY_STRINGS.SAAS_PACKAGE_LINK"),ignoreSpace:!0}),(0,t.jsx)(C.D0,{as:l.A_L,size:"small",fullWidth:!0,variant:"outlined",value:e.packageLink,disabled:A||!e.isPublic,InputProps:{readOnly:!0,endAdornment:(0,t.jsx)(l.jC1,{position:"end",children:(0,t.jsx)(l.K0,{size:"small",onClick:function(){e.packageLink&&(navigator.clipboard.writeText(e.packageLink),(0,d.vd)(I("DISPLAY_STRINGS.SAAS_PACKAGE_LINK_COPIED")))},disabled:!e.packageLink||A||!e.isActive,children:(0,t.jsx)(G.A,{fontSize:"small"})})})}})]})]})]},e.id)}))}),A&&(0,t.jsx)(l.azJ,{sx:{display:"flex",justifyContent:"center",mt:2},children:(0,t.jsx)(l.PaH,{size:20})})]}),E===p&&(0,t.jsx)(l.azJ,{mt:1,children:(0,t.jsxs)(l.ZpM,{variant:"outlined",sx:{p:2,mt:2,backgroundColor:c.isOneTimePaymentEnabled?"background.paper":"light"===R?"#dde0e438":"#1a202c"},children:[(0,t.jsxs)(l.azJ,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,t.jsxs)(l.azJ,{display:"flex",alignItems:"center",children:[(0,t.jsx)(l.vu3,{label:I("DISPLAY_STRINGS.SAAS_ONE_TIME"),size:"small",variant:"outlined",color:"primary",sx:{mr:1}}),(0,t.jsx)(l.$ZZ,{tooltipTitle:I("DISPLAY_STRINGS.SAAS_ONE_TIME_TOOLTIP")})]}),(0,t.jsx)(l.azJ,{children:(0,t.jsx)(l.dOG,{checked:null!==(i=c.isOneTimePaymentEnabled)&&void 0!==i&&i,onChange:function(e){S("isOneTimePaymentEnabled",e.target.checked)}})})]}),(0,t.jsxs)(l.fPr,{container:!0,spacing:2,children:[(0,t.jsxs)(l.fPr,{size:6,children:[(0,t.jsx)(l.JU7,{name:I("DISPLAY_STRINGS.SAAS_ONE_TIME_PAYMENT_AMOUNT"),required:!0,ignoreSpace:!0}),(0,t.jsx)(C.D0,{as:l.A_L,size:"small",name:"oneTimePaymentAmount",type:"number",fullWidth:!0,disabled:!c.isOneTimePaymentEnabled||A,placeholder:I("DISPLAY_STRINGS.SAAS_PRICE_PLACEHOLDER"),variant:"outlined",value:c.oneTimePaymentAmount,onChange:function(e){c.isOneTimePaymentEnabled&&S("oneTimePaymentAmount",e.target.value)},InputProps:{startAdornment:(0,t.jsx)(l.jC1,{position:"start",children:u||"$"}),min:0,step:.01,max:1e6}}),(0,N.P)(null==_?void 0:_.oneTimePaymentAmount,null==h?void 0:h.oneTimePaymentAmount),(0,t.jsx)(l.eKY,{children:I("DISPLAY_STRINGS.SAAS_ONE_TIME_AMOUNT_HELP")})]}),(0,t.jsxs)(l.fPr,{size:6,children:[(0,t.jsx)(l.JU7,{name:I("DISPLAY_STRINGS.SAAS_PAYMENT_DESCRIPTION"),ignoreSpace:!0}),(0,t.jsx)(C.D0,{as:l.A_L,size:"small",name:"oneTimePaymentDescription",type:"text",fullWidth:!0,required:c.isOneTimePaymentEnabled,disabled:!c.isOneTimePaymentEnabled||A,placeholder:I("DISPLAY_STRINGS.SAAS_PRICE_PLACEHOLDER"),variant:"outlined",value:c.oneTimePaymentDescription,onChange:function(e){c.isOneTimePaymentEnabled&&S("oneTimePaymentDescription",e.target.value)}}),(0,N.P)(null==_?void 0:_.oneTimePaymentDescription,null==h?void 0:h.oneTimePaymentDescription),(0,t.jsx)(l.eKY,{children:I("DISPLAY_STRINGS.SAAS_PAYMENT_DESCRIPTION_HELP")})]})]})]})}),E===x&&(0,t.jsx)(l.azJ,{mt:1,children:(0,t.jsxs)(l.ZpM,{variant:"outlined",sx:{p:2,mt:2,backgroundColor:c.isVatEnabled?"background.paper":"light"===R?"#dde0e438":"#1a202c"},children:[(0,t.jsxs)(l.azJ,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,t.jsxs)(l.azJ,{display:"flex",alignItems:"center",children:[(0,t.jsx)(l.vu3,{label:I("DISPLAY_STRINGS.SAAS_VAT_TAX_CONFIG"),size:"small",variant:"outlined",color:"primary",sx:{mr:1}}),(0,t.jsx)(l.$ZZ,{tooltipTitle:I("DISPLAY_STRINGS.SAAS_VAT_TAX_TOOLTIP")})]}),(0,t.jsx)(l.azJ,{children:(0,t.jsx)(l.dOG,{checked:null!==(a=c.isVatEnabled)&&void 0!==a&&a,onChange:function(e){
1S("isVatEnabled",e.target.checked)}})})]}),(0,t.jsx)(l.fPr,{container:!0,spacing:2,children:(0,t.jsxs)(l.fPr,{size:6,children:[(0,t.jsx)(l.JU7,{name:I("DISPLAY_STRINGS.SAAS_VAT_TAX_PERCENTAGE"),required:!0,ignoreSpace:!0}),(0,t.jsx)(C.D0,{as:l.A_L,size:"small",name:"vatPercentage",type:"number",fullWidth:!0,disabled:!c.isVatEnabled||A,placeholder:I("DISPLAY_STRINGS.SAAS_VAT_PLACEHOLDER"),variant:"outlined",value:null!==(o=c.vatPercentage)&&void 0!==o?o:"0",onChange:function(e){c.isVatEnabled&&S("vatPercentage",e.target.value)},InputProps:{endAdornment:(0,t.jsx)(l.jC1,{position:"end",children:"%"}),min:0,step:1,max:100}}),(0,N.P)(null==_?void 0:_.vatPercentage,null==h?void 0:h.vatPercentage),(0,t.jsx)(l.eKY,{children:I("DISPLAY_STRINGS.SAAS_VAT_PERCENTAGE_HELP")})]})})]})})]})},k=i(14160),V=i(88880),B=function(e,n,i){if(i||2===arguments.length)for(var t,r=0,a=n.length;r<a;r++)!t&&r in n||(t||(t=Array.prototype.slice.call(n,0,r)),t[r]=n[r]);return e.concat(t||Array.prototype.slice.call(n))};var H=function(e){var n=e.plan,i=e.setFieldValue,a=e.isLoading,o=(0,s.Bd)().t,c=(0,k.mm)(),d=c.data,S=c.isLoading,A=null==d?void 0:d.permissions,u=null==d?void 0:d.user_permissions,_=S||a;return _?(0,t.jsx)(l.EAD,{variant:"rectangular",height:550}):(0,t.jsx)(l.ZpM,{variant:"outlined",sx:{p:2,mt:2},children:(0,t.jsx)(l.fPr,{container:!0,spacing:6,children:(0,V.qb)().map((function(e){return(0,t.jsx)(l.fPr,{size:{xs:12,md:6},children:Object.entries(e).map((function(e,a){var s=e[0],c=e[1],d=V.S7[s];return(0,t.jsx)(r.Fragment,{children:c.length>0&&(0,t.jsxs)(l.azJ,{sx:{mt:0!==a?1:0},children:[(0,t.jsx)(l.o5u,{fontSize:16,fontWeight:600,color:"primary",children:d}),(0,t.jsx)(l.cGx,{sx:{marginY:1}}),(0,t.jsx)(l.azJ,{p:1,children:c.map((function(e){var r,a=null==A?void 0:A[e],s=null==u?void 0:u[e],c=!!(null===(r=n.subscriptionPackagePermissions)||void 0===r?void 0:r.find((function(n){return n.codename===e})));return(0,t.jsx)(l.m_M,{arrow:!0,placement:"top",title:s?null:o("DISPLAY_STRINGS.UPGRADE_SUBSCRIPTION_PERMISSION"),children:(0,t.jsxs)(l.azJ,{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,sx:{opacity:s?"1":"0.5"},children:[(0,t.jsx)(l.o5u,{fontSize:14,fontWeight:400,children:a}),(0,t.jsx)(l.dOG,{disabled:!s||_,checked:c,onChange:function(t){var r;s&&(t.target.checked?i("subscriptionPackagePermissions",B([{codename:e,name:a}],n.subscriptionPackagePermissions||[],!0)):i("subscriptionPackagePermissions",null===(r=n.subscriptionPackagePermissions)||void 0===r?void 0:r.filter((function(n){return n.codename!==e}))))}})]})},e)}))})]})},s)}))})}))})})},w=i(54935);var F=function(e){var n=e.plan,i=e.setFieldValue,a=e.isLoading,o=e.touched,c=e.errors,d=(0,s.Bd)().t,S=(0,r.useState)(!1),A=S[0],u=S[1];return(0,r.useEffect)((function(){u(n.freeTrialDays>0)}),[n.freeTrialDays]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.ZpM,{variant:"outlined",sx:{p:2,my:1},children:(0,t.jsxs)(l.azJ,{children:[(0,t.jsx)(l.o5u,{color:"primary.main",variant:"h6",fontSize:16,fontWeight:600,children:d("DISPLAY_STRINGS.SAAS_CREDIT_CARD_TRIAL")}),(0,t.jsx)(l.o5u,{color:"text.secondary",variant:"body1",fontSize:14,children:d("DISPLAY_STRINGS.SAAS_CREDIT_CARD_TRIAL_DESC")}),(0,t.jsxs)(l.azJ,{my:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,children:[(0,t.jsx)(l.$ZZ,{label:d("DISPLAY_STRINGS.SAAS_ACTIVATE_TRIAL_PERIOD"),fontSize:14,bold:!0}),(0,t.jsx)(l.azJ,{children:(0,t.jsx)(l.dOG,{checked:A,onChange:function(e){e.target.checked?i("freeTrialDays",1):i("freeTrialDays",0),u(e.target.checked)}})})]}),(0,t.jsxs)(l.azJ,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(l.JU7,{name:d("DISPLAY_STRINGS.FREE_TRIAL_DAYS")}),(0,t.jsxs)(l.o5u,{fontSize:14,fontWeight:600,sx:{marginRight:"10px"},children:[n.freeTrialDays," ",d("DISPLAY_STRINGS.SAAS_DAYS")]})]}),(0,t.jsx)(l.azJ,{sx:{padding:"0 10px"},children:(0,t.jsx)(l.KK8,{disabled:a,min:0,max:30,step:1,value:n.freeTrialDays,onChange:function(e,n){return i("freeTrialDays",n)}})}),(0,t.jsx)(C.D0,{as:l.A_L,size:"small",type:"number",name:"freeTrialDays",sx:{width:"150px",marginTop:1},disabled:!A||a,placeholder:d("DISPLAY_STRINGS.PLACEHOLDER_EG_10"),variant:"outlined",value:n.freeTrialDays,onChange:function(e){A&&i("freeTrialDays",e.target.value)},inputProps:{min:0,max:30,step:1},InputProps:{endAdornment:(0,t.jsx)(l.jC1,{position:"end",children:d("DISPLAY_STRINGS.SAAS_DAYS")})}}),(0,N.P)(null==o?void 0:o.freeTrialDays,null==c?void 0:c.freeTrialDays)]})}),(0,t.jsx)(l.ZpM,{variant:"outlined",sx:{p:2,mt:2},children:(0,t.jsxs)(l.azJ,{children:[(0,t.jsx)(l.o5u,{variant:"h6",fontSize:20,fontWeight:600,children:d("DISPLAY_STRINGS.SAAS_FAQ")}),(0,t.jsxs)(l.nD3,{sx:{my:1},children:[(0,t.jsx)(l.Xo_,{sx:{color:"primary.main",borderRadius:"4px",borderColor:"lightgrey","&.Mu
1i-expanded":{borderRadius:"4px 4px 0 0"}},expandIcon:(0,t.jsx)(w.A,{}),children:(0,t.jsx)(l.o5u,{component:"span",fontWeight:500,children:d("DISPLAY_STRINGS.SAAS_FAQ_BILLING_QUESTION")})}),(0,t.jsx)(l.ZiS,{children:(0,t.jsx)(l.o5u,{component:"span",children:d("DISPLAY_STRINGS.SAAS_FAQ_BILLING_ANSWER")})})]})]})})]})};var q=function(e){var n,i=e.plan,r=e.setFieldValue,a=e.isLoading,o=e.currencyUnit,c=e.currentTab,d=e.setCurrentTab,S=e.touched,A=e.errors,u=(0,s.Bd)().t,_=((n={})[h]=b,n[I]=U,n[m]=H,n[p]=F,n)[c],x=[{id:h,label:u("DISPLAY_STRINGS.SAAS_PACKAGE_DETAILS"),isActive:c===h},{id:I,label:u("DISPLAY_STRINGS.SAAS_PRICING_BILLING"),isActive:c===I},{id:m,label:u("DISPLAY_STRINGS.SAAS_PERMISSIONS"),isActive:c===m},{id:p,label:u("DISPLAY_STRINGS.SAAS_CREDIT_CARD_TRIAL"),isActive:c===p}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.C1Z,{activeStep:c,children:x.map((function(e){var n=e.id,i=e.label;e.isActive;return(0,t.jsx)(l.pnw,{sx:{cursor:"pointer"},disabled:a,onClick:function(){var e=parseInt(n.toString());null==d||d(e)},children:(0,t.jsx)(l.DSl,{sx:{whiteSpace:"nowrap"},children:i})},n)}))}),(0,t.jsx)(l.azJ,{mt:2,children:(0,t.jsx)(_,{plan:i,setFieldValue:r,isLoading:a,currencyUnit:o||"$",touched:S,errors:A})})]})},K=i(73433);var W=function(e){var n,i=e.plan,r=e.setFieldValue,a=e.isLoading,o=e.currencyUnit,c=e.touched,d=e.errors,S=(0,s.Bd)().t,A=(0,Y.f)().themeMode,u=null===(n=i.messageModels)||void 0===n?void 0:n.find((function(e){return e.isDefault})),_=u&&!a,h=parseFloat((null==u?void 0:u.averageMessageCharges)||"0"),I=i.includedMessages*h,m=["When a new user signs up they will have <strong>{currencyUnit}{totalPrice}</strong> added to their sub-account","wallet to cover the first <strong>{includedMessages}</strong> messages per month charged at","<strong>{currencyUnit}{baseDefaultModelPrice}/message</strong>. After their wallet goes to {currencyUnit}0","their credit card will be charged and their wallet will be topped up to pay for additional messages."].join(" ").replace("{currencyUnit}",o||"$").replace("{totalPrice}",I.toLocaleString()).replace("{includedMessages}",i.includedMessages.toLocaleString()).replace("{currencyUnit}",o||"$").replace("{baseDefaultModelPrice}",h.toLocaleString()).replace("{currencyUnit}",o||"$");return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(l.fPr,{container:!0,spacing:2,children:[(0,t.jsxs)(l.fPr,{size:6,children:[(0,t.jsx)(l.JU7,{name:S("DISPLAY_STRINGS.SAAS_AI_CHAT_AGENTS"),required:!0,helptext:S("DISPLAY_STRINGS.SAAS_CHAT_AGENTS_HELP")}),(0,t.jsx)(C.D0,{as:l.A_L,name:"chatbots",size:"small",type:"number",fullWidth:!0,placeholder:S("DISPLAY_STRINGS.PLACEHOLDER_EG_10"),value:i.chatbots,onChange:function(e){r("chatbots",e.target.value)},inputProps:{min:0,step:1,max:100}}),(0,N.P)(null==c?void 0:c.chatbots,null==d?void 0:d.chatbots),(0,t.jsxs)(l.eKY,{children:[S("DISPLAY_STRINGS.SAAS_CHAT_AGENTS_HELP"),"."]})]}),(0,t.jsxs)(l.fPr,{size:6,children:[(0,t.jsx)(l.JU7,{name:S("DISPLAY_STRINGS.SAAS_STORAGE_CHARACTERS"),required:!0,helptext:S("DISPLAY_STRINGS.SAAS_STORAGE_CHARACTERS_HELP")}),(0,t.jsx)(C.D0,{as:l.A_L,name:"characterCount",size:"small",type:"number",fullWidth:!0,placeholder:S("DISPLAY_STRINGS.SAAS_PLACEHOLDER_EG_1000000"),value:i.characterCount,onChange:function(e){r("characterCount",e.target.value)},inputProps:{min:0,step:1e3,max:1e10}}),(0,N.P)(null==c?void 0:c.characterCount,null==d?void 0:d.characterCount),(0,t.jsx)(l.eKY,{children:S("DISPLAY_STRINGS.SAAS_STORAGE_CHARACTERS_HELP")})]}),(0,t.jsx)(l.fPr,{size:12,mt:1,children:(0,t.jsxs)(l.ZpM,{variant:"outlined",sx:{p:2},children:[(0,t.jsx)(l.o5u,{variant:"h6",fontSize:18,fontWeight:600,children:S("DISPLAY_STRINGS.SAAS_INCLUDED_MESSAGES")}),(0,t.jsx)(l.o5u,{variant:"body1",fontSize:14,color:"text.secondary",children:S("DISPLAY_STRINGS.SAAS_INCLUDED_MESSAGES_DESC")}),(0,t.jsxs)(l.z6M,{sx:{my:1},value:i.isComplimentaryCreditsRecurring,onChange:function(e){r("isComplimentaryCreditsRecurring","true"===e.target.value)},children:[(0,t.jsx)(l.ip9,{value:!0,control:(0,t.jsx)(l.sxL,{size:"small",disabled:a}),label:(0,t.jsx)(l.$ZZ,{label:S("DISPLAY_STRINGS.SAAS_MONTHLY_INCLUSION"),bold:!0,fontSize:14,tooltipTitle:S("DISPLAY_STRINGS.SAAS_MONTHLY_INCLUSION_TOOLTIP")})}),(0,t.jsx)(l.ip9,{value:!1,control:(0,t.jsx)(l.sxL,{size:"small",disabled:a}),label:(0,t.jsx)(l.$ZZ,{label:S("DISPLAY_STRINGS.SAAS_ONE_TIME_INCLUSION"),bold:!0,fontSize:14,tooltipTitle:S("DISPLAY_STRINGS.SAAS_ONE_TIME_INCLUSION_TOOLTIP")})})]}),(0,t.jsxs)(l.ZpM,{sx:{p:2,backgroundColor:"light"===A?"#eff6ff":"#1a202c"},children:[(0,t.jsxs)(l.azJ,{display:"flex",mb:2,children:[(0,t.jsx)(K.Pl,{color:"primary",fontSize:"small",sx:{marginRight:1}}),(0,t.jsx)(l.o5u,{variant:"body1",color:"primary",fontSize:16,fontWeight:600,children:S("DISPLAY_STRINGS.SAAS_CHAT_MESSAGES")})]}),(0,t.jsxs)(l.azJ,{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(l.JU7,{name:S("DISPLAY_STRINGS.SAAS_INCLUDED_MESSAGES")}),(0,t.jsxs)(l.o5u,{fontSize:14,fontWeight:600,sx:{marginRight:"10px"}
1,children:[i.includedMessages.toLocaleString()," ",S("DISPLAY_STRINGS.SAAS_MESSAGES_UNIT")]})]}),(0,t.jsx)(l.azJ,{sx:{padding:"0 10px"},children:(0,t.jsx)(l.KK8,{disabled:a,min:0,max:25e4,step:1,value:i.includedMessages,onChange:function(e,n){return r("includedMessages",n)}})}),(0,t.jsx)(C.D0,{as:l.A_L,size:"small",type:"number",name:"includedMessages",sx:{width:"250px",marginTop:1},disabled:a,placeholder:S("DISPLAY_STRINGS.SAAS_PLACEHOLDER_EG_3000"),variant:"outlined",value:i.includedMessages,onChange:function(e){r("includedMessages",e.target.value)},inputProps:{min:0,max:25e4,step:1},InputProps:{endAdornment:(0,t.jsx)(l.jC1,{position:"end",children:S("DISPLAY_STRINGS.SAAS_MESSAGES_UNIT")})}}),(0,N.P)(null==c?void 0:c.includedMessages,null==d?void 0:d.includedMessages),_&&(0,t.jsx)(l.FcD,{variant:"outlined",color:"info",sx:{mt:2},icon:!1,children:(0,t.jsx)(l.o5u,{variant:"body1",fontSize:14,color:"info",dangerouslySetInnerHTML:{__html:m}})})]})]})})]})})},J=i(81e3),Z=function(){return Z=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},Z.apply(this,arguments)};var Q=function(e){var n,i=e.plan,r=e.setFieldValue,a=e.stammerMessageModel,o=e.isLoading,c=e.currencyUnit,d=e.isEditing,S=(0,s.Bd)().t,A=function(e,n,t,a){var s;void 0===a&&(a=!1);var l=null===(s=i.messageModels)||void 0===s?void 0:s.map((function(i){var r;return i.id===t.id?Z(Z({},i),((r={})[e]=n,r)):a?Z(Z({},i),{isDefault:!1}):i}));r("messageModels",l||[])},u=(0,J.J)().userDetails,_=function(e){r("messageMarkupPercentage",e)},h=i.messageMarkupPercentage,I=c||(null==u?void 0:u.userSellingCurrencyLabel)||"$",m=(null==u?void 0:u.userBuyingCurrencyLabel)||"$";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.ZpM,{variant:"outlined",sx:{p:4},children:[(0,t.jsxs)(l.azJ,{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(l.JU7,{name:S("DISPLAY_STRINGS.MARKUP_PERCENTAGE")}),(0,t.jsxs)(l.azJ,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(l.$nd,{variant:"outlined",color:"error",size:"small",sx:{minWidth:"fit-content"},onClick:function(){return _(h-5<0?0:h-5)},children:(0,t.jsx)(K.n$,{fontSize:"small"})}),(0,t.jsxs)(l.o5u,{fontSize:14,fontWeight:500,align:"center",sx:{minWidth:"3rem"},children:[h.toLocaleString(),"%"]}),(0,t.jsx)(l.$nd,{variant:"outlined",color:"success",size:"small",sx:{minWidth:"fit-content"},onClick:function(){return _(h+5>1e3?1e3:h+5)},children:(0,t.jsx)(K.OM,{fontSize:"small"})})]})]}),(0,t.jsx)(l.azJ,{sx:{padding:"0 10px"},children:(0,t.jsx)(l.KK8,{disabled:o,min:0,max:1e3,step:1,value:h,onChange:function(e,n){return _(n)}})}),(0,t.jsxs)(l.o5u,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1,fontSize:"0.75rem",lineHeight:1.4},children:["Use the ",(0,t.jsx)("strong",{children:S("DISPLAY_STRINGS.MARKUP_PERCENTAGE")})," slider to adjust how much extra is added on top of the base cost, allowing you to set your desired profit margin. The ",(0,t.jsx)("strong",{children:"Average"})," Cost displayed below is an estimate based on"," ",(0,t.jsx)("strong",{children:"3,500 tokens per message"}),", so actual costs may vary depending on the length of each message."]})]}),(0,t.jsx)(l.K3K,{component:l.tu9,children:(0,t.jsxs)(l.XIK,{children:[(0,t.jsx)(l.ndF,{children:(0,t.jsxs)(l.Hjg,{children:[(0,t.jsx)(l.nA6,{children:S("DISPLAY_STRINGS.MODEL")}),(0,t.jsx)(l.nA6,{children:S("DISPLAY_STRINGS.YOUR_COST_AVG")}),(0,t.jsx)(l.nA6,{children:S("DISPLAY_STRINGS.CUSTOMER_PRICE_AVG")}),(0,t.jsx)(l.nA6,{children:S("DISPLAY_STRINGS.YOUR_PROFIT_AVG")}),(0,t.jsx)(l.nA6,{children:S("DISPLAY_LABELS.ENABLED")}),(0,t.jsx)(l.nA6,{children:S("DISPLAY_STRINGS.SAAS_DEFAULT")})]})}),(0,t.jsxs)(l.BFY,{children:[null===(n=i.messageModels)||void 0===n?void 0:n.map((function(e){var n,i=a[e.chatgptModel],r=null!==(n=null==u?void 0:u.sellingCurrencyRate)&&void 0!==n?n:1,s=(1+h/100)*i*r,c=s-i*r;return(0,t.jsxs)(l.Hjg,{children:[(0,t.jsx)(l.nA6,{children:e.modelLabel}),(0,t.jsxs)(l.nA6,{children:[m,i.toFixed(4)]}),(0,t.jsxs)(l.nA6,{children:[I,s.toFixed(4)]}),(0,t.jsx)(l.nA6,{children:(0,t.jsxs)(l.o5u,{color:"success",children:[I,c.toFixed(4)]})}),(0,t.jsx)(l.nA6,{children:(0,t.jsx)(C.D0,{as:l.dOG,checked:e.isActive,disabled:o,onChange:function(n){A("isActive",!!n.target.checked,e,!1)}})}),(0,t.jsx)(l.nA6,{children:(0,t.jsx)(C.D0,{as:l.dOG,disabled:o||!e.isActive,checked:e.isDefault,onCh
1ange:function(n){A("isDefault",!!n.target.checked,e,!0)}})})]},e.id)})),!d&&(0,t.jsx)(l.Hjg,{children:(0,t.jsx)(l.nA6,{colSpan:6,align:"center",children:S("DISPLAY_STRINGS.CREATE_PACKAGE_FIRST_MSG")})})]})]})})]})};var $=function(e){var n=e.plan,i=e.setFieldValue,r=e.isLoading,a=e.currencyUnit,o=e.isEditing,c=(e.touched,e.errors,(0,s.Bd)().t),d=n.stammerMessageModel||{};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(l.fPr,{container:!0,spacing:2,children:(0,t.jsx)(l.fPr,{size:12,children:(0,t.jsxs)(l.ZpM,{variant:"outlined",sx:{p:2},children:[(0,t.jsxs)(l.fPr,{size:12,display:"flex",justifyContent:"space-between",alignItems:"center",mb:1,children:[(0,t.jsx)(l.o5u,{variant:"h6",fontSize:20,fontWeight:600,children:"".concat(n.name," (").concat((null==n?void 0:n.planKey)||"basic",")")}),(0,t.jsxs)(l.azJ,{children:[(0,t.jsx)(l.dOG,{color:"warning",checked:n.bypassSubaccountBilling,onChange:function(e){return i("bypassSubaccountBilling",e.target.checked)}}),(0,t.jsx)(l.$ZZ,{label:c("DISPLAY_STRINGS.SAAS_BYPASS_SUBACCOUNT_BILLING"),fontSize:14,bold:!0})]})]}),n.bypassSubaccountBilling?(0,t.jsx)(l.FcD,{variant:"outlined",color:"warning",icon:!1,children:(0,t.jsx)(l.o5u,{variant:"body1",fontSize:14,color:"warning",children:c("DISPLAY_STRINGS.SAAS_BYPASS_SUBACCOUNT_BILLING_WARNING")})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(Q,{plan:n,setFieldValue:i,stammerMessageModel:d,isLoading:r,currencyUnit:a||"$",isEditing:o})})]})})})})};var X=function(e){var n,i=e.plan,r=e.setFieldValue,a=e.isLoading,o=e.currencyUnit,c=e.isEditing,d=e.currentTab,S=e.setCurrentTab,A=e.touched,u=e.errors,_=(0,s.Bd)().t,h=((n={})[x]=W,n[g]=$,n)[d],I=[{id:x,label:_("DISPLAY_STRINGS.SAAS_TAB_CHAT_AGENTS_STORAGE"),isActive:d===x},{id:g,label:_("DISPLAY_STRINGS.SAAS_TAB_MESSAGE_REBILLING"),isActive:d===g},{id:E,label:_("DISPLAY_STRINGS.SAAS_TAB_TEMPLATE_AGENTS"),isActive:d===E,disabled:!0,disabledTooltip:_("DISPLAY_STRINGS.SAAS_COMING_SOON")}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.azJ,{children:[(0,t.jsx)(l.$ZZ,{bold:!0,fontSize:14,label:_("DISPLAY_STRINGS.SAAS_ENABLE_CHAT_AGENTS")}),(0,t.jsx)(l.dOG,{checked:i.isChatAgentsEnabled,onChange:function(e){var n=e.target.checked;r("isChatAgentsEnabled",n),n||(r("chatbots",0),r("characterCount",0),r("includedMessages",0))}})]}),i.isChatAgentsEnabled&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.azJ,{children:(0,t.jsx)(l.qIE,{sx:{mb:2},tabs:I,selectedTab:d,onTabChange:function(e){e!==E&&(null==S||S(e))}})}),(0,t.jsx)(l.azJ,{mt:2,children:(0,t.jsx)(h,{plan:i,setFieldValue:r,isLoading:a,currencyUnit:o,isEditing:c,touched:A,errors:u})})]})]})},ee=i(63809),ne=i(10838),ie=i(14428),te=i(38588),re=i(41007),ae=i(31547),se=i(54815),le=i(26120),oe=i(49780),ce=i(88458),de=i(73349),Se=i(88360);var Ae=function(e){var n,i=e.plan,a=e.setFieldValue,o=e.isLoading,c=e.currencyUnit,d=e.touched,S=e.errors,A=(0,s.Bd)().t,u=(0,Y.f)().themeMode,_=Number(i.voiceAgents||0)>0;r.useEffect((function(){_||0===i.concurrentCallLimit?_&&Number(i.concurrentCallLimit||0)<1&&a("concurrentCallLimit",1):a("concurrentCallLimit",0)}),[_,i.concurrentCallLimit,a]);var h=!o,I=(null===(n=i.stammerBaseCost)||void 0===n?void 0:n.perMinute)||.13,m=i.freeVoiceMinutes*I,p=c||"$",x="\n When a new user signs up they will have <strong>".concat(p).concat(m.toLocaleString(),"</strong> added to their sub-account\n wallet to cover the first ").concat(i.freeVoiceMinutes.toLocaleString()," voice minutes per month charged at\n <strong>").concat(p).concat(I.toLocaleString(),"</strong>/minute. After their wallet goes to\n <strong>").concat(p,"0</strong> their credit card will be charged and their wallet will be topped up to pay for additional voice calls.\n ").replace(/\s+/g," ").trim();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ee.A,{variant:"outlined",sx:{p:2},children:[(0,t.jsx)(ne.A,{variant:"h6",fontSize:18,fontWeight:600,children:A("DISPLAY_STRINGS.SAAS_VOICE_CONFIGURATION")}),(0,t.jsxs)(ie.A,{container:!0,spacing:2,mt:1,children:[(0,t.jsxs)(ie.A,{size:6,children:[(0,t.jsx)(l.JU7,{name:A("DISPLAY_STRINGS.SAAS_AI_VOICE_AGENTS_PHONE_NUMBERS"),helptext:A("DISPLAY_STRINGS.SAAS_VOICE_AGENTS_HELP")}),(0,t.jsx)(C.D0,{as:te.A,size:"small",type:"number",fullWidth:!0,disabled:o,placeholder:A("DISPLAY_STRINGS.PLACEHOLDER_EG_10"),variant:"outlined",name:"voiceAgents",inputProps:{min:0,max:100,step:1},onChange:function(e){var n=Number(e.target.value||0);a("voiceAgents",n),a("concurrentCallLimit",n>0?Math.max(Number(i.concurrentCallLimit||0),1):0)}}),(0,N.P)(null==d?void 0:d.voiceAgents,null==S?void 0:S.voiceAgents),(0,t.jsx)(re.A,{children:A("DISPLAY_STRINGS.SAAS_VOICE_AGENTS_HELP")})]}),(0,t.jsxs)(ie.A,{size:6,children:[(0,t.jsx)(l.JU7,{name:A("DISPLAY_STRINGS.SAAS_STORAGE_CHARACTERS"),required:!0,helptext:A("DISPLAY_STRINGS.SAAS_VOICE_STORAGE_CHARACTERS_HELP")}),(0,t.jsx)(C.D0,{as:te.A,size:"small",type:"number",fullWidth:!0,placeholder:A("DISPLAY_STRINGS.SAAS_PLACEHOLDER_EG_1000000"),value:i.characterCount,onChange:function(e){a("characterCount",e.target.value)},inputProps:{min:0,max:1e4,step:1}}),(0,N.P)(null==d?void 0:d.voiceKbLimit,null==S?void 0:S.voiceKbLimit),(0,t.jsx)(re.A,{children:A("DISPLAY_STRINGS.SAAS_VOICE_STORAGE_CHARACTERS_HELP")})]})]}),(0,t.jsx)(ae.A,{mt:1,children:(0,t.jsxs)(ie.A,{size:6,children:[(0,t.jsx)(l.JU7,{name:A("DISPLAY_STRINGS.CONCURRENT_CALL_LIMIT"),helptext:A("DISPLAY_STRINGS.SAAS_CONCURRENT_CALL_LIMIT_HELP")}),(0,t.jsx)(C.D0,{as:te.A,size:"small",type:"number",fullWidth:!0,disabled:o||!_,placeholder:A("DISPLAY_STRINGS.PLACEHOLDER_EG_10"),variant:"outlined",name:"concurrentCallLimit",inputProps:{min:_?1:0,max:100,step:1}}),(0,t.jsx)(re.A,{children:A("DISPLAY_STRINGS.SAAS_CONCURRENT_CALL_LIMIT_HELP")}),(0,N.P)(null==d?void 0:d.concurrentCallLimit,null==S?void 0:S.concurrentCallLimit)]})})]}),(0,t.jsxs)(ee.A,{variant:"outlined",sx:{p:2,mt:2},children:[(0,t.jsx)(ne.A,{variant:"h6",fontSize:18,fontWeight:600,children:A("DISPLAY_STRINGS.SAAS_INCLUDED_VOICE_MINUTES")}),(0,t.jsx)(ne.A,{variant:"body1",fontSize:14,color:"text.secondary",children:A("DISPLAY_STRINGS.SAAS_INCLUDED_VOICE_MINUTES_DESC")}),(0,t.jsxs)(se.A,{sx:{my:1},value:i.isVoiceMinutesRecurring,onChange:function(e){a("isVoiceMinutesRecurring","true"===e.target.value)},children:[(0,t.jsx)(le.A,{value:!0,control:(0,t.jsx)(oe.A,{size:"small",disabled:o}),label:(0,t.jsx)(l.$ZZ,{label:A("DISPLAY_STRINGS.SAAS_MONTHLY_INCLUSION"),bold:!0,fontSize:14,tooltipTitle:A("DISPLAY_STRINGS.SAAS_MONTHLY_INCLUSION_TOOLTIP")})}),(0,t.jsx)(le.A,{value:!1,control:(0,t.jsx)(oe.A,{size:"small",disabled:o}),label:(0,t.jsx)(l.$ZZ,{label:A("DISPLAY_STRINGS.SAAS_ONE_TIME_INCLUSION"),bold:!0,fontSize:14,tooltipTitle:A("DISPLAY_STRINGS.SAAS_ONE_TIME_INCLUSION_TOOLTIP")})})]}),(0,t.jsxs)(ee.A,{sx:{p:2,backgroundColor:"light"===u?"#eff6ff":"#1a202c"},children:[(0,t.jsxs)(ae.A,{display:"flex",mb:2,children:[(0,t.jsx)(Se.A,{color:"primary",fontSize:"small",sx:{marginRight:1}}),(0,t.jsx)(ne.A,{variant:"body1",color:"primary",fontSize:16,fontWeight:600,children:A("DISPLAY_STRINGS.SAAS_VOICE_MINUTES")})]}),(0,t.jsxs)(ae.A,{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(l.JU7,{name:A("DISPLAY_STRINGS.SAAS_INCLUDED_MINUTES")}),(0,t.jsxs)(ne.A,{fontSize:14,fontWeight:600,sx:{marginRight:"10px"}
1,children:[i.freeVoiceMinutes.toLocaleString()," ",A("DISPLAY_STRINGS.SAAS_MINUTES_UNIT")]})]}),(0,t.jsx)(ae.A,{sx:{padding:"0 10px"},children:(0,t.jsx)(l.KK8,{disabled:o,min:0,max:5e3,step:1,value:i.freeVoiceMinutes,onChange:function(e,n){return a("freeVoiceMinutes",n)}})}),(0,t.jsx)(C.D0,{as:te.A,size:"small",type:"number",name:"freeVoiceMinutes",sx:{width:"250px",marginTop:1},disabled:o,placeholder:A("DISPLAY_STRINGS.SAAS_PLACEHOLDER_EG_3000"),variant:"outlined",value:i.freeVoiceMinutes,onChange:function(e){a("freeVoiceMinutes",e.target.value)},inputProps:{min:0,max:5e3,step:1},InputProps:{endAdornment:(0,t.jsx)(ce.A,{position:"end",children:A("DISPLAY_STRINGS.SAAS_MINUTES_UNIT")})}}),(0,N.P)(null==d?void 0:d.freeVoiceMinutes,null==S?void 0:S.freeVoiceMinutes),h&&(0,t.jsx)(de.A,{variant:"outlined",color:"info",sx:{mt:2},icon:!1,children:(0,t.jsx)(ne.A,{variant:"body1",fontSize:14,color:"info",dangerouslySetInnerHTML:{__html:x}})})]})]})]})},ue=i(48651),_e=i(34369);var he=function(e){var n,i=e.plan,r=e.setFieldValue,a=e.isLoading,l=e.currencyUnit,o=(0,s.Bd)().t;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ue.A,{icon:(0,t.jsx)(Se.A,{fontSize:"small"}),title:o("DISPLAY_STRINGS.PHONE_NUMBERS"),subheading:o("DISPLAY_STRINGS.PHONE_NUMBERS_SUBHEADING"),values:i,basePrice:2,basepriceMessage:o("DISPLAY_STRINGS.PHONE_BASEPRICE_MESSAGE"),setFieldValue:r,field:"phoneNumberMarkup",isLoading:a,currencyUnit:l||"$",durationMessage:o("DISPLAY_STRINGS.SAAS_CHARGED_PER_MONTH")}),(0,t.jsx)(ue.A,{icon:(0,t.jsx)(_e.A,{fontSize:"small"}),title:o("DISPLAY_STRINGS.CALL_MINUTES"),subheading:o("DISPLAY_STRINGS.CALL_MINUTES_SUBHEADING"),values:i,basePrice:(null===(n=i.stammerBaseCost)||void 0===n?void 0:n.perMinute)||.13,setFieldValue:r,field:"callMinutesMarkup",isLoading:a,currencyUnit:l||"$",durationMessage:o("DISPLAY_STRINGS.CALL_DURATION_MESSAGE")})]})};var Ie=function(e){var n,i=e.plan,r=e.setFieldValue,a=e.isLoading,o=e.currencyUnit,c=e.currentTab,d=e.setCurrentTab,S=e.touched,A=e.errors,u=(0,s.Bd)().t,_=((n={})[P]=Ae,n[L]=he,n)[c],h=[{id:P,label:u("DISPLAY_STRINGS.SAAS_VOICE_CONFIGURATION"),isActive:c===P},{id:L,label:u("DISPLAY_STRINGS.SAAS_USAGE_REBILLING"),isActive:c===L}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.azJ,{children:[(0,t.jsx)(l.$ZZ,{bold:!0,fontSize:14,label:u("DISPLAY_STRINGS.SAAS_ENABLE_AI_VOICE_AGENTS")}),(0,t.jsx)(l.dOG,{checked:i.isVoiceAgentsEnabled,onChange:function(e){var n=e.target.checked;r("isVoiceAgentsEnabled",n),n||(r("voiceAgents",0),r("concurrentCallLimit",0),r("voiceKbLimit",0),r("freeVoiceMinutes",0),r("isVoiceMinutesRecurring",!1),r("phoneNumberMarkup",0),r("callMinutesMarkup",0),r("extraConcurrentCallsMarkup",0))}})]}),i.isVoiceAgentsEnabled&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.qIE,{sx:{mb:2},tabs:h,selectedTab:c,onTabChange:function(e){null==d||d(e)}}),(0,t.jsx)(_,{plan:i,setFieldValue:r,isLoading:a,currencyUnit:o,touched:S,errors:A})]})]})},me=i(48513),pe=me.Ik().shape({name:me.Yj().required("Name is required"),description:me.Yj().notRequired(),planKey:me.Yj().required("Plan Key is required"),chatbots:me.ai().min(0,"AI Chat Agents must be greater than 0").max(100,"AI Chat Agents must be less than 100").required("AI Chat Agents is required"),characterCount:me.ai().min(0,"Storage (Characters) must be greater than 0").max(1e10,"Storage (Characters) must be less than 10,000,000,000").required("Storage (Characters) is required"),features:me.YO(me.Yj().required("Feature is required").min(1,"Feature is required").max(255,"Feature is too long")).notRequired(),freeTrialDays:me.ai().min(0,"Free Trial Days must be greater than 0").max(30,"Free Trial Days must be less than 30").required("Free Trial Days is required"),includedMessages:me.ai().min(0,"Included Messages must be greater than 0").max(25e4,"Included Messages must be less than 250,000").required("Included Messages is required"),isComplimentaryCreditsRecurring:me.zM().required(),isExternallyAvailable:me.zM().required(),isOneTimePaymentEnabled:me.zM().required(),oneTimePaymentAmount:me.ai().when("isOneTimePaymentEnabled",{is:!0,then:function(e){return e.min(0,"One-Time Payment Amount must be greater than 0").required("One-Time Payment Amount is required")},otherwise:function(e){return e.notRequired()}}),oneTimePaymentDescription:me.Yj().when("isOneTimePaymentEnabled",{is:!0,then:function(e){return e.required("One-Time Payment Description is required")},otherwise:function(e){return e.notRequired()}}),bypassSubaccountBilling:me.zM().required(),isVatEnabled:me.zM().required(),vatPercentage:me.ai().min(0,"VAT / Tax Percentage must be greater than 0").max(100,"VAT / Tax Percentage must be less than 100").required("VAT / Tax Percentage is required"),subscriptionPrices:me.YO(me.Ik().shape({billingPeriod:me.Yj().required("Billing Perio
1d is required"),price:me.ai().min(0,"Price must be greater than 0").required("Price is required")})).notRequired(),isVoiceAgentsEnabled:me.zM().required(),isChatAgentsEnabled:me.zM().required(),voiceAgents:me.ai().min(0,"Voice Agents must be greater than 0").max(100,"Voice Agents must be less than 100").required("Voice Agents is required"),concurrentCallLimit:me.ai().when(["isVoiceAgentsEnabled","voiceAgents"],{is:function(e,n){return e&&Number(n||0)>0},then:function(e){return e.min(1,"Concurrent Call Limit must be at least 1 when voice agents are enabled")},otherwise:function(e){return e.min(0,"Concurrent Call Limit cannot be negative")}}).max(1e4,"Concurrent Call Limit must be less than 10,000").required("Concurrent Call Limit is required"),voiceKbLimit:me.ai().min(0,"Voice KB Limit must be at least 0").max(1e4,"Voice KB Limit must be less than 10,000").required("Voice KB Limit is required"),freeVoiceMinutes:me.ai().min(0,"Free Voice Minutes must be greater than 0").max(1e6,"Free Voice Minutes must be less than 1,000,000").required("Free Voice Minutes is required"),isVoiceMinutesRecurring:me.zM().required(),phoneNumberMarkup:me.ai().min(0,"Phone Number Markup must be greater than 0").max(1e3,"Phone Number Markup must be less than 1000").required("Phone Number Markup is required"),callMinutesMarkup:me.ai().min(0,"Call Minutes Markup must be greater than 0").max(1e3,"Call Minutes Markup must be less than 1000").required("Call Minutes Markup is required"),extraConcurrentCallsMarkup:me.ai().min(0,"Extra Concurrent Calls Markup must be greater than 0").max(1e3,"Extra Concurrent Calls Markup must be less than 1000").required("Extra Concurrent Calls Markup is required"),includedAIAgents:me.YO(me.Ik().shape({name:me.Yj().required("Name is required"),version:me.Yj().required("Version is required"),description:me.Yj().required("Description is required")})).notRequired(),subscriptionPackagePermissions:me.YO(me.Ik().shape({name:me.Yj().required("Name is required"),codename:me.Yj().required("Codename is required")})).notRequired(),messageModels:me.YO(me.Ik().shape({id:me.ai().notRequired(),chatgptModel:me.Yj().required("ChatGPT Model is required")})).notRequired()}),xe=function(){return xe=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},xe.apply(this,arguments)},ge=function(e,n,i){if(i||2===arguments.length)for(var t,r=0,a=n.length;r<a;r++)!t&&r in n||(t||(t=Array.prototype.slice.call(n,0,r)),t[r]=n[r]);return e.concat(t||Array.prototype.slice.call(n))};function Ee(e,n){var i=new URL(e,window.location.origin);n&&Object.entries(n).forEach((function(e){var n=e[0],t=e[1];i.searchParams.set(n,t)}));var t="/".concat((0,d.BY)()),r=i.pathname;return r===t||r==="".concat(t,"/")?r="/":r.startsWith("".concat(t,"/"))&&(r=r.slice(t.length)||"/"),"".concat(r).concat(i.search).concat(i.hash)}var Pe=function(e){var n,i,c=e.packageId,E=(0,s.Bd)().t,L=(0,a.Zp)(),N=(0,a.ok)(),b=N[0],R=N[1],D=b.get("tab"),y=(0,r.useState)(D||A),G=y[0],O=y[1],Y=(0,r.useState)(h),M=Y[0],z=Y[1],U=(0,r.useState)(!1),V=(U[0],U[1]),B=(0,r.useState)(!1),H=B[0],w=B[1],F=(0,r.useRef)("default");(0,r.useEffect)((function(){if((D||G!==A)&&D!==G){var e=new URLSearchParams(b);e.set("tab",G),R(e,{replace:!0})}}),[G,D,b,R]);var K=(0,f.ip)(c),W=K.data,Z=K.isLoading,Q=K.refetch,$=(0,J.J)().userDetails,ee=H||Z,ne=(null==W?void 0:W.currencyUnit)||(null==$?void 0:$.userSellingCurrencyLabel)||"$",ie=(null==W?void 0:W.agencyId)||null,te=(null==W?void 0:W.package)||T,re=null!==(i=null==W?void 0:W.stripeConnected)&&void 0!==i?i:!!Z&&void 0,ae=null!==c;(0,r.useEffect)((function(){ae||!1!==re||L(Ee(S.n.WHITE_LABEL.AGENCY_WHITE_LABEL_SETTINGS,{tab:"stripe_integration"}),{replace:!0})}),[ae,L,re]);var se=((n={})[A]=q,n[u]=X,n[_]=Ie,n)[G],le=null==$?void 0:$.permissions.includes(k.Qp.CAN_ACCESS_VOICE_AGENTS.value),oe=[{id:A,label:E("DISPLAY_STRINGS.SAAS_GENERAL"),isActive:G===A},{id:u,label:E("DISPLAY_STRINGS.SAAS_AI_CHAT"),isActive:G===u}];le&&(oe=ge(ge([],oe,!0),[{id:_,label:E("DISPLAY_STRINGS.SAAS_AI_VOICE"),isActive:G===_}],!1));var ce=function(){var e=[[A,h],[A,I],[A,m],[A,p],[u,x],[u,g]];le&&(e=ge(ge([],e,!0),[[_,P]],!1));var n=e.findIndex((function(e){var n=e[0],i=e[1];return n===G&&i===M})),i=e[n>=0&&n<e.length-1?n+1:h],t=i[0],r=i[1];z(r),O(t)};return ae||!1!==re?(0,t.jsxs)(l.fPr,{container:!0,children:[(0,t.jsx)(l.fPr,{size:12,children:(0,t.jsx)(l.$nd,{variant:"text",color:"primary",startIcon:(0,t.jsx)(o.A,{}),onClick:function(){var e=b.get("package-type");L(Ee(S.n.WHITE_LABEL.SAAS_CONFIGURATOR_DASHBOARD,e?{"package-type":e}:void 0))},children:E("DISPLAY_STRINGS.SAAS_BACK_TO_PACKAGES")})}),(0,t.jsx)(j.l1m,{initialValues:te,enableReinitialize:!0,validationSchema:pe,onSubmit:function(e,n){w(!0);var i=b.get("package-type"),t=null;if(!ie)return(0,d.Sx)("","Unable to complete the request","error"),n.setSubmitting(!1),void w(!1);var r=xe(xe({},function(e){return e.isVoiceAgentsEnabled&&0!==Number(e.voiceAgents||0)?xe(xe({},e),{voiceAgents:Number(e.voiceAgents||0),concurrentCallLimit:Math.max(Number(e.concurrentCallLimit||0),1)}):xe(xe({},e),{voiceAgents:Number(e.voiceAgents||0),concurrentCallLimit:0})}(e)),{agency:ie});(t=ae?(0,f.y6)(c,r):(0,f.N7)(r,i))&&t.then((function(e){var i="next"===F.current;if(n.setErrors({}),(0,d.Sx)("",ae?"Package updated successfully":"Package created successfully","success"),e.redirectUrl){var t=Ee(e.redirectUrl);t==="".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash)?Q():L(t)}else if(ae&&!i){var r=b.get("package-type");L(Ee(S.n.WHITE_LABEL.SAAS_CONFIGURATOR_DASHBOARD,r?{"package-type":r}:void 0))}else ae&&Q();i&&ce()})).catch((function(e){var i;console.error(e);var t=(0,d.Cb)((null===(i=e.response)||void 0===i?void 0:i.data)||{});n.setErrors(t.errors||{}),t.message&&(0,d.Sx)("",t.message,"error");var r=(0,d.PZ)(t.errors||t);
1r&&Object.entries(r).forEach((function(e){var n=e[0],i=e[1],t=n.replace("non_field_errors","Errors").split(".").pop()||"";t=t?(0,d.wy)(t):"Errors",(0,d.Sx)(t,i.join("</br>"),"error")}))})).finally((function(){F.current="default",n.setSubmitting(!1),w(!1),V(!1)}))},children:function(e){var n=e.values,i=e.touched,r=e.errors,a=e.setFieldValue,s=e.handleSubmit;return(0,t.jsxs)(l.fPr,{container:!0,width:"100%",spacing:2,mt:2,display:"flex",flexDirection:"row",alignItems:"stretch",children:[(0,t.jsx)(l.fPr,{flex:1,sx:{display:"flex",flexDirection:"column",minWidth:0},children:(0,t.jsxs)(l.ZpM,{sx:{height:"100%"},children:[(0,t.jsx)(l.azJ,{sx:{px:2,py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:(0,t.jsx)(l.IzF,{value:G,exclusive:!0,onChange:function(e,n){if(null!==n){O(n),z(h);var i=new URLSearchParams(b);i.set("tab",n),R(i)}},size:"small",color:"primary",disabled:ee,"aria-label":E("DISPLAY_STRINGS.SAAS_CONFIGURE_AI_SUBSCRIPTION_PRODUCT"),children:oe.map((function(e){return(0,t.jsx)(l.ffE,{value:e.id,children:e.label},e.id)}))})}),(0,t.jsxs)(l.Wux,{sx:{p:3,"&:last-child":{pb:3}},children:[(0,t.jsx)(l.azJ,{sx:{mb:2.5},children:(0,t.jsx)(l.o5u,{variant:"subtitle1",color:"primary",fontWeight:700,children:E("DISPLAY_STRINGS.SAAS_CONFIGURE_AI_SUBSCRIPTION_PRODUCT")})}),(0,t.jsx)(C.lV,{children:(0,t.jsx)(se,{plan:n,setFieldValue:a,isLoading:ee,currencyUnit:ne,isEditing:ae,currentTab:M,setCurrentTab:z,touched:i,errors:r})}),(0,t.jsxs)(l.azJ,{mt:3,display:"flex",justifyContent:"flex-end",gap:1,children:[(0,t.jsx)(l.$nd,{variant:"outlined",color:"primary",disabled:ee,onClick:function(){F.current="default",s(),V(!1)},children:E(ae?"DISPLAY_STRINGS.SAAS_UPDATE":"DISPLAY_STRINGS.SAAS_CREATE")}),ae&&G!==_&&(0,t.jsx)(l.$nd,{variant:"contained",color:"primary",disabled:ee,onClick:function(){F.current="next",s(),V(!0)},children:E("DISPLAY_STRINGS.SAAS_UPDATE_AND_NEXT")})]})]})]})}),(0,t.jsx)(l.fPr,{sx:{display:"flex",flexDirection:"column",width:435,maxWidth:"100%",flexShrink:0},children:(0,t.jsx)(l.Zkm,{title:E("DISPLAY_STRINGS.SAAS_PREVIEW"),titleHeight:32,fontSize:18,sx:{height:"100%"},children:(0,t.jsxs)(l.azJ,{mt:2,children:[(0,t.jsx)(l.o5u,{variant:"body1",color:"text.secondary",mb:2,children:E("DISPLAY_STRINGS.SAAS_PREVIEW_DESC")}),(0,t.jsx)(v.A,{isLoading:ee,plan:n,packageType:"active",isMostPopular:!0,currencyUnit:ne,billingPeriod:"month",billingPeriodLabels:{month:E("DISPLAY_STRINGS.SAAS_BILLING_MONTHLY"),year:E("DISPLAY_STRINGS.SAAS_BILLING_YEARLY"),quarter:E("DISPLAY_STRINGS.SAAS_BILLING_QUARTERLY")}})]})})})]})}},c?"package-".concat(c):"new-package")]}):null},Le=i(45602),Te=i(39675);function fe(e){var n=e.children,i=(0,Le.jE)();return(0,t.jsx)(Te.R2,{children:(0,t.jsx)(Te.bq,{queryClient:i,children:n})})}var ve=i(42259);function Ce(){var e=(0,s.Bd)().t,n=(0,a.Zp)(),i=(0,a.ok)()[0],r=(0,a.g)(),A=r.packageId?Number(r.packageId):null,u=(0,t.jsx)(l.m_M,{title:e("DISPLAY_STRINGS.SAAS_BACK_TO_PACKAGES"),arrow:!0,children:(0,t.jsx)(l.K0,{onClick:function(){var e=i.get("package-type");n(function(e,n){var i=new URL(e,window.location.origin);n&&Object.entries(n).forEach((function(e){var n=e[0],t=e[1];i.searchParams.set(n,t)}));var t="/".concat((0,d.BY)()),r=i.pathname;return r===t||r==="".concat(t,"/")?r="/":r.startsWith("".concat(t,"/"))&&(r=r.slice(t.length)||"/"),"".concat(r).concat(i.search).concat(i.hash)}(S.n.WHITE_LABEL.SAAS_CONFIGURATOR_DASHBOARD,e?{"package-type":e}:void 0))},"aria-label":e("DISPLAY_STRINGS.SAAS_BACK_TO_PACKAGES"),sx:function(e){e.palette.getContrastText(e.palette.primary.main);return{width:32,height:32,color:e.palette.common.white,flexShrink:0,transition:e.transitions.create(["background-color","border-color","transform"],{duration:e.transitions.duration.shorter}),"&:hover":{bgcolor:"transparent",color:e.palette.common.white,transform:"translateX(-2px)"},"& .MuiSvgIcon-root":{fontSize:20}}},children:(0,t.jsx)(o.A,{})})});return(0,t.jsxs)(fe,{children:[(0,t.jsx)(l.aTG,{icon:(0,t.jsx)("i",{className:"fa-solid fa-cube"}),heading:e(A?"DISPLAY_LABELS.UPDATE_SUBSCRIPTION_PACKAGE":"DISPLAY_LABELS.CREATE_SUBSCRIPTION_PACKAGE"),leftContent:u}),(0,t.jsx)(c.A,{children:(0,t.jsxs)(l.azJ,{sx:{display:"grid",gap:3,py:{xs:2,md:3}},children:[(0,t.jsx)(ve.l,{}),(0,t.jsx)(Pe,{packageId:A})]})})]})}},48651:function(e,n,i){var t=i(78685),r=i(2057),a=i(63809),s=i(31547),l=i(10838),o=i(26400),c=i(73349),d=i(50143),S=i(69179),A=i(90855),u=i(54935),_=i(50764),h=i(87722),I=i(81e3),m=i(16657);n.A=function(e){var n,i=e.icon,p=e.title,x=e.subheading,g=e.basePrice,E=e.basepriceMessage,P=e.values,L=e.setFieldValue,T=e.field,f=e.isLoading,v=e.currencyUnit,C=e.durationMessage,j=(0,m.Bd)().t,N=(0,d.f)().themeMode,b=(0,I.J)().userDetails,R=null!==(n=null==b?void 0:b.sellingCurrencyRate)&&void 0!==n?n:1,D=P[T],y=g*R,G=D*y/100+y,O=G-y,Y=(null==b?void 0:b.userBuyingCurrencyLabel)||"$",M=(0,r.useState)(!1),z=M[0],U=M[1];return(0,t.jsxs)(a.A,{sx:{p:2,mb:2},variant:"outlined",children:[(0,t.jsxs)(s.A,{display:"flex",alignItems:"center",children:[(0,t.jsx)(s.A,{sx:{backgroundColor:"light"===N?"#eff6ff":"#1a202c",p:1,borderRadius:"10px",marginRight:2},children:i}),(0,t.jsxs)(s.A,{children:[(0,t.jsx)(l.A,{variant:"body1",fontSize:14,fontWeight:500,children:p}),(0,t.jsx)(l.A,{variant:"body1",fontSize:14,color:"text.secondary",children:x})]})]}),(0,t.jsxs)(s.A,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",my:2,children:[(0,t.jsxs)(l.A,{variant:"body1",fontSize:32,fontWeight:500,children:[v,G.toFixed(2)]}),(0,t.jsx)(l.A,{variant:"body1",fontSize:14,color:"text.secondary",children:C})]}),(0,t.jsxs)(s.A,{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",children:[(0,t.jsx)(S.JU7,{name:j("DISPLAY_STRINGS.MARKUP_PERCENTAGE")}),(0,t.jsxs)(l.A,{fontSize:14,fontWeight:500,sx:{marginRight:"10px"}
1,children:[D.toLocaleString(),"%"]})]}),(0,t.jsx)(s.A,{sx:{padding:"0 10px"},children:(0,t.jsx)(S.KK8,{disabled:f,min:0,max:1e3,step:1,value:D,onChange:function(e,n){return L(T,n)}})}),(0,t.jsxs)(o.A,{onClick:function(){return U(!z)},variant:"text",sx:{mt:2,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsxs)(s.A,{display:"flex",alignItems:"center",children:[(0,t.jsx)(_.A,{fontSize:"small",sx:{mr:1},color:"primary"}),(0,t.jsx)(l.A,{variant:"body1",fontSize:14,children:j("DISPLAY_STRINGS.SAAS_DETAILS")})]}),z?(0,t.jsx)(A.A,{fontSize:"small"}):(0,t.jsx)(u.A,{fontSize:"small"})]}),z&&(0,t.jsxs)(s.A,{sx:{backgroundColor:"light"===N?"#eff6ff":"#1a202c",borderRadius:"5px",m:1,p:1.5},children:[(0,t.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(l.A,{variant:"body1",fontWeight:500,fontSize:14,children:j("DISPLAY_STRINGS.SAAS_BASE_PRICE")}),(0,t.jsxs)(l.A,{variant:"body1",fontSize:14,children:[Y,g.toFixed(2)]})]}),(0,t.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(l.A,{variant:"body1",fontWeight:500,fontSize:14,children:j("DISPLAY_STRINGS.YOUR_PRICE")}),(0,t.jsxs)(l.A,{variant:"body1",fontSize:14,children:[v,G.toFixed(2)]})]}),(0,t.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)(l.A,{variant:"body1",fontWeight:500,fontSize:14,children:j("DISPLAY_STRINGS.YOUR_PROFIT")}),(0,t.jsxs)(l.A,{variant:"body1",fontSize:14,children:[v,O.toFixed(2)]})]}),E&&(0,t.jsx)(c.A,{sx:{mt:1,"& .MuiAlert-message":{p:0}},variant:"outlined",color:"warning",icon:!1,children:(0,t.jsxs)(l.A,{variant:"body2",fontSize:12,color:"warning",children:[(0,t.jsx)(h.A,{sx:{fontSize:"small",marginRight:2},color:"warning"}),E]})})]})]})}},88880:function(e,n,i){i.d(n,{S7:function(){return a},qb:function(){return r}});var t=i(14160),r=function(e){void 0===e&&(e=!0);var n=[{adminDashboard:[t.Qp.CAN_CREATE_CHATBOT.value,t.Qp.CAN_CUSTOMIZE_APPEARANCE.value,t.Qp.CAN_VIEW_DASHBOARD.value,t.Qp.CAN_UPDATE_CHATBOT.value,t.Qp.CAN_DELETE_CHATBOT.value,t.Qp.CAN_VIEW_CONVERSATIONS.value,t.Qp.CAN_UPDATE_KNOWLEDGE_BASE.value,t.Qp.CAN_UPDATE_LEADS.value,t.Qp.CAN_UPDATE_SCHEDULING.value,t.Qp.CAN_UPDATE_FUNCTIONS.value,t.Qp.CAN_USE_CHATBOT_AUDIO.value,t.Qp.CAN_USE_CLAUDE_MODELS.value,t.Qp.CAN_USE_GROK_MODELS.value,t.Qp.CAN_USE_AI_VISION.value,t.Qp.CAN_USE_AUDIO_FEATURES.value,t.Qp.CAN_USE_CONVERSATION_SUMMARY.value,t.Qp.CAN_USE_BACKUP_LLM_MODEL.value]},{voiceAgents:[t.Qp.CAN_ACCESS_VOICE_AGENTS.value,t.Qp.CAN_USE_VOICE_PREMIUM_MODELS.value,t.Qp.CAN_USE_VOICE_GENERAL_ACTIONS.value,t.Qp.CAN_USE_VOICE_CUSTOM_TOOLS.value,t.Qp.CAN_VIEW_VOICE_ANALYTICS.value,t.Qp.CAN_VIEW_VOICE_CALL_LOGS.value,t.Qp.CAN_USE_VOICE_LEAD_COLLECTION.value,t.Qp.CAN_MAKE_OUTBOUND_VOICE_CALLS.value,t.Qp.CAN_EMBED_VOICE_AGENT.value,t.Qp.CAN_INTEGRATE_TWILIO.value,t.Qp.CAN_PURCHASE_PHONE_NUMBERS.value],masterchat:[t.Qp.CAN_ACCESS_MASTERCHAT.value],integrations:[t.Qp.CAN_ACCESS_API_AND_WEBHOOKS.value,t.Qp.CAN_EMBED_CHATBOT.value,t.Qp.CAN_UPDATE_INTEGRATIONS.value,t.Qp.CAN_USE_ELEVEN_LABS_API.value,t.Qp.CAN_USE_HUMAN_HANDOFF.value]}];return e?n:n.map((function(e){var n={};return Object.keys(e).map((function(i){var t;n[i]=(null===(t=e[i])||void 0===t?void 0:t.map((function(e){return e.replace("ucp_","")})))||[]})),n}))},a={adminDashboard:"Admin Dashboard",integrations:"Integrations",voiceAgents:"Voice Agents",masterchat:"MasterChat"}}}]);
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.